Question: Read the below system description carefuly: The below hospital system includes three classes: 1 - Patient: which includes basic information about patients. 2 - Doctor:
Read the below system description carefuly:
The below hospital system includes three classes:
Patient: which includes basic information about patients.
Doctor: which includes each doctor's information, and their assigned patients. Each doctor is assigne
to different patients, which are stored in the arrayList called patients.
HospitalManagementSystem: for managing different aspects of doctors, Assumptions and considerations:
You are not allowed to ripoff the papers.
Your code should be written to execute on a computer. Write complete code and correct code,
errors will be counted. Add comments if needed.
All setters and getters are already implemented.
Assume all import statements are already provided.
You may add extra methods or attributes to answer questions, however, use libraries or external code
at your own risk.
You must implement correct exception handling for checked exceptions.
Q points Implement the EVERYTHING in the UML Class diagram.
Q point In the class SystemUser, create the method boolean validateString usernametemp, String
passwordtemp This method should return true if the attributes userName and password in the class
SystemUser are EXACTLY the same as the ones passed as arguments of the method usernametemp and
passwordtemp Otherwise, the method should return false.
Q points In the the class HospitalManagementSystem, create the method called boolean save whi
does the following:
I. Create an a local variable of type arrayList that is of type where DO is the inner class. C
the arrayList DOs.
II Fill the arrayList DOs with objects of type DO where each DO object corresponds to a doctc
to a patient stored in the arrayLists doctors and patients in the class HospitalManagementSys
The Dos should be as follows:
a The attribute name in a Patient or Doctor object should be set to the DO's name attribute.
b The DO ID attribute should be set according the object type:
i If object is of type Doctor, the attribute id in DO should be the doctorID attribute of the
object.
ii if the obje patients and appointment
Assume that the static arrayLists doctors and patients are already filled with all the doctors and patien
in the hospital.
DO: which will be used as dataobject for saving information about patients and doctors.
Below is the UML class diagram
Assumptions and considerations:
You are not allowed to ripoff the papers.
Your code should be written to execute on a computer. Write complete code and correct code,
errors will be counted. Add comments if needed.
All setters and getters are already implemented.
Assume all import statements are already provided.
You may add extra methods or attributes to answer questions, however, use libraries or external code
at your own risk.
You must implement correct exception handling for checked exceptions.
Q points Implement the EVERYTHING in the UML Class diagram.
Q point In the class SystemUser, create the method boolean validateString usernametemp, String
passwordtemp This method should return true if the attributes userName and password in the class
SystemUser are EXACTLY the same as the ones passed as arguments of the method usernametemp and
passwordtemp Otherwise, the method should return false.
Q points In the the class HospitalManagementSystem, create the method called boolean save whi
does the following:
I. Create an a local variable of type arrayList that is of type DO where DO is the inner class. C
the arrayList DOs.
II Fill the arrayList DOs with objects of type DO where each DO object corresponds to a doctc
to a patient stored in the arrayLists doctors and patients in the class HospitalManagementSys
The Dos should be as follows:
a The attribute name in a Patient or Doctor object should be set to the DO's name attribute.
b The DO ID attribute should be set according the object type:
i If object is of type Doctor, the attribute id in DO should be the doctorID attribute of the
object.
ii if the object is of type Patient, the attribute id in the DO should be patientID attribute o
object.
c The DO enum attribute "type" should be set based on the object's type to Doctor or to Patient
object creation by calling the DO constructor. Add a comment with your name for an extra hal
III. Save all the DOs as objects to a file called SystemUsers.DB
IV The method should finally return return true if all objects have been written successfully,
otherwise returns false.
Q points In class SystemUser, create the static method called getID that returns the ID of an o
is passed as a parameter to the method, where the passed object can be an instance of the classes Pc
Doctor. For example if we call the code:
patient pnew PatientSalem "Doha;
doctor dnew DoctorRashid;
systemUser.getIDp; method will return the id of p
systemUser.getIDd; method will return
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
