Question
C++, using classes Write a program that asks for the names of three runners and the time it took each of them to finish a
C++, using classes
Write a program that asks for the names of three runners and the time it took each of them to finish a race. The program should display who came in first, second, and third place.
Follow these instructions:
a.Implement a class named Runner that stores the information of each runner.
b. Implement a Time class composed of the attributes hours, minutes, and seconds
c. Implement stream operators (<< and >>)
d. Implement the relational operators and implement a new class named RunnersRace that contains a dynamic array composed of n runners of class Runner
F. Implement a sorting algorithm inside the class and determine the runners' positions at the end of the race.
g. Implement the [], relational, stream operators in your class
h. Implement an options menu where:
i.You. Add a runner.
ii. Delete a broker.
iii. Order them relative to time in ascending order.
iv. Perform a search for the name of the broker and return the position that he got in the race.
v. Print the runners and their respective times
Will give a super rate multiple of your posts!
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started