Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Example Test Code:Below is an example of the test code that can be used for testing your programs public static void main ( String args
Example Test Code:Below is an example of the test code that can be used for testing your programs public static void mainString args
HospitalDatabase hd new HospitalDatabase;
hdshowAllPatients;
hdaddPatientMichael Johnson","Emma Thompson", ;
hdaddPatientEthan Lee", "Olivia Sanchez", ;
hdaddPatientNoah Miller", "Olivia Sanchez", ;
hdaddPatientLiam Davis", "Isabella Martinez", ;
hdaddPatientAva Taylor", "Isabella Martinez", ;
hdaddPatientMason Moore", "William Anderson", ;
hdaddPatientCharlotte Garcia", "Lucas Lewis", ;
hdaddPatientNoah Miller", "Olivia Sanchez", ;
hdshowAllPatients;
hdremovePatientAva Taylor";
hdshowAllPatients;
hdshowPatientMichael Johnson";
hdaddMemberMason Moore", "Daniel Roberts", "Nurse";
hdaddMember Mason Moore", "Victoria Stewart", "Radiologist";
hdaddMember Mason Moore", "Tyler Campbell", "Medical Assistant";
hdaddMember Mason Moore", "Hannah Martin", "Paramedic";
hdaddMember Michael Johnson", "Jack Allen", "Patient Care
Technician";
hdaddMember Michael Johnson", "Oliver Nelson", "Anesthesiologist";
hdaddMember Michael Johnson", "Sophia Rivera", "Pathologist";
hdaddMember Michael Johnson", "Evan Hall", "Laboratory Technician";
hdaddMember Michael Johnson", "Megan Price", "Nurse";
hdaddMember Ava Taylor", "Brianna Reed", "Dietitian";
hdaddMember Charlotte Garcia", "Oliver Nelson", "Anesthesiologist";
hdaddMember Charlotte Garcia", "Trevor Jenkins", "Medical Equipment
Technician";
hdaddMember Charlotte Garcia", "Justin Flores", "SpeechLanguage
Pathologist";
hdshowPatientMason Moore";
hdshowPatientMichael Johnson";
hdremoveMemberMichael Johnson", "Evan Hall";
hdshowPatientMichael Johnson";
hdshowDoctorPatientsOlivia Sanchez";
hdshowDoctorPatientsEmma Thompson";
hdshowPatients;
System.exit;
Output of the Example Test Code:
For the test code that is given above, you will see the following output on the screen.
none
INFO: Patient Michael Johnson has been added
INFO: Patient Ethan Lee has been added
INFO: Patient Noah Miller has been added
INFO: Patient Liam Davis has been added
INFO: Patient Ava Taylor has been added
INFO: Patient Mason Moore has been added
INFO: Patient Charlotte Garcia has been added
ERROR: Patient Noah Miller overwritten
Noah Miller, Olivia Sanchez
Ethan Lee, Olivia Sanchez
Mason Moore, William Anderson
Liam Davis, Isabella Martinez
Michael Johnson, Emma Thompson
Charlotte Garcia, Lucas Lewis
Ava Taylor, Isabella Martinez
INFO: Patient Ava Taylor has been removed
Noah Miller, Olivia Sanchez
Ethan Lee, Olivia Sanchez
Mason Moore, William Anderson
Liam Davis, Isabella MartinezMichael Johnson, Emma Thompson
Charlotte Garcia, Lucas Lewis
Michael Johnson
Emma Thompson
INFO: Daniel Roberts has been added to the patient Mason Moore
INFO: Victoria Stewart has been added to the patient Mason Moore
INFO: Tyler Campbell has been added to the patient Mason Moore
INFO: Hannah Martin has been added to the patient Mason Moore
INFO: Jack Allen has been added to the patient Michael Johnson
INFO: Oliver Nelson has been added to the patient Michael Johnson
INFO: Sophia Rivera has been added to the patient Michael Johnson
INFO: Evan Hall has been added to the patient Michael Johnson
INFO: Meghan Price has been added to the patient Michael Johnson
ERROR: Patient Ava Taylor does not exist
INFO: Oliver Nelson has been added to the patient Charlotte Garcia
INFO: Trevor Jenkins has been added to the patient Charlotte Garcia
INFO: Justin Flores has been added to the patient Charlotte Garcia
Mason Moore
William Anderson
Daniel Roberts, Nurse
Hannah Martin, Paramedic
Tyler Campbell, Medical Assistant
Victoria Stewart, Radiologist
Michael Johnson
Emma Thompson
Evan Hall, Laboratory Technician
Jack Ellen, Patient Care Technician
Meghan Price, Nurse
Oliver Nelson, Anesthesiologist
Sophia Rivera, Pathologist
INFO: Evan Hall has been removed from the patient Michael Johnson
Michael Johnson
Emma Thompson
Jack Ellen, Patient Care Technician
Meghan Price, Nurse
Oliver Nelson, Anesthesiologist
Sophia Rivera, PathologistOlivia Sanchez
Ethan Lee,
Noah Miller,
Emma Thompson
Michael Johnson,
Michael Johnson,
Liam Davis, use this test code and rewrite the all code according the expected output.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started