1. (a) Create a file containing the following car numbers, number of miles driven, and number of gallons of gas used by each car:
Car No. Miles Driven Gallons Used
54 250 19
62 525 38
71 123 6
85 1322 86
97 235 14
(b) Write a Java program that reads the data in the file created and displays the car number, miles driven, gallons used, and the miles per gallon for each car. The output should additionally contain the total miles driven, total gallons used, and average miles per gallon for all the cars. These totals should be displayed at the end of the output report.
Numbers and figures are an essential part of our world, necessary for almost everything we do every day. As important…
APPROVED BY CLIENTS
Finding a professional expert in "partial differential equations" in the advanced level is difficult.
You can find this expert in "Assignmentexpert.com" with confidence.
Exceptional experts! I appreciate your help. God bless you!
Comments
Leave a comment