Question: 6. (15 pts) The class Auto is a derived class or subclass of the Vehicle class. The Auto class has priva and an int year,

6. (15 pts) The class Auto is a derived class or subclass of the Vehicle class. The Auto class has priva and an int year, which is the year the automobile was made. te member variables: a String brand, which lists the manufacturer of the automobile Write a definition of the Auto class which contains at least one constructor. Given your answer in 8. implement or override the necessary methods Auto inherits from the Vehicle class. Be sure to include any methods that are unique to the Auto class. Include an int compareTo(Auto other) method which compares the current Auto's year to the year of the other Auto, and returns -1, 0, or 1 accordingly Include a boolean equals(Auto other) method that determines if the two Autos have the same year and brand
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
