Create a class named checkup


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). Include methods to get and set each of the fields. Include a method named computeRatio() that divides LDL cholesterol by HDL cholesterol and displays the result. Include an additional method named explainRatio() that explains that HDL is known as "good cholesterol" and that a ratio of 3.5 or lower is considered optimum. The comment header provided in Unit 1 should be added and completed. Save the class as Checkup.java and take a screenshot of each of the following: the newly written code, the code after it is compiled, and the output of the code.

Create a class named TestCheckup whose main() method declares four Checkup objects. Call a getData() method four times. Within the method, prompt a user for values for each field for a Checkup, and return a Checkup object to the main() method where it is assigned to one of main()'s Checkup objects. Then, in main(), pass each Checkup object in turn to a showValues() method that displays the data. Blood pressure values are usually displayed with a slash between the systolic and diastolic numbers. (Typical blood pressure values are 110/78 or 130/90.) With the cholesterol figures, display the explanation of the cholesterol ratio calculation. (Typical cholesterol values are 100 and 40 or 180 and 70.) The comment header provided in Unit 1 should be added and completed. Save the Assignment as TestCheckup.java and take a screenshot of each of the following: the newly written code, the code after it is compiled, and the output of the code. 

Request for Solution File

Ask an Expert for Answer!!
Theory of Computation: Create a class named checkup
Reference No:- TGS082158

Expected delivery within 24 Hours