Question: Java Help 1. Create a class named Checkup with fields that hold a patient number, two blood pressure figures (systolic and diastolic), and two cholesterol
Java Help
1. Create a class named Checkup with fields that hold a patient number, two blood pressure figures (systolic and diastolic), and two cholesterol figures (LDL and HDL).
a. Include a constructor that initializes the patient number.
b. Include methods to get and set each of the fields.
c. Include a method double computeRatio() that divides LDL cholesterol by HDL cholesterol and returns the result.
d. Include a method String toString() that returns a string containing the values of all instance variables, as well as the result of computeRatio(), and a statement explaining that HDL is known as good cholesterol and that a ratio of 3.5 or lower is considered optimum.
2. Write an application called TestCheckup that instantiates at least two Checkup objects and calls each method of the class at least once.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
