Question: Create a Java project called Lab7A and create a Java class called CarMain which includes the main method. a. Include a class called Car in


Create a Java project called Lab7A and create a Java class called CarMain which includes the main method. a. Include a class called Car in the same Java file. This class has following instance variables and instance methods. b. Create two objects of Car class in main method and assign the following values to each of the instance variables. c. Call the three methods in the class separately using these two objects. d. Modify the Car class by adding a new constructor that takes initial values for all 4 instance variables as the input parameters and set the variables to them. e. Create another object of the Car class in main method using the new constructor with following values to instance variables. f. Call the three methods in the class separately using this new object. g. Correct the errors in previously defined objects by adding the default constructor to the Car class
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
