Question
Develop a C++ program to provide information regarding a recent downhill ski competition. Have the user enter the full names and times of the skiers
Develop a C++ program to provide information regarding a recent downhill ski competition. Have the user enter the full names and times of the skiers and determine the fasted speed (lowest time), average speed, look up a skiers time, and display the skiers names and times.
Name | Time |
Leela Neela | 2.03 |
Sarah Hara | 2.40 |
Anna Banana | 1.85 |
Keesha Fleesha | 1.90 |
Heidi Mighty | 2.50 |
Requirements:
In main, define two parallel arrays and have the user enter the skiers names and times, and store them in two parallel arrays (validate that the times are greater than zero).
Do NOT use global variables. The arrays must be passed to all appropriate functions as arguments and used in the functions to produce the results.
Variable names must be descriptive and initialized where required.
Create a menu to ask the user if they want to:
Determine the fastest skier
Calculate the average time
Find the time of a skier
Display the skiers and their times
Quit the program
Display the menu repeatedly in main and have functions for each of the first four menu items.
The four functions will be:
Determine and display the fastest skier and her time
Calculate and display the skiers average time
Find a skier: have the user enter a skiers full name in this function, then search for the skier, and display her name and associated time; if the user enters a name that is not in the array, display a message to let the user know the name is not in the list.
Display all the skiers and their times
Output must be labeled and easy to read.
Arrays must be processed using loops.
Earn 5 extra credit points by assigning back to main, using reference variables, the name and time from function Find_Fastest, and the average from function Calc_Average, and displaying the values in main instead of in the functions.
Submit:
Your .cpp file
Screen shots of your output (execute all 5 menu options)
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