Question: started the code for variable full name but then need help 1. Your program should compile and run in order to be graded 2. Submit

started the code for variable full name but then need help  started the code for variable full name but then need help
1. Your program should compile and run in order to be graded

1. Your program should compile and run in order to be graded 2. Submit two separate classes as described below: a. Person Weight-a container and operations class for weight information. b. TestPersonWeight. This class contains the main method to perform unit testing on the previous class 3. You must use String formatters (i.e.printf (...)) for ANY output printing. Your solution should NOT contain the methods print() OR printin(). 4. Class PersonWeight: a. Four variables for Full Name (String), year of birth (Int), height (Double), and weight (Double). b. Default constructor to initialize the four variables to some default values - you may pick any values here. C. Non-default constructor to initialize the four variables using the constructor's parameters. d. Accessors (setters) and mutators (getters) methods for all four variables - 8 methods in total. e. computeAge() to return the person's age. In order to compute the age, you will need to programmatically obtain the current year. DONOT hard-code the current year as part of you class. Use the following Java statement to retrieve the current year: new GregorianCalendar().get(GregorianCalendar. YEAR) f. computeBMI) to return the person's BMI: bmi = weight/height? 5. Class TestPersonWeight: a. Remember: Show a message string before the prompt. Using printf() ONLY b. Create a method called classifyBMIO; the method returns one of the following strings: "Underweight": if BMI is under 18.5 "Normal Weight": if BMI is between 18.5 and 25 "Overweight": if BMI is between 25 and 30 "Obese": if BMI is more than 30 C. Create an instance of class Person Weight using the default constructor. Use the mutator methods to assign values to the class' 4 private members. d. Prompt the user to enter the person's full name, year, height, and weight. These values will be used in the next step. e. Create an instance of Person Weight using the non-default constructor. Use the values from the previous step. f. Using printf print the information such that it is formatted as shown in the example in Figure 1 and Figure 2. All leading labels should have column widths of 16 charartare Sample Outputs: 100 Enter person's name: John Doe Enter person's year of birth: 1990 Enter person's height in meters: 1.36 Enter person's weight in kilograms: 100.9 Full Name: John Doe Age: 30 Height: 1.36 Weight: 100.90 Classification: Obese Figure 1: Sample Run 1 Enter person's name: Jane Jack Enter person's year of birth: 2000 Enter person's height in meters: 1.1 Enter person's weight in kilograms: 30.2! Full Name: Jane Jack Age: 20 Height: 1.10 Weight: 30.20 Classification: Normal Weight Figure 2: Sample Run 2

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!