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 Marks
Please submit your work as a PDF file for UML and Code. The word file includes a cover page that includes your names your IDs your section, course name, assignment number, and academic semester. You can work up to a group of
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 for contact information including fields for type and details, eg type as 'phone' and details as 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 rolespecific information for medical staff in a hospital setting.
Part : UML Class Diagram 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 : Class Coding points and Test Coding 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.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
