![subject](/tpl/images/cats/informatica.png)
Computers and Technology, 17.03.2020 00:27 ionutvasiliev4237
Create a java program using the following instructions:
GymsRUs has a need to provide fitness/health information to their clients including BMI, BMI category and maximum heart rate. Your task is to write a console program to do this. Body Mass Index (BMI) is a measure of body fat based on a person’s height and weight. BMI can be used to indicate if you are overweight, obese, underweight, or normal. The formula to calculate BMI is BMI = weight(lb) x 703 / (height(inches))^2.
The following BMI categories are based on this calculation:
Category BMI Range
Underweight less than 18.5
Normal 18.5 to less than 25
Overweight 25 to less than 30
Obese 30 or more
Max heart rate is calculated as 220 minus a person’s age.
FUNCTIONAL REQUIREMENTS: This problem will have TWO classes. Design and code a class called HealthProfile (your "cookie cutter") to store information about clients and their fitness data. The following attributes are private instance variables:
Name
Age
Weight
Height (total inches)
The class must include the following public methods:
method description
setName Recieves a value to assign to private instance variable
setAge Recieves a value to assign to private instance variable
setWeight Recieves a value to assign to private instance variable
setHeight Receives TWO inputs (height in feet, inches). Converts and stores the TOTAL INCHES in private instance variable
getName Returns private instance variable
getAge Returns private instance variable
getWeight Returns private instance variable
getHeight Returns private instance variable (inches)
getBMI Calculates and returns BMI
getCategory Calculates and returns category based on BMI
getMaxHR Calculates and returns maximum heart rate
Create a SEPARATE TEST CLASS, HealthProfileTest, to prompt for user input and display output using the HealthProfile class. Process multiple inputs using a loop. You can assume all user input is valid.
SAMPLE OUTPUT:
Enter name or X to quit: John Smith
Your age: 35
Your weight: 200
Your height (feet): 6
Your height (inches): 0
Health Profile for John Smith
BMI: 27.1
BMI Category: overweight
Max heart rate: 185
Enter name or X to quit: Ann Jones
Your age: 50
Your weight: 120
Your height (feet): 5
Your height (inches): 2
Health Profile for Ann Jones
BMI: 21.9
BMI Category: normal
Max heart rate: 170
Enter name or X to quit: X
Goodbye!
![ansver](/tpl/images/cats/User.png)
Answers: 3
![](/tpl/images/ask_question.png)
![](/tpl/images/ask_question_mob.png)
Other questions on the subject: Computers and Technology
![image](/tpl/images/cats/informatica.png)
Computers and Technology, 23.06.2019 07:30, barkonatree
What is the penalty for violating section 1201 of title 17 chapter 21 of the us code
Answers: 1
![image](/tpl/images/cats/informatica.png)
Computers and Technology, 24.06.2019 13:00, naomirice24
In a heat transfer course, we can derive the equation for the temperature distribution in a flat rectangular plate. in this example, we will look at a plate at steadystate with three sides being held at t1, and one side held at t2. the temperature for any location on the plate, t(x, y), can be calculated by where create a function (prob3_5) that will take inputs of vectors x and y in feet, scalar n, scalars l and w in feet and scalars t1 and t2 in degrees fahrenheit. it will output a matrix t which is the temperature of each x and y locations. t will have the number of columns equal to the number of elements in x and rows equal to the number of elements in y. though this can be done without loops (perhaps more efficiently), your program must use a nested loop.
Answers: 2
![image](/tpl/images/cats/informatica.png)
Computers and Technology, 25.06.2019 11:30, domiyisthom
The main benefit of encryption of a hard drive
Answers: 1
![image](/tpl/images/cats/informatica.png)
Computers and Technology, 25.06.2019 16:00, mariahough
Which domain suffixes do businesses that sell products and services commonly use?
Answers: 2
You know the right answer?
Create a java program using the following instructions:
GymsRUs has a need to provide f...
GymsRUs has a need to provide f...
Questions in other subjects:
![Konu](/tpl/images/cats/istoriya.png)
![Konu](/tpl/images/cats/mat.png)
Mathematics, 10.02.2021 04:40
![Konu](/tpl/images/cats/himiya.png)
Chemistry, 10.02.2021 04:40
![Konu](/tpl/images/cats/mat.png)
Mathematics, 10.02.2021 04:40
![Konu](/tpl/images/cats/fizika.png)
Physics, 10.02.2021 04:40
![Konu](/tpl/images/cats/biologiya.png)
![Konu](/tpl/images/cats/mat.png)
Mathematics, 10.02.2021 04:40
![Konu](/tpl/images/cats/mat.png)
Mathematics, 10.02.2021 04:40
![Konu](/tpl/images/cats/mkx.png)
Arts, 10.02.2021 04:40