In: Computer Science
A hospital has a large number of registered physicians. Attributes of PHYSICIAN include Physician ID (the identifier) and specialty. Patients are admitted to the hospital by physicians. Attributes of PATIENT include patient ID(identifier) and patient name. Any patient who is admitted must have exactly one admitting physician. A physician may optionally admit any number of patients. Once admitted, a given patient must be treated by at least one physician. A particular physician may treat any number of patients or none at all. Whenever a patient is treated by a physician, the hospital wishes to record the details of the treatment (Treatment Detail). Components of Treatment Detail include date, time, and results.
Part C - UML Diagramming:
Recall the EER diagram you made for Medical Solutions Hospital in Part A. Use Draw.io or Visio to construct a UML diagram from your EER diagram. The UML diagram should have spaces for both fields/attributes and methods. Both Visio and Draw.io have built-in templates for UML diagramming. Be sure to add the multiplicities (like cardinalities).
Include:
What is possible to express with a UML diagram that is not possible to express with an EER diagram? Are there any limitations compared to an EER diagram?
The above UML calss diagram represents the Hospital System with Physician, Patient, Patient Record Classes
We choose one additional Class named as Hospital along with the above three classes
Each Class has its own specific attributes like attributes of Extended Entity Relation(EER )Diagrams and each class has its own functions(methods) as shown in above class diagram
The classes in class diagram are related in UML by one of the following Four relationships:
1 Dependency
2.Association
3 Generalization
4.Realization
In this diagram we used association relationship with its name,cordinality also
Compared to EER diagrams UML diagrams are more expressive,rich to model software and non software things
UML is a modeling language and it can model in both static and dynamic aspects of he given system using multiple diagrams of UML
Class diagrams specifically useful for
1. To model structural aspects of the system
2. to model logical data base schema
UML diagrams can be used for Generating code from UML diagrams(Forward Engineering feature of UML) which is not mapping using EER diagrams
EER diagrams are simple to understand but compared to UML diagrams EER diagrams are poor in performance