C++ Program Assignment | Homework For You
February 18th, 2020
Problem: Write a C++ program that will allow a user to access the results from a time-trial bike race. The race consists of laps around a 6.1 mile course, and the racers try to complete as many laps as they can within 6 hours. Only complete laps count. Your program will read in the race results from a file and display the data in the format requested. Your program will be provided with a dataset in a file containing the following information for each racer:

1) Bib number – a positive integer
2) Racer’s name – a string (may include spaces)
3) Distance covered by the racer (equal to the number of laps completed times 6.1) 3) Recorded time – a string in “05:23:32” format The number of laps is not provided and does not need to be computed. The program should first read the results from a text file named “dataset.txt”. It will contain up to 100 results. See the sample file on the class website. Then, it should offer the user a menu with the following options:
1. Display Results sorted by bib number
2. Display Results sorted by distance, then time
3. Lookup a bib number given a name
4. Lookup a result by bib number
5. Quit the Program The program should perform the selected operation and then re-display the menu. Do not change the menu numbers associated with the operations.
Display an error message if the user enters an inappropriate number. For options 1 and 2, display the results for each racer on a single, separate line. The results should include the Bib number, the name, the distance, the time, and the average speed in miles per hour (distance/time in hours). The values should line up in columns (use setw). Headers for the table are optional. For options 3, output the bib number with a label, and for option 4, output the results for the racer on a single line. For options 3 and 4, if the racer is not found display an appropriate message. Get Computer Science homework help today