A hospital is a very busy place with a lot of patients and a lot of employees. All people in the hospital have basic information like name, gender, address, email and phone number. Employees of the hospital have extra information like employee-id and salary. i. For every 20 (or more) employees, there is a manager who is also an employee, but gets an allowance of 6% more than the salary. ii. There are also doctors and nurses who are employees in the hospital. iii. Doctors and nurses are assigned to a specific department, like dental, pediatric, cardiac, and so on (choose 5 departments). Then, there are two types of patients in the hospital, i. the In-Patients and the Out-Patients, ii. while both have all the basic information, the In-Patients have a room number where they are admitted. First draw a UML to represent the given class. Then, create the base class (superclass) and subclasses to represent this scenario. Write a separate test module where 6 instances of the class are created, and the methods are tested by giving the required details and printing the details for each class.
A hospital is a very busy place with a lot of patients and a lot of employees.
-
All people in the hospital have basic information like name, gender, address, email and phone
number.
-
Employees of the hospital have extra information like employee-id and salary.
i. For every 20 (or more) employees, there is a manager who is also an employee, but gets an allowance of 6% more than the salary.
ii. There are also doctors and nurses who are employees in the hospital.
iii. Doctors and nurses are assigned to a specific department, like dental, pediatric, cardiac,and so on (choose 5 departments).
-
Then, there are two types of patients in the hospital,
i. the In-Patients and the Out-Patients,
ii. while both have all the basic information, the In-Patients have a room number wherethey are admitted.
First draw a UML to represent the given class. Then, create the base class (superclass) and subclasses to represent this scenario. Write a separate test module where 6 instances of the class are created, and the methods are tested by giving the required details and printing the details for each class.
Step by step
Solved in 5 steps with 4 images