subject

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
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 15:00
Which of the following statements tests if students have a grade of 70 or above, as well as fewer than five absences? a: if(grade > = 70 and daysabsent < = 5): b: if(grade > = 70 or daysabsent < = 5): c: if(grade > 70 and daysabsent < = 5): d: if(grade > 70 or daysabsent < = 5): i took the test the answer is a
Answers: 1
question
Computers and Technology, 22.06.2019 16:00
You have inserted new slides based on a word outline. how do you format these new slides to match the powerpoint presentation formatting? a. select all slides in the presentation and click format on the home tab. b. select the new slides and click reset on the home tab. c. select all slides in the presentation and click reset on the home tab. d. select the new slides and click format on the home tab.
Answers: 3
question
Computers and Technology, 22.06.2019 16:30
You have inserted new slides based on a word outline. how do you format these new slides to match the powerpoint presentation formatting? a. select all slides in the presentation and click format on the home tab. b. select the new slides and click reset on the home tab. c. select all slides in the presentation and click reset on the home tab. d. select the new slides and click format on the home tab.
Answers: 2
question
Computers and Technology, 23.06.2019 03:30
Hashtags serve to identify the topic of a given tweet true false
Answers: 2
You know the right answer?
Create a java program using the following instructions:

GymsRUs has a need to provide f...
Questions
question
Mathematics, 15.10.2020 17:01
question
Chemistry, 15.10.2020 17:01
Questions on the website: 13722367