Question
You are asked to implement the following interface and classes. 1. Interface Hospital with an abstract method getMedication(); 2. Class person with data fields: name(String)
You are asked to implement the following interface and classes. 1. Interface Hospital with an abstract method getMedication(); 2. Class person with data fields: name(String) , age(String) and prtPerson() method to print the data feilds. 3. Class Patient : a. Inherits Person b. Data Fields : ID (int) , Date (String), Time (String) c. prtPAcient(); 4. Class SurgeryP a. Inherits patient b. Data Fields: Surgerytype (String) c. Implements Hospital 5. Class TreatmentP a. Inherits Patient b. Data Fields : TreatmentType (String) c. Implements hospital 6. Class Doctor a. Inherits Person b. Data Fields : ID (int), Spec (String) c. Implements Hospital
7. Class Nurse a. Inherits Person b. Data Fields : ID (int) , Department (String) 8. Class NightShift a. Inherits Nurs b. Data Field : Shift (String) , Time (String) c. Implements Hospital 9. Class DayShift a. Inherits Nurse b. Data Fields : Date (String) , Time (String) c. Implements Hospital 10. Class Medication a. Main class b. 10 objects of Persons in an array. c. Print out the array d. Change some values using the setters e. Display the array by type
Bonus questions: 1. Implement the project using Graphical User Interface (GUI) 2. Use a database to save/display persons
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started