please look at the screenshot instructions to help me create a flowchart of this c++ code ,also you dont need to do the other tasks just help me to create a flowchart regarding the instructions given, thank you

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%

please look at the screenshot instructions to help me create a flowchart of this c++ code ,also you dont need to do the other tasks just help me to create a flowchart regarding the instructions given, thank you

 

Marathon Simulator
Edit April 3, 11:55 AM: If you are having trouble dealing with the runner who has a middle name, feel free to remove the middle name from the input file. If you have already figured out how to deal with the middle name (there is a way to do it
with the skills you have learned), great! That gives you a greater chance of getting "Exceeds" for input/output.
We are going to simulate running a marathon (40 kilometer foot race) with 25 runners. Each runner has a pair of parameters which dictates how long it takes them to travel one kilometre. You are provided with a file, runners.txt, containing runne
numbers, runner names, and runner pace, separated by spaces. For example:
1 John Smith 5:05
2 Sally Jones 4:55
This means that, on average, John runs 1 KM in 5 minutes 5 seconds, while Sally runs 1 KM in 4 minutes 55 seconds. Keeping that average pace, John would take 3 hours 32 minutes 20 seconds to run 40 KM, while Sally would take 3:16:40.
Step 1
Read the entire assignment, then plan out your entire program by making a flowchart. As you do so, think carefully about what you will and will not abstract.
Step 2
Write code to read the file into a paired set of two arrays:
• string name[] for the runner name
float pace[] for their pace in minutes
Since the paces in the file are stored as two integers separated by a colon, you will need to write code that can convert from minutes and seconds to floating point minutes.
Step 3
To simulate the marathon, for each kilometre that each runner ran, you will generate random values that are near their given pace. This represents the time that runner took for that kilometer. To do this, calculate a value which is 5% slower and
another value 5% faster. This is the range within which that specific runner's time will fall for any kilometre. For each kilometre, generate a random number between these two bounds. Repeat this for all runners, for all 40 kilometres.
Caution: You are looping through kilometres and runners. Think carefully about which should be your inner loop and which should be your outer loop.
Step 4
Maintain an elapsed time for each runner in a third array, float time[]. Each loop through your program will represent another kilometer elapsed in the race.
After the first 20 kilometres, output to the user the fastest runner and their elapsed time, as well as the slowest runner and their elapsed time.
At the end of the race, show the fastest and slowest runner, and generate an output file named A4output_22222222.txt (where the 2s are replaced with your student number) containing the runners and their times.
Transcribed Image Text:Marathon Simulator Edit April 3, 11:55 AM: If you are having trouble dealing with the runner who has a middle name, feel free to remove the middle name from the input file. If you have already figured out how to deal with the middle name (there is a way to do it with the skills you have learned), great! That gives you a greater chance of getting "Exceeds" for input/output. We are going to simulate running a marathon (40 kilometer foot race) with 25 runners. Each runner has a pair of parameters which dictates how long it takes them to travel one kilometre. You are provided with a file, runners.txt, containing runne numbers, runner names, and runner pace, separated by spaces. For example: 1 John Smith 5:05 2 Sally Jones 4:55 This means that, on average, John runs 1 KM in 5 minutes 5 seconds, while Sally runs 1 KM in 4 minutes 55 seconds. Keeping that average pace, John would take 3 hours 32 minutes 20 seconds to run 40 KM, while Sally would take 3:16:40. Step 1 Read the entire assignment, then plan out your entire program by making a flowchart. As you do so, think carefully about what you will and will not abstract. Step 2 Write code to read the file into a paired set of two arrays: • string name[] for the runner name float pace[] for their pace in minutes Since the paces in the file are stored as two integers separated by a colon, you will need to write code that can convert from minutes and seconds to floating point minutes. Step 3 To simulate the marathon, for each kilometre that each runner ran, you will generate random values that are near their given pace. This represents the time that runner took for that kilometer. To do this, calculate a value which is 5% slower and another value 5% faster. This is the range within which that specific runner's time will fall for any kilometre. For each kilometre, generate a random number between these two bounds. Repeat this for all runners, for all 40 kilometres. Caution: You are looping through kilometres and runners. Think carefully about which should be your inner loop and which should be your outer loop. Step 4 Maintain an elapsed time for each runner in a third array, float time[]. Each loop through your program will represent another kilometer elapsed in the race. After the first 20 kilometres, output to the user the fastest runner and their elapsed time, as well as the slowest runner and their elapsed time. At the end of the race, show the fastest and slowest runner, and generate an output file named A4output_22222222.txt (where the 2s are replaced with your student number) containing the runners and their times.
Expert Solution
steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
Concept of Flowchart
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
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