Question: PART1) Create a class named BloodData that includes String fields that hold a blood type as bloodType (the four blood types are O , A

PART1) Create a class named BloodData that includes String fields that hold a blood type as bloodType (the four blood types are O, A, B, and AB) and an Rh factor as rhFactor (the factors are + and ).

PART2) Create an application named TestBloodData that declares two objects. Prompt the user for values for one, and use the default constructor values for the other. Display the details of both objects. Then change the values in the default object so it also uses the users values, and display the details for the object again to confirm the changes are made correctly.

PART3) Create a class named Patient that includes an ID number (id), age (age), and BloodData (bloodData).

PART4) Create an application called TestPatient that declares three Patient objects. Use all default values for one Patient object, prompt the user for values for the second Patient object, and for the third object, prompt the user for Patient data but use default values for that Patients BloodData.

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!