Question: Given the following UML diagram: Staff - name: String - birthYear: int - gender: char (Mor F) + Staff (---All Parameters----> + setters/getters +toString(): String

 Given the following UML diagram: Staff - name: String - birthYear:

Given the following UML diagram: Staff - name: String - birthYear: int - gender: char (Mor F) + Staff (---All Parameters----> + setters/getters +toString(): String Clinic - name: String - staff: ArrayList + Clinic (name: String) + getName(): String + add Doctorld: Doctor): void + add Nurse(n: Nurse): void + getStaff(): ArrayList + countDoctors(): int + countNurseOfType(t:string): int + searchDoctorByName name: String): Doctor + toString(): String + Doctor Nurse specialty: String (Pediatrician, - type: String (OR, RN, NP) Oncologist, etc.) + Nurse ----All Parameters----) + Doctor ----All Parameters---- + setter/getter + setter/getter + toString(): String + toString(): String Part 1: Implement the following classes (Staff (10 pt), Doctor (10 PE), Nurse (10 pts) and Clinic (35 pts)). A class Staff is described by the instance variables: name, year of birth and gender. The method toString return a string containing all the information of the Staff. The class Doctor derived from the class Staff, which has an additional instance variable designating the specialty. The method toString) returns in addition to the Staff information, the specialty of Doctor. The class Nurse, derived from the class Staff, which has an additional instance variable designating the type of nurse (OR, RN, NP). The method toString() returns in addition to the Staff information, the specialty The class Clinic is to manage the list of Staff into the Clinic. The class Clinic is described by a name and an array list of staffs Note: The method count NurseOfType returns the number of Nurses work into the Clinic of a specific type. The method searchDoctorByName searches a doctor by its name

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!