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!

![43
46
47
48
49
50
51
52
53
54
56
57
59
61
6.2
63
64
6.5
66-
67
-X68
-X69
-x70
x71
72
73
74
75
76
77
78
79
80
81
82
1
1
public int getYear()
{
1
//add code
return year;
public void setYear (int yearUpdate)
{
year yearUpdate;
1
{
Returns a string representation of this Car.
public String toString()
{
//add code
return toString();
public static void main(String[] args)
CarTest el - newCarTest("Ford", "Tarus", 2007);
CarTest c2 - newCarTest("Honda", "Odessey", 2011);
CarTest c3 = newCarTest("Toyota","Corrolla", 1999);
CarTest c4 - newCarTest("Ford", "Mustang", 1966);
/*add code here. Hint: Call constructor four times to create four objects. Then print the descriptions of the
System.out.println(el);
System.out.println (c2);
System.out.println (c3);
System.out.println(c4);
/*add code here. Hint: Update data and print updated information.*/](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F988c66ad-2fab-4561-a552-cd296d0e4f50%2F1410a4e3-cbc1-4fff-a2ce-b3a3a8b4c4fe%2F9uwz8wc_processed.png&w=3840&q=75)

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









