Create An Automobile Class For A Dealership Seek Your Dream /Tutorialoutletdotcom
FOR MORE CLASSES VISIT www.tutorialoutlet.com Write a program for the instructions given below: 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 to 0. Do not allow the miles per gallon to be less than 10 or more than 60; if it is, set the miles per gallon to 0. Car speed should be initialized as 0.
★
★
★
★
★
141 views • 3 slides