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

CS304 Assignment 1

The document outlines the requirements for a blood bank management system, detailing the roles of donors, patients, hospitals, inventory, and admin. It specifies the main entities, their attributes, functions, and the relationships among them, emphasizing the importance of managing blood donations and requests. Additionally, it includes tasks for creating a comprehensive class diagram to represent the system's structure and interactions.

Uploaded by

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

CS304 Assignment 1

The document outlines the requirements for a blood bank management system, detailing the roles of donors, patients, hospitals, inventory, and admin. It specifies the main entities, their attributes, functions, and the relationships among them, emphasizing the importance of managing blood donations and requests. Additionally, it includes tasks for creating a comprehensive class diagram to represent the system's structure and interactions.

Uploaded by

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

CS304-Object Oriented Programming

Assignment 1
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.
3. Identify the relationships among identified objects.
4. Construct a final comprehensive Class diagram showing all objects and their
relationships along with their attributes and functions.

Solution:
Entities:
 Donor
 Patient
 Inventory
 Hospital
 Admin
Attributes & Functions:
 Donor ID
 Name
 Age
 Blood Type
 Last donation date
 Contact info
 Eligibility status
Functions:
 Register ()
 updateProfile ()
 viewDonationRecords ()
 checkEligibility ()
 receiveDonationReminder ()
Patient:
Attributes:
 patientID
 name
 bloodTypeRequired
 medicalHistory
 contactInfo
 requestStatus
Functions:
 registerRequest()
 viewRequestStatus()
Inventory:
Attributes:
 inventoryID
 bloodType
 quantity
 expirationDate
Functions:
 checkAvailability()
 updateInventory()
 removeExpiredBlood()

Blood Request

Attributes:

 requestID
 patientID
 hospitalID
 bloodType
 priorityLevel
 requestStatus

Functions:

 submitRequest()
 updateRequest()
 cancelRequest()

Hospital:
Attributes:
 hospitalID
 name
 location
 contactInfo
Functions:
 viewDonorDetails()
 selectDonor()
Admin
Attributes:
 adminID
 name
 contactInfo
Functions:
 registerDonor()
 manageInventory()
 processBloodRequests()
 monitorBloodExpiry()
 sendDonationReminders()
3. Relationships Among Identified Objects:
Donor - Patient: Indirect relationship through Inventory; donors supply blood, which is then
requested by patients.
Admin - Donor: Admin manages donor registrations and sends reminders.
Admin - Inventory: Admin monitors and manages the inventory, ensuring blood is available
and up-to-date.
Admin - Hospital: Admin facilitates blood requests from hospitals.
Patient - Inventory: Patients make blood requests, which depend on inventory availability.
Hospital - Donor: Hospitals can view donor information and select donors based on blood
type requirements.
Blood Request - Patient: Patients create and manage their blood requests.
Blood Request - Inventory: Requests are matched to the blood types available in inventory.

4. Comprehensive Class Diagram:


On next page

You might also like