Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a program that uses a class called Data, in Data.cpp . Yourprogram first asks a runner for a distance and 5 of his /
Write a program that uses a class called Data, in Data.cpp Yourprogram first asks a runner for a distance and of hisher best times in that event, andit will store the times in the array time. Then it finds the best, the worst, and the averagetime for that runner. Finally, it displays all five times, following by the worst, the best,and the average.The class Data has the following attributes, including an array of time, distance, min,max, and average.double timeN; array of times in secondint distance; distance in meterdouble min, max, average;You need to write the function statistics. Please note that we assume we are onlydealing with N times N is equal or greater than So the statistics function is a simplefunction. This program finds the fastest time as the best time, the slowest time as theworst time, and computes the average of N times. Other functions including setTimesetDistance and display function to output the statistics functions results
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