Five students in college ; Mike, Abby, James, Anne, and Ali are preparing for an upcoming running competition organized by Sports Development Center in UOL. At every alternate day. They practice running in a football stadium for a certain distance and write down their time and distance covered. At the end of the week, they would like to know the number of meters runs each day, the total distance for each week, the total time they achieved as well as the furthest distance achieved. Write a c++ program that reads the data recorded by the five runners that contain the following: An array to store the names of the five runners and a two-dimensional array of five rows and eight columns of type double to store the distance and time for each runner. A function named read_data() to read data from the user and display the runner’s names and the distance (in meters) covered and the time achieved each working day. Runner’s name should be stored in a one-dimensional array of type string A function to find the total meters and time covered by each runner and the furthest distance achieved at the end of the week. The data is given to you as shown below. The data is read in sequence as follows; first input is the name of the runner, the second, fourth, sixth and the eighth columns are distance covered (in meter, e.g, 1000). The third, fifth, seventh, and ninth columns are the time taken (in second, e.g., 90) for each distance.   Sample Input:   Mike             1200    90        1700    150      2700    270      1200    120 Abby            1500    180      2800    340      1900    220      1100    90                    James          2000    260      1800    200      1000    120      1600    210 Anne         1700    200      1500    180      2100    250      2500    300 Ali               1800    220      2400    300      1600    220      2100    210   Sample Output:   Runner      Distance       Time         Distance          Time           Distance        Time          Distance        Time ------------------------------------------------------------------------------------------------------------------------------------- Mike          1200               90                1700                150                2700             270              1200               120 Abby        1500               180            2800                 340               1900             220             1100                 90 James     2000               260             1800                200                 1000            120               1600               210 Anne    1700                200              1500               180                 2100            250               2500               300 Ali          1800                 220            2400                 300                1600            220                2100               210   Runner                Total Distance                  Total Time                         Furthest Distance -------------------------------------------------------------------------------------------------------------- Mike                 6800                                    630                                      2700 Abby                7300                                    830                                      2800 James               6400                                    790                                      2000 Anne              7800                                    930                                      2500 Ali                  7900                                    950                                      2400

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
100%

Five students in college ; Mike, Abby, James, Anne, and Ali are preparing for an upcoming running competition organized by Sports Development Center in UOL. At every alternate day. They practice running in a football stadium for a certain distance and write down their time and distance covered. At the end of the week, they would like to know the number of meters runs each day, the total distance for each week, the total time they achieved as well as the furthest distance achieved. Write a c++ program that reads the data recorded by the five runners that contain the following:

  1. An array to store the names of the five runners and a two-dimensional array of five rows and eight columns of type double to store the distance and time for each runner.
  2. A function named read_data() to read data from the user and display the runner’s names and the distance (in meters) covered and the time achieved each working day. Runner’s name should be stored in a one-dimensional array of type string
  3. A function to find the total meters and time covered by each runner and the furthest distance achieved at the end of the week.

The data is given to you as shown below. The data is read in sequence as follows; first input is the name of the runner, the second, fourth, sixth and the eighth columns are distance covered (in meter, e.g, 1000). The third, fifth, seventh, and ninth columns are the time taken (in second, e.g., 90) for each distance.

 

Sample Input:

 

Mike             1200    90        1700    150      2700    270      1200    120

Abby            1500    180      2800    340      1900    220      1100    90                   

James          2000    260      1800    200      1000    120      1600    210

Anne         1700    200      1500    180      2100    250      2500    300

Ali               1800    220      2400    300      1600    220      2100    210

 

Sample Output:

 

Runner      Distance       Time         Distance          Time           Distance        Time          Distance        Time

-------------------------------------------------------------------------------------------------------------------------------------

Mike          1200               90                1700                150                2700             270              1200               120

Abby        1500               180            2800                 340               1900             220             1100                 90

James     2000               260             1800                200                 1000            120               1600               210

Anne    1700                200              1500               180                 2100            250               2500               300

Ali          1800                 220            2400                 300                1600            220                2100               210

 

Runner                Total Distance                  Total Time                         Furthest Distance

--------------------------------------------------------------------------------------------------------------

Mike                 6800                                    630                                      2700

Abby                7300                                    830                                      2800

James               6400                                    790                                      2000

Anne              7800                                    930                                      2500

Ali                  7900                                    950                                      2400

Expert Solution
steps

Step by step

Solved in 2 steps with 4 images

Blurred answer
Knowledge Booster
Payback period
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education