Question
Create a class named YourName_Checkup with the following: Fields that hold a patient number, two blood pressure figures (systolic and diastolic), and two cholesterol figures
Create a class named YourName_Checkup with the following: Fields that hold a patient number, two blood pressure figures (systolic and diastolic), and two cholesterol figures (LDL and HDL). A constructor that initializes the patient number. Methods to get and set each of these fields. A method double computeRatio() that divides LDL cholesterol by HDL cholesterol and returns the result. A toString() method 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 optimal.
Write an application called YourName_TestCheckup that instantiates at least two Checkup objects and calls each method of the class at least once. Place print statements in your code to demonstrate that methods were called and correct values were returned when appropriate.
Draw a UML diagram of the classes your program, including their attributes and methods. Feel free to use any program that aids the design of UML class diagrams; ArgoUML is suggested.
The name of the files where you save your classes should contain your name, last name first (example: SmithJohn_Checkup.java).
Start your program with a Javadoc comment that has your name, the course number and section, and the title of the assignment: /** John Smith * MSI-503 * Assignment 3 */
Continue with a Javadoc comment that describes the tasks that your program/class is performing and be specific. Remember to put more comments in strategic places in your program. You are required to put comments on top of each method describing what the method does.
Correctly indent your program.
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