Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

you are to write a java program that records the health profile. you will design a starter HealthProfile program for a person. The program should

you are to write a java program that records the health profile. you will design a starter HealthProfile program for a person. The program should include the persons age, height (in inches), and weight (in pounds). The program also should include functions that calculate maximum heart rate and target heart rate, and body mass index (BMI). The program should prompt for the persons information from that variable including age, height and weight then it should calculate and display the BMI, maximum heart rate and target heart rate range. Use the following formula to calculate BMI, maximum heart rate and target heart rate range. formular Maximum Heart Rate = 220 age Target Heart Rate Range = 50 80 % of Maximum Heart Rate.

The program should notify to the user what the BMI value means. BMI values will be determined as follows: If BMI value is in 19 to 24, he/she is "Normal". If BMI value is in 25 to 29, he/she is "Overweight". If BMI value is in 30 to 39, he/she is "Obese". If BMI value is bigger than 40, he/she is "Extreme Obesity". The program should keep asking the user to input data if he/she has more to calculate. The program allows decimal places. Therefore, variables used in this program should have the proper data type. Output of the program should be well formatted, readable, and professional. 1. Declare variable names and proper data type of each variable. 2. Import scanner class for user input. 3. Add data entered by a user using do/while loop. 4. Calculate and decide BMI value. 5. Calculate Maximum heart rate and target heart rate. 6. All output values must have two decimal places. 7. Well-formatted, readable, and professional output. 8. Ask a user input more data after each calculation. If no more data to input, program stops. 9. Your output should look like following:

Enter height in inches: 68.5 Enter weight in pounds: 220 Enter your age: 20 Your BMI value is 32.96 You are obese Maximum Heart Rate: 200.00 Target Heart Rate 50 to 80 percentage --> 100.00~160.00 Do you have more data to calculate? <0 to continue or 1 for stop> -->0 Enter height in inches: 70.7 Enter weight in pounds: 185.8 Enter your age: 35 Your BMI value is 26.13 You are overweight Maximum Heart Rate: 185.00 Target Heart Rate 50 to 80 percentage --> 92.50~148.00 Do you have more data to calculate? <0 to continue or 1 for stop> -->0 Enter height in inches: 72 Enter weight in pounds: 173 Enter your age: 42 Your BMI value is 23.46 You are normal Maximum Heart Rate: 178.00 Target Heart Rate 50 to 80 percentage --> 89.00~142.40

Do you have more data to calculate? <0 to continue or 1 for stop> -->1 **************************************************************** Thank you for using Health Profiler

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Microsoft SQL Server 2012 Unleashed

Authors: Ray Rankins, Paul Bertucci

1st Edition

0133408507, 9780133408508

More Books