Question: Please be sure to do the second part as well Write a class called Car that contains Instance data that represents the make, model, and

Please be sure to do the second part as well
Write a class called Car that contains Instance data that represents the make, model, and year of the car. Defne constructors to Initialze these values. Include accessorigetter) and mutatorisetter) methods for all Instance data, and a toString method that retums a the data of the car. Create a driver class called CarTest, whose main method instantiates and updates several Car objects In the Car Class, you will need 1. Three prlvate members to store data for the make model and year 2. Two constructors: o The first constructor should not accept any value during instantiation (This constructor can initialize the members to an 'empty string or dash i.e."-or0 o The second constructor should accept three values for the members during instantiation. 3. Accessors and Mutators for each private member of the class 4. A toString method to output the information on each car In the CarTest driver, you will need 1. At three Car objccts: Two of the three objects can be initialized with hardcoded data One should be initialized with the constructor that accepts n parameters o 2. A Scanner Object to read get infomation on the third car 3. Local variables to store information on the third car and pass it on to the objcct's private members) 4. To test the accessors and mutators you made: You must use at least one accessor method from the hrst two car objects You must use the mutator to update at least one characteristic from the first two Car objects Here is some sample output: INote: your output does not have to tallow the same narative. You can be as creative as you want In order to test the class and objects. Here is the information I have on Mr. Smith's three cars 2015 Ford Taunus 2007 Honda Accord Whoops! It seems we do not have the into on one of his cars! Enter the information for the third car here Make: Hyundai Model: Elantra Year: 2014 Mr. Smith traded the Taurus for another Ford from the same year Enter the new Ford madel: Explorer Mr. Smith sold the 2007 Accord to buy a more current version. Enter the new year for the Accord: 2017 Here is the updated information I now have on Mr. Smith's three cars: 2015 Ford Explorer 2017 Honda Accord 2014 Hyundai Elantra
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
