akosiraff

Download Biomedical Research C++ Answer

Mar 26th, 2017
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.62 KB | None | 0 0
  1.  
  2. Download: https://solutionzip.com/downloads/biomedical-research/
  3. A research institute specializing in physiology is conducting a study on the strain and effects ofcommuting 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.
  4. Write a C++ program to analyze a small subset of the data that has been collected.
  5. INPUT: Redirect the input from the file HR.txt.
  6. The file consists of three columns, with six lines of data for each person. The first line stores eachperson’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 heartrate, and exercise heart rate for five consecutive working days. Then, the six line sequence is repeatedfor 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.
  7. PROCESSING: Use precisely six parallel arrays: one for subject numbers and five for the calculatedvalues as described below.
  8. Look at data for subject 4545 as this is discussed:
  9. 4545 190 52
  10. 114.8 130 113.1
  11. 102.6 131 0.0
  12. 117.4 129 149.1
  13. -1 -1 114.0
  14. 114.1 123 119.5
  15. Using this information, calculate1. Average of the average commuting heart rates for each person.
  16. For subject 4545 this would be (114.8 + 102.6 + 117.4 + 114.1)/4 since there was a daythat no reading was available.
  17. 2. Number of days that the person exercised on his/her own.
  18. For subject 4545 this is 4 since one of the days is 0.
  19. 3. Estimated maximum heart rate = 220 – age.
  20. For subject 4545 this is 220 – 52 = 168
  21. 4. Ratio (%) of measured maximum heart rate to estimated maximum heart rate.The maximum heart rate for each person has been measured during a maximumoxygen uptake test in the laboratory. During the test, the person exercised withincreasing intensity until exhaustion, and then the maximum heart rate was measuredclose to the end of the test. Using this measured maximum heart rate and the estimatedmaximum heart rate, calculate the percentage of the measured maximum heart ratewith respect to the estimated maximum heart rate. Note that this percentage canexceed 100%.
  22. For subject 4545, 190/168 * 100 = 113.1%
  23. 5. Ratio (%) of highest commuting heart rate to measured maximum heart rate. Find the highestmaximum commuting heart rate for a person, and then calculate the percentage of this valuewith respect to the measured maximum heart rate.
  24. For subject 4545, 131/ 190 = 69.4%
  25. OUTPUT: Output should be sorted by subject number from low to high with the following:
  26. Subject Number
  27. Average Commuting Heart Rate
  28. Days Exercised
  29. Estimated Max Heart Rate
  30. % Measured to Estimated Max Heart Rate
  31. % Max Commuting to be Measured
  32. Checkpoints:
  33. No two-dimensional arrays, no menu function, and no structures may be used
  34. 1. Input function fills all five arrays while calling calculation function for each subject.
  35. 2. One and only one function must be used to calculate the percentage of measured maximum to estimated heart rate and the percentage of highest commuting heart rate to measure maximum heart rate
  36. 3. Use a selection sort to sort subject numbers. This needs to be a separate function.
  37. 4. A separate function must be used to output the table heading ONLY
  38. 5. Numerical output is done in a separate output function. Output must beformatted as shown. Redirect output to a file.
  39. Contents of HR.txt, formatted as on the txt file
  40. 6231 181 28
  41. 140.1 170 101.8
  42. 128.4 156 0.0
  43. 145.2 171 106.2
  44. 131.3 165 0.0
  45. 144.8 170 0.0
  46. 1124 178 36
  47. 122.8 139 138.4
  48. 119.6 142 0.0
  49. 117.8 134 133.4
  50. 115.3 145 134.2
  51. 87.2 109 120.5
  52. 7345 195 36
  53. 128.4 151 104.6
  54. 120.5 153 0.0
  55. 134.5 166 140.4
  56. 127.4 156 0.0
  57. 150.3 169 158.5
  58. 9439 197 21
  59. 121.5 143 112.2
  60. 128.9 145 0.0
  61. 126.1 159 134.5
  62. 123.0 152 0.0
  63. 131.5 147 0.0
  64. 4545 190 52
  65. 114.8 130 113.1
  66. 102.6 131 0.0
  67. 117.4 129 149.1
  68. -1 -1 114.0
  69. 114.1 123 119.5
  70. 2438 200 26
  71. 123.0 165 105.4
  72. 118.2 130 122.0
  73. 121.7 136 124.5
  74. 116.1 130 0.0
  75. 111.0 152 103.5
  76. 2776 178 45
  77. 110.3 120 129.1
  78. 107.8 132 0.0
  79. 111.5 145 135.0
  80. -1 -1 0.0
  81. 95.5 119 0.0
  82. 8762 186 28
  83. 122.7 146 151.9
  84. 116.0 137 0.0
  85. 119.9 145 0.0
  86. 123.3 148 150.0
  87. 121.0 142 156.3
  88. 4915 185 27
  89. 120.3 169 0.0
  90. 130.2 150 0.0
  91. 123.0 158 0.0
  92. 133.4 152 0.0
  93. 131.6 159 0.0
  94. 3521 181 51
  95. 108.3 133 119.3
  96. -1 -1 0.0
  97. 117.6 147 125.3
  98. 106.7 131 0.0
  99. 122.7 159 0.0
  100. Download: https://solutionzip.com/downloads/biomedical-research/
Add Comment
Please, Sign In to add comment