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

Instructions Create a class named BloodData that includes String fields that hold a blood type as bloodTypeInstructions Part B Create an application named TestBloodData that declares two objects. Prompt the user forInstructions Create the Patient class. Add the data fields to the Patient class. Create a default PatientInstructions Part D Create an application called Test Patient that declares three Patient objects. Use all

Instructions 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 -). Create the BloodData class. Tasks Add the data fields to the BloodData class. Create a default constructor that sets the fields to 0 and + and an overloaded constructor that requires values for both fields. Tasks Create a default BloodData constructor. Include get and set methods for each field. Create an overloaded BloodData constructor. Tasks Add set and get methods for the bloodType data field. Add set and get methods for the rhFactor data field. ||| > > > > Instructions Part B 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 user's values, and display the details for the object again to confirm the changes are made correctly. An example of the program is shown below: Enter blood type >> AB Enter RH factor >> - The blood is type 0+ The blood is type AB+ The blood is type AB+ Create the TestBloodData application. |||| Task > Instructions Create the Patient class. Add the data fields to the Patient class. Create a default Patient constructor. Tasks Provide get methods for each field. Provide a default constructor that sets the ID number to O, the age to O, and the BloodData values to the default Blood Data values (O and +). Create an overloaded constructor that provides values for each field. Create an overloaded Patient constructor. Add a get method for the id data field. Tasks Tasks Add a get method for the age data field. |||| Add a get method for the bloodData data field. > > > > > > > Instructions Part D Create an application called Test Patient 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 Patient's BloodData. An example of the program is shown below: Enter ID number for patient >> 13 Enter age for patient 13 >> 23 Enter blood type for patient 13 >> AB Enter RH factor for patient 13 >> - Enter ID number for second patient >> 99 Enter age for patient 99 >> 12 Patient #0 age: 0 The blood is type 0+ Patient #13 age: 23 The blood is type AB- Patient #99 age: 12 The blood is type 0+ Create the Test Patient application. ||| Task

Step by Step Solution

3.31 Rating (151 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

BloodDatajava class BloodData String bloodType String rhFactor BloodData thisbloodTypeO thisrhFactor BloodDataString bloodType String rhFactor thisblo... View full answer

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 Programming Questions!