QuestionQuestion

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, you’ll design a “starter” HealthProfile class for a person. The class attributes should include the person’s first name, last name, gender, date of birth (consisting of separate attributes for the month, day and year of birth), height (in inches) and weight (in pounds). Your class should have a constructor that receives this data. For each attribute, provide set and get methods. The class also should include methods that calculate and return the user’s age in years, maximum heart rate and target-heart-rate range, and body mass index. Write a Java application that prompts for the person’s information, instantiates an object of class HealthProfile for that person and prints the information from that object—including the person’s first name, last name, gender, date of birth, height and weight—then calculates and prints the person’s age in years, BMI, maximum heart rate and target-heart-rate range. It should also display the BMI values chart.

Solution PreviewSolution Preview

This material may consist of step-by-step explanations on how to solve a problem or examples of proper writing, including the use of citations, references, bibliographies, and formatting. This material is made available for the sole purpose of studying and learning - misuse is strictly forbidden.

public class main {

    /**
    * @param args the command line arguments
    */
    public static void main(String[] args) {
       // TODO code application logic here
       Scanner input = new Scanner(System.in);      
       HealthProfile hp = new HealthProfile();
      
       // variables to get input      
       String string;
       int number;
       double aNumber;
      
       // get user input
       System.out.println("Enter your information here :");
      
       System.out.print("First name : ");
       string = input.next();
       hp.setFirstName(string);
      
       System.out.print("Last name : ");
       string = input.next();
       hp.setLastName(string);
      
       System.out.print("Gender (male/female): ");
       string = input.next();
       hp.setGender(string);
      
       System.out.println("Date : ");
       System.out.print("\tDay (1-31): ");
       number = input.nextInt();
       hp.setDay(number);
      
       System.out.print("\tMonth (1-12): ");
       number = input.nextInt();
       hp.setMonth(number);
      
       System.out.print("\tYear : ");
       number = input.nextInt();
       hp.setYear(number);...
$22.50 for this solution

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

Find A Tutor

View available Java Programming Tutors

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.

Decision:
Upload a file
Continue without uploading

SUBMIT YOUR HOMEWORK
We couldn't find that subject.
Please select the best match from the list below.

We'll send you an email right away. If it's not in your inbox, check your spam folder.

  • 1
  • 2
  • 3
Live Chats