The csit racing club is a group that runs amateur car


Assignment

The CSIT Racing Club is a group that runs amateur car racing events throughout the US. In This project, write a program that will help the club determine the winner of their Fall Rally Race. You will need to determine each racer's average time and identify the first place finisher. An input file with race information contains records of all the laps run by each driver. The record for each driver includes the number of the car the driver races and times for each of 8 laps run during the race. For the record of each driver, your program should determine the average lap time based on the following rules:

a. Each driver's slowest two lap times are discarded before the average is calculated

b. Any driver that has a lap time that is recorded as a negative number means that the driver incurred a penalty and is disqualified from the race (so no average needs to be calculated). Your program also needs to determine the numbers of qualified and disqualified drivers.

The program has to ask the user for the input file name first, and then read the data into your program. After that, calculate the average lap time. Furthermore, the program has to decide the first place finisher. If two or more drivers have the exact same best record, you have to display all of them as the first place finishers. In this program, you can assume that the total number of drivers entered into the race will not be greater than 30

Design and Implementation

You must develop your program with the following two functions or more.

1. A function to read a data file and calculate the average lap times: This function should prompt the user a data file name and read the data. Then it calculates the average lap time for each driver.

2. A function to print the race result and determine the top finisher. For this project, you may need several arrays to store the ids of drivers and results. Additionally, it may need to pass the arrays between functions.

Solution Preview :

Prepared by a verified Expert
Programming Languages: The csit racing club is a group that runs amateur car
Reference No:- TGS01712845

Now Priced at $40 (50% Discount)

Recommended (93%)

Rated (4.5/5)