I need help with my Lab Idon’t understand the instructions.
the upper and lower numbers of blood pressure, so both must be provided. No age is required in this function. A string description of the person’s category will be returned to Lab 3 Health Applications Program (developed in class) main, and this description will be printed as part of a whole sentence by main If you define two separate functions, your program should be tested using each, one at a time o Another way to handle the two different evaluations based on different tables would be to have the logic for both tables in one function that is capable of testing which table should be applied (similar to the design of the function that chooses the correct formula to calculate BMI by testing which units were provided as a parameter). This is a bit more difficult than using the approach of having two different functions and calling only the one desired, but you are free to choose either way of handling this. Main Menu (an example) Display menu of options (ultimately, place inside a while loop and include input validation printf(“Please enter the number of one of the following options: Vn”); printf(“1. Evaluate Body Mass Index (BMIn”); printf(“2. Evaluate Blood Pressuren”); printf”3. Evaluate BMI and Blood Pressuren”); printf”4. Other health measurement of student choice n”); printf(“5. Exit applicationn”); An important feature of having two different ways to evaluate blood pressure in this lab is that it illustrates some of the important benefits of a modular design with functions: it is easier to modify such a program (by either swapping out the function for another, or changing the internal code of the function to handle new responsibilities) than it would be to modify a program that does not have a modular design. Changes to main as a result should be minimal Instructions: Use a while-loop to allow the user to continue selecting another option until choosing to exit the program, and also to handle input validation (the code should display an error message if a number outside of the range 1-5 is chosen, invite the user to re-enter a choice from the displayed menu, and then take the appropriate action) 1. Option 3 simply executes Option 1, followed by Option 2 Option 4 is your choice of health evaluation 2. 3. Use a switch control structure to test which option was selected by the user and to call the 2. appropriate function(s). Option 1 Details 3. Height and weight of the user will be required as input, and some designation of units used. The first function called will compute the BMI value based on height and weight, using the correct formula for the units specified. The computed BMI will be returned to main main will call the second function, providing the BMI value as a parameter. The second function will evaluate the BMI value using standard charts. The string description of the person’s condition based on BMI will be returned back to main from the second function, and this description will be printed as part of a whole sentence by main. Option 2 details: 4. You need to include the evaluation of blood pressure provided by the user by applying both of the two different scales: the pre-2018 tables, and the newer 2018 table which had the “average” or “normal” blood pressure values adjusted down for everyone based on what was learned during a long-term study about factors strongly correlated to the prevention of strokes and heart attacks. One way to do this is to have 2 different versions of the function evaluating blood pressure: o Version 1 would use the pre-2018 men’s table (which is almost identical to the women’s) breaking down the thresholds defined for low, average, and high blood pressure based on age ranges, so the user will have to provide blood pressure and age. (To simplify, you may supply both upper and lower, but just categorize based on upper in this function.) A string description of the person’s category should be returned to main, and this description is printed as part of a whole sentence by main o Version 2 of this function would use the guidelines published in Jan. 2018. An example of the chart to use is the Mayo Clinic Chart. You would need to translate the ranges into logical expressions in C code. This function requires that tests be performed using both Show transcribed image text the upper and lower numbers of blood pressure, so both must be provided. No age is required in this function. A string description of the person’s category will be returned to Lab 3 Health Applications Program (developed in class) main, and this description will be printed as part of a whole sentence by main If you define two separate functions, your program should be tested using each, one at a time o Another way to handle the two different evaluations based on different tables would be to have the logic for both tables in one function that is capable of testing which table should be applied (similar to the design of the function that chooses the correct formula to calculate BMI by testing which units were provided as a parameter). This is a bit more difficult than using the approach of having two different functions and calling only the one desired, but you are free to choose either way of handling this. Main Menu (an example) Display menu of options (ultimately, place inside a while loop and include input validation printf(“Please enter the number of one of the following options: Vn”); printf(“1. Evaluate Body Mass Index (BMIn”); printf(“2. Evaluate Blood Pressuren”); printf”3. Evaluate BMI and Blood Pressuren”); printf”4. Other health measurement of student choice n”); printf(“5. Exit applicationn”); An important feature of having two different ways to evaluate blood pressure in this lab is that it illustrates some of the important benefits of a modular design with functions: it is easier to modify such a program (by either swapping out the function for another, or changing the internal code of the function to handle new responsibilities) than it would be to modify a program that does not have a modular design. Changes to main as a result should be minimal Instructions: Use a while-loop to allow the user to continue selecting another option until choosing to exit the program, and also to handle input validation (the code should display an error message if a number outside of the range 1-5 is chosen, invite the user to re-enter a choice from the displayed menu, and then take the appropriate action) 1. Option 3 simply executes Option 1, followed by Option 2 Option 4 is your choice of health evaluation 2. 3. Use a switch control structure to test which option was selected by the user and to call the 2. appropriate function(s). Option 1 Details 3. Height and weight of the user will be required as input, and some designation of units used. The first function called will compute the BMI value based on height and weight, using the correct formula for the units specified. The computed BMI will be returned to main main will call the second function, providing the BMI value as a parameter. The second function will evaluate the BMI value using standard charts. The string description of the person’s condition based on BMI will be returned back to main from the second function, and this description will be printed as part of a whole sentence by main. Option 2 details: 4. You need to include the evaluation of blood pressure provided by the user by applying both of the two different scales: the pre-2018 tables, and the newer 2018 table which had the “average” or “normal” blood pressure values adjusted down for everyone based on what was learned during a long-term study about factors strongly correlated to the prevention of strokes and heart attacks. One way to do this is to have 2 different versions of the function evaluating blood pressure: o Version 1 would use the pre-2018 men’s table (which is almost identical to the women’s) breaking down the thresholds defined for low, average, and high blood pressure based on age ranges, so the user will have to provide blood pressure and age. (To simplify, you may supply both upper and lower, but just categorize based on upper in this function.) A string description of the person’s category should be returned to main, and this description is printed as part of a whole sentence by main o Version 2 of this function would use the guidelines published in Jan. 2018. An example of the chart to use is the Mayo Clinic Chart. You would need to translate the ranges into logical expressions in C code. This function requires that tests be performed using both
Expert Answer
Answer to the upper and lower numbers of blood pressure, so both must be provided. No age is required in this function. A string d…