Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

In a Java languages. Write a class called Car that holds information about an au

ID: 3680744 • Letter: I

Question

In a Java languages. Write a class called Car that holds information about an automobile: Make (e.g., Chevy, Toyota, ) Model (e.g., Impala, Corolla, Uno) Year (e.g., 2012) Define a constructor to initialize these values. Define a to String method. Define a method called is Antique that returns true if the car is more than 25 years old, and false otherwise. Create a test driver called Car_Test. Accepts inputs from the keyboard for each member variable. Instantiates a Car object with the entered values. Outputs the values to the screen using println(). Determines if the car is an antique and outputs the result.

Explanation / Answer

import javax.swing.JOptionPane;

    static void main(String[] args) {

        boolean carAge = true;

         if(carAge>25)             

        System.out.println("Car Age is :”);

boolean carAge = false;

         else

       System.out.println("Car Age is :”);

    }

public class GetInputs{

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote