Question: Assignment 3 ( 6 Marks ) Please submit your work as a PDF file for UML and Code. The word file includes a cover page

Assignment 3(6 Marks)
Please submit your work as a PDF file for UML and Code. The word file includes a cover page that includes your name(s), your ID(s), your section, course name, assignment number, and academic semester. You can work up to a group of 3.
Scenario:
Imagine designing a system for a hospital management application. The system must manage various types of medical staff, including surgeons, doctors, and nurses. Each staff member has common attributes such as a name, an array of size 4 for contact information (including fields for type and details, e.g., type as 'phone' and details as '0501232456'), and an employee ID. Additionally, each role may have specific attributes unique to that position. Additionally, each role has specific attributes unique to that position:
Doctor: Attributes may include specialty and medicalLicenseNumber.
Surgeon: Doctor attributes is extended in this class by certification number and yearsOfExperience.
Nurse: Attributes may include department, shiftSchedule, and certifications.
This structure allows for managing both shared and role-specific information for medical staff in a hospital setting.
Part 1: UML Class Diagram (2 points):
Create a UML class diagram representing the core classes in this scenario, focusing on the staff hierarchy. Include a base class for the common attributes and subclasses for each staff role with their specific attributes. You may notice that all are persons, but the surgeons are doctors as well.
Hint: you may have classes for medical staff, contact information, Doctors, Surgeons and Nurses.
Part 2: Class Coding (2 points) and Test Coding (2 points):
Code the classes based on your UML diagram to achieve code reuse and a clear class hierarchy. Define in your code the overload and override methods in all the classes (add comments in our code, which are overloaded and which are overridden).
Code a test program that includes a method that takes an array of Staff members and prints the number of doctors, surgeons, nurses, and other staff members.
Note: Ensure your explanations are clear and concise, and your UML diagram accurately reflects the relationships between classes in the scenario.
Assignment 3 ( 6 Marks ) Please submit your work

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 Programming Questions!