Hospital
Start from ready-to-use Eclipse project HospitalProject.zip
(follow the instructions)
Implement a system to manage patients of an hospital
(using Exceptions and Collections). The
system must meet the following
requirements.
R1: Patients and doctors
Patients are characterized by the first name, the last name, and the
unique social security number (characters string). Doctors are
characterized by the first name, the last name, and the unique badge ID
(integer number). The main class of the program is class Hospital. New patients can be added
to the system by means of method addPatient().
New doctors can be added to the system by means of method addDoctor(). Suppose that doctors
are never patients of the same hospital they work in.
R2: Patient registration
When accepted, a patient is assigned to one of the hospital doctors. To
this aim, method assignPatientToDoctor()
is provided. Patient is identified by means of her SSN, and doctor is
identified by means of her badge ID. If the doctor does not exist,
exception NoSuchDoctor is
thrown. Further, if the patient does not exist, exception NoSuchPatient is thrown.
R3: Doctor of patient
By means of method printDoctorOfPatient(),
the administrator can visualize on screen the doctor of a specific
patient,
given the social security number. If the patient does not exist,
exception NoSuchPatient is
thrown.
R4: Patients of doctor
By means of method printPatientsOfDoctor(),
the administrator can visualize on screen all patients of a doctor,
given the doctor ID. If the doctor does not exist, exception NoSuchDoctor is thrown.