Question
A health-care issue that has been in the news lately is the computerization of health records. This possibility is being approached cautiously because of sensitive
A health-care issue that has been in the news lately is the computerization of health records. This possibility is being approached cautiously because of sensitive privacy and security concerns, among others. Computerizing health records could make it easier for patients to share their health profiles and histories among their various health-care professionals. This could improve the quality of health care, help avoid drug conflicts and erroneous drug prescriptions, reduce costs and, in emergencies, could save lives. In this exercise, youll design a class named HealthProfile for a person. The class attributes (members) should include:
- the persons first name,
- last name,
- gender,
- age in years
- height (in inches)
- weight (in pounds).
- a constructor that receives the above data and initializes the instance variables.
The HealthProfile class also should include 3 separate methods that calculate and return:
- maximum heart rate
- target-heart-rate range
- body mass index It is left to you to find how to calculate these values. Be sure to cite your source in your comments for each of these methods. DO NOT cite the (joke) URLs listed in the example below.
Then, in a separate Java file, write a test program using a Java class named HealthProfileDemo that contains the main method, and prompts for the persons information, instantiates an object of class HealthProfile for that person and prints the information from that objectincluding the persons first name, last name, gender, height and weightthen calculates and prints the persons BMI, maximum heart rate and target-heart-rate range. Remember, ONLY your main method should contain print/println as well as read/readln statements. Also, keep repeating in main while the user answers y or Y when asked if she/he would like to try again.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started