(Solved):Create an Automobile class for a dealership. Include fields for an ID number, make, model, color, year, vin number, miles per gallon, and speed. Include get and set methods for each field. Do not a… View Answer…

 

Question

Create an Automobile class for a dealership. Include fields for an ID number, make, model, color, year, vin number, miles per gallon, and speed. Include get and set methods for each field.

Do not allow the ID to be negative or more than 9999; if it is, set the ID to 0.

Do not allow the year to be earlier than 2000 or later than 2017; if it is, set the year

Scroll to top