Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Design and implement a set of classes that define the employees of an hospital: doctor, nurse, administrator, surgeon, receptionist, janitor. Include methods in each class

Design and implement a set of classes that define the employees of an hospital: doctor, nurse, administrator, surgeon, receptionist, janitor. Include methods in each class that are named according to the services provided by that person and that print an appropriate message. Create a main driver class to instantiate and exercise several of the classes.

Adding a UI that allows the user to enter information that will be used to create the different objects, and displays the information.

Note:

Think about inheritance, extract all the common characteristics and behaviors into a superclass and have the subclasses inherit them. The subclasses should each have at least one characteristic and one behavior that is different from the super class. Instead of giving each type of employee a different name for what he does, use the same name: duty as the method name to override the duty method in the super class.Apply the overriding mechanism to the toString method as well.

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

Database Driven Web Sites

Authors: Joline Morrison, Mike Morrison

2nd Edition

? 061906448X, 978-0619064488

More Books

Students also viewed these Databases questions

Question

Why do polysaccharides elicity only weak immune reactions?

Answered: 1 week ago