Your uncle is trying to keep track of his new-car and used-car lots by writing a Java program. He needs your help in setting up his classes.
Implement a superclass named Car that contains a price instance variable, a getPrice method, and a 1-parameter constructor. The getPrice method is a simple accessor method that returns the price instance variable’s value. The 1-parameter constructor receives a cost parameter and assigns a value to the price instance variable based on this formula:
price = cost * 2;
Implement two classes named NewCar and UsedCar; they are both derived from the Car superclass. NewCar should contain a color instance variable (the car’s color). UsedCar should contain a mileage instance variable (the car’s odometer reading). The NewCar and UsedCar classes should each contain a 2-parameter constructor, an equals method, and a display method. In the interest of elegance and maintainability, don’t forget to have your subclass constructors call your superclass constructors when appropriate. The display method should print the values of all the instance variables within its class.
Use [url removed, login to view] in a new window driver class that tests your three car classes.
price = $16,000.66, color = silver
price = $5,000.00, mileage = 100,000
Submit your [url removed, login to view], [url removed, login to view] and [url removed, login to view] files.
*** Deliver within 1 hour *** Contact me for an efficient, perfect, well documented development of your project according to 100% accuracy and requirements, with dedicated support. Thanks