Question: Use the text file with the following data: Car Make, Car Model, Car Price(make up your own information) You will be given a Car class

Use the text file with the following data:

Car Make, Car Model, Car Price(make up your own information)

You will be given a Car class that will contain the 3 fields, a constructor to initialize the 3 fields, and a toString method. It will also have the appropriate getters and setters in the Car class.

You will need to create a Driver class that will read the input file. You will create a Car object per record in the file, and store the Car object in an array of Cars. The array of Cars will be created as a static global variable, before the main method.

Write a method in the driver class that will find the car with the highest cost and the lowest cost. The method should also add up all the car costs, so that after the loop, you can calculate the average cost of all cars.

Rember to NOT use Buffered Reader

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!