Fuel Economy A fuel-economy study was carried out for five models of cars. Each car was driven 100 miles, and then the model of the car and the number of gallons used were placed in a line of the file Mileage.txt. Table 7.22 shows the data for the entries of the file. Write a program to display the models and their average miles per gallon in decreasing order with respect to mileage. See Fig. 7.81. The program should utilize an array of structures with upper bound 4, where each structure has three members. The first member should record the name of each model of car. The second member should record the number of test vehicles for each model. The third member should record the total number of gallons used by that model. [Hint: Two Function procedures that are helpful have the headers Function NumCars(make As String) As Integer and Function NumGals(make As String) As Double. NumCars calculates the number of cars of the specified model in the table, and NumGals calculates the number of gallons used by the model. Both Function procedures are easily coded with LINQ queries.]
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.