Question: Write code in Java. Explain your answer. A company called pre-owned cars has used cars on sale. Write a class called Car which displays
Write code in Java.
Explain your answer.
A company called "pre-owned cars " has used cars on sale.
Write a class called Car which displays the make, model and age of the car
Age of the car= Current year - Manufactured year
create another class called "test" with the main method and test the class created above using the data below.
Car1: Toyota Rav4, 2015 [Make model and manufactured year]
Car2: Nissan Altima, 2019 [Make model and manufactured year]
Use best practices of object oriented programming.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
