Write a class Car that contains fields “make”, “model” and “year.” The first two fields are Strings and the third one is an int. Define a constructor to accept and initialize instance data. Then define more methods(see code below). A toString method is included to print the description of the car. Then create a drive class called CarTest which has a main method. Portion of the program is given. You’ll complete the program. When you run CarTest the result should look like this
Instruction
Write a class Car that contains fields “make”, “model” and “year.” The first two fields are Strings and the third one is an int. Define a constructor to accept and initialize instance data. Then define more methods(see code below). A toString method is included to print the description of the car. Then create a drive class called CarTest which has a main method. Portion of the program is given. You’ll complete the program. When you run CarTest the result should look like this:
> run CarTest
2007 Ford Taurus
2011 Honda Odyssey
1999 Toyota Corolla
1966 Ford Mustang
Update data!
2007 Ford Explorer
2010 Honda Odyssey
1999 Nissan Maxima
1966 Ford Mustang
Student Here!
Hi, I've tried typing the code (The screenshots attached) but kept getting errors. Im not sure what to do so I hope that you can help me!
Thank You!
Refer below the correct version of your given code with output:
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images