Assigment cs304
Assigment cs304
Solution:
1. Extract Main Objects (Entities)
Based on the scenario, the main entities for this system would include:
1. Donor
2. Patient
3. Blood Inventory
4. Hospital
5. Admin
6. Blood Request
Entity: Donor
Attributes:
Functions:
Entity: Patient
Attributes:
Functions:
Attributes:
Functions:
Attributes:
Functions:
Entity: Admin
Attributes:
Functions:
Functions:
3. Relationship
Compositi
Related Relationsh on /
Entity Description
Entity ip Type Aggregati
on
Blood
One-to- A donor donates multiple blood units
Donor Inventor Aggregation
Many that are added to the inventory.
y
A patient can make multiple blood
Blood One-to- Compositio requests, and each request is
Patient
Request Many n dependent on the patient (request
ceases if patient is removed).
Blood Blood Blood requests use multiple units from
Many-to-
Reques Inventor Aggregation the inventory, and each unit may fulfill
Many
t y multiple requests over time.
Hospit Blood One-to- Hospitals can place multiple blood
Aggregation
al Request Many requests for their patients.
Admins manage the registration and
One-to-
Admin Donor Aggregation eligibility of multiple donors but do not
Many
"own" the donor records.
Admin Blood One-to- Aggregation Admins monitor and update the blood
Inventor One / One- inventory but do not own the
y to-Many inventory data.
Admins are responsible for processing
Blood One-to-
Admin Aggregation multiple blood requests but do not
Request Many
own the requests themselves.
4. Class Diagram
Note: Zoom in the Image for a Clear View