Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

A hospital is a very busy place with a lot of teachers and a lot of staff. All patients in the hospital have basic information

A hospital is a very busy place with a lot of teachers and a lot of staff.

All patients in the hospital have basic information like name, gender, address, email, and phonenumber.

Staff at the hospital have extra information like Staff-id and salary.

i. For every department are 5 doctors. There is a Dept_HeadDoctor who is also a doctor but gets an allowance of 10% more than the salary of a doctor.

ii. There are also Nursing Staff and Ambulance Staff iii. Nursing Staff are assigned to a specific department like Orthopedic, Cardiac, Pediatric and Dermatology

Then, there are two types of patients in the hospital,

i. The Inpatient and the Outpatient

ii. While both have all the basic information, the Inpatients will have a room number and cost of stay assigned to them.

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 themethods are tested by giving the required details and printing the details for each class.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Visual Basic6 Database Programming

Authors: John W. Fronckowiak, David J. Helda

1st Edition

0764532545, 978-0764532542

More Books

Students also viewed these Databases questions

Question

Why do people in teams often tolerate social loafers?

Answered: 1 week ago