Question: JAVA coding help. Need help with this assignment. Must only use two Classes. First is the Main second is Patient. In Patient you must use
JAVA coding help. Need help with this assignment. Must only use two Classes. First is the Main second is Patient. In Patient you must use nested classes. The main is provided and may not be changed. 
P9.88 Create a class named Patient that includes an ID_number, age and blood_data*. Provide a default constructor that sets the ID to "O0", the age to "O", and the BloodData to "O" and '+. Create an overloaded constructor that provides values for each field. BloodData shall be a nested class in the Patient Class. BloodData includes fields that hold a String blood-type {"O", "A", "B", or "AB') and a char RhFactor,. Create a default constructor that sets the fields to "O" and+, and an overloaded constructor that provides values for each field Simple Main Your main must only contain the following lines of code and execute with the expected output. Patient Timmy-new Patient) System.out.printin("Patient ID: "Timmy.getID0 + Timmy.displayBlood); Patient Spike new Patient(1337, 19, -, "AB") "inPatient Age:"+Timmy.getAge()) System.out.printin("Patient ID:"+Spike.getIDO+ "InPatient Age:"+Spike.getAgel); Spike.displayBlood0 Expected Output: Patient ID: 0 Patient Age: 0 Blood Type: O+ Patient ID: 1337 Patient Age: 19 Blood Type: AB
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
