0% found this document useful (0 votes)
10 views

CS 304 Assignment 1 Solution

Uploaded by

bc230406141mfa
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

CS 304 Assignment 1 Solution

Uploaded by

bc230406141mfa
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

CS304 Assignment # 1

Bc230414070
Syed Nauman Ali

Scenario:

A blood bank plays a vital role in saving people’s lives. A blood bank management
system is a system which manages the donation and storage of blood, and inventory
operations etc. It manages the collection, storage and distribution of blood to
hospitals. Donors are individuals who donate blood. They can register, update their
profiles, and view their donation records. On the other hand, patients in need of
blood can register request and track status of their request. They have specific
blood type requirements and medical history.

The Inventory tracks available blood types and quantities, including inventory ID and
expiration dates, with methods for checking availability and updating records.
Similarly, hospitals can view donor details, and select required donor on biases of
donor’s information. The admin must handle donor registrations, manage blood
inventory, and facilitate blood requests from hospitals. It should also monitor blood
expiry, check donor eligibility and ensures that blood is available for critical patients.
Admin also send reminders to donors for future donations.

You have to perform the following tasks in this assignment:

1. Extract the main objects (entities) of above system.


2. Find the necessary attributes and functions that need to be associated with
each object.
Solution

Task 1: Extract Main Objects (Entities)


1. Donor
2. Patient
3. Hospital
4. Blood Inventory
5. Blood Request
6. Admin
7. Donation Record

Task 2: Attributes and Functions for Each Object


 Donor
Attributes: - Donor ID, - Name, - Contact Info, - Blood Type, - Medical History, -
Donation History
Functions: - Register, - Update Profile, - View Donation Records

 Patient
Attributes: - Patient ID, - Name, - Contact Info, - Medical History, - Blood Type
Required
Functions: - Register, - Request Blood, - Track Request Status

 Hospital
Attributes: - Hospital ID, - Name, - Contact Info
Functions: - View Donor Details, - Select Donor, - Request Blood

 Blood Inventory
Attributes: - Inventory ID, - Blood Type, - Quantity, - Expiration Date
Functions: - Check Availability, - Update Records - Track Expiry

 Blood Request
Attributes: - Request ID, - Patient ID, - Blood Type Required, - Quantity Required, -
Status
Functions: - Create Request, - Update Status, - Cancel Request

 Admin
Attributes: - Admin ID, - Name, - Contact Info
Functions: - Manage Donor Registrations, - Manage Blood Inventory, - Facilitate
Blood Requests,
- Monitor Blood Expiry, - Send Reminders

 Donation Record
Attributes: - Donation ID, - Donor ID, - Date, - Blood Type, - Quantity
Functions: - Create Record, - Update Record

Task 3: Relationships Among Objects


 Donor 1 : M Patient
 Donor 1 : M Inventory
 Patient M : 1 Admin
 Inventory 1 : 1 Admin
 Hospital M : 1 Admin
 Hospital M : N Donor
 Hospital M : N Patient

Task 4: Comprehensive Class Diagram

You might also like