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

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!