Question: Write a class, Patient, using the following specifications: Must have the following private attributes: - name of type String - weight of type double (the
Write a class, Patient, using the following specifications: Must have the following private attributes:
- name of type String
- weight of type double (the persons weight in pounds)
- height of type double (the persons height in inches)
Must have a default constructor that:
- Sets the name to "Unknown"
- Sets the weight and height both to 0.0
Must have a parameterized constructor that:
- Accepts parameters for name, weight and height
- The parameterized constructor uses these parameters to set the attributes Comments are required
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
