Strain and effects of commuting trips
A research institute specializing in physiology is conducting a study on the strain and effects of commuting trips done on a bicycle or walking. When the physiological strain of commuting trips has been studied, the results will be used in exercise prescriptions, which can then use commuting as part of an exercise regimen.
In this program you will write a C++ program to analyze a small subset of the data that has been collected.
INPUT: Redirect the input from the file HR.txt.
The file consists of three columns, with six lines of data for each person. The first line stores each person’s ID number (integer), clinically measured maximum heart rate (integer), and age (integer). The following five lines contain the day’s average commuting heart rate, maximum commuting heart rate, and exercise heart rate for five consecutive working days. Then, the six line sequence is repeated for the next person. At times the heart rate monitors reacted to nearby power lines or other objects, and gave false readings. These incorrect measurements were rejected and show up in the data file as
-1. On the days the person did not exercise, the exercise heart rate value is zero.
PROCESSING; Use precisely six parallel arrays: one for subject numbers and five for the calculated values as described below.
Using this information, calculate
1. Average of the average commuting heart rates for each person.
2. Number of days that the person exercised on his/her own.
3. Estimated maximum heart rate = 220 – age.
4. Ratio (%) of measured maximum heart rate to estimated maximum heart rate.
The maximum heart rate for each person has been measured during a maximum oxygen uptake test in the laboratory. During the test, the person exercised with increasing intensity until exhaustion, and then the maximum heart rate was measured close to the end of the test. Using this measured maximum heart rate and the estimated maximum heart rate, calculate the percentage of the measured maximum heart rate with respect to the estimated maximum heart rate. Note that this percentage can exceed 100%.
5. Ratio (%) of highest commuting heart rate to measured maximum heart rate. Find the highest maximum commuting heart rate for each person, and then calculate the percentage of this value with respect to the measured maximum heart rate.