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.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

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.

Expert Solution
steps

Step by step

Solved in 5 steps with 4 images

Blurred answer
Knowledge Booster
Time complexity
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education