Question: by java languge Q1. Create a health Record class for a person. The class should have the following attributes: first name last name date of

by java languge  by java languge Q1. Create a health Record class for a

Q1. Create a health Record class for a person. The class should have the following attributes: first name last name date of birth (consisting of separate instance variable for each of month, day and year of birth) height in m) weight (in kg) Your class should have a constructor that receives all the above attributes. For each attribute, provide set and get methods. The class also should include methods that: 1. computeAge : calculate and return the user's age in years to compute age use: 2020 minus year_of_birth) 2. compute MHR: calculate and return the maximum heart rate. According to the American Heart Association (AHA) (www.americanheart.org/presenter.jhtml?identifier-4736). the formula for calculating your maximum heart rate in beats per minute is 220 minus your age in years 3. computeBMI: calculate and return the user's body mass index (BMI). The formula for calculating BMI is Write a testDrive class which includes your main function. In your main function: 1. Ask the user to enter his/her information as shown in the sample output below 2. Calculate and print the user's maximum heart rate 3. Calculate and print the user's BMI 4. Print the BMI category according to the following rule: BMI VALUES Underweight: less than 18.5 Normal: between 18.5 and 24.9 Overweight: between 25 and 29.9 Obese: 30 or greater Sample output (green color represents user's input): Enter your first name: Manar Enter your last name: Khalid Enter your date of birth: Day: 1 Month: 1 Year: 2000 Enter your height in meter: 1.46 Enter your weight in kg: 56 Manar's age is 19 Your maximum heart rate is 201 Your BMI is 26.27 --> Overweight

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!