Question: write a Java program Objective: Review basic concepts of handling text files and simple data structures. Exercises: 1. Write a Java program to display the

write a Java program write a Java program Objective: Review basic concepts of handling text files

Objective: Review basic concepts of handling text files and simple data structures. Exercises: 1. Write a Java program to display the number of words in the file. 2. A text file, "honda.txt" contains details of cars in a warehouse, sample file given below. Example: honda.txt CRV-3 CV6787272 150000.00 20.0 MRV-1 MV9890202 180000.00 20.0 Civic CC9939390 82000.00 10.0 CRV-3 CV8393939 149000.00 20.0 The fields in the above columns are: a. Vehicle Name :String b. Engine Number : String c. Vehicle Price : double d. Profit double a. . Create a class Car with the following fields: Vehicle Name : String Engine Number : String Vehicle Price double Profit double Total Price double Note: The total price of each car is calculated as follows: Total Price (Vehicle Price) +(Vehice Price Profit/100) Create a test class with main method 1. Create an array of Cars. 2. Create a Car object from the Car Information in file "honda.txt" 3. Add the car object to the array 4. Display the information of the Car which has the a given engine number. (Hint: create a method to take array of cars as input and an engine number and prints the car information if found.) 3. Write a method that multiplies two MXN 2D arrays. If the multiplication is not possible, an error message is displayed (Hint: check input array dimensions)

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!