0% found this document useful (0 votes)
11 views4 pages

cs304 Assingment

The document outlines the design of a blood bank system, identifying five main entities: Donor, Patient, Inventory, Hospital, and Admin, along with their attributes and functions. It details the relationships among these entities, emphasizing the roles of Admin in managing donors and inventory, and the interactions between Hospitals and Patients. Additionally, it suggests a class diagram structure to represent these entities and their associations visually.

Uploaded by

e7824695
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views4 pages

cs304 Assingment

The document outlines the design of a blood bank system, identifying five main entities: Donor, Patient, Inventory, Hospital, and Admin, along with their attributes and functions. It details the relationships among these entities, emphasizing the roles of Admin in managing donors and inventory, and the interactions between Hospitals and Patients. Additionally, it suggests a class diagram structure to represent these entities and their associations visually.

Uploaded by

e7824695
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Step 1: Identifying Main Objects (Entities)

Based on the blood bank system description, we can identify the following primary objects:

1. Donor
2. Patient
3. Inventory
4. Hospital
5. Admin

Step 2: Defining Attributes and Functions for Each Object

Here’s a detailed breakdown of the attributes and methods each class might contain.

1. Donor

 Attributes:
o donorID (unique identifier)
o name
o age
o bloodType
o contactInfo
o lastDonationDate
o donationHistory
 Functions:
o register(): Allows donor registration.
o updateProfile(): Allows donor to update their details.
o viewDonationRecord(): Allows donor to view their donation history.

2. Patient

 Attributes:
o patientID (unique identifier)
o name
o age
o bloodTypeRequirement
o medicalHistory
o requestStatus
 Functions:
o registerRequest(): Allows patient to register a blood request.
o trackRequestStatus(): Allows patient to track the request status.

3. Inventory

 Attributes:
o inventoryID (unique identifier)
o bloodType
o quantity
o expirationDate
 Functions:
o checkAvailability(): Checks if a specific blood type is available.
o updateInventory(): Updates inventory records.

4. Hospital

 Attributes:
o hospitalID (unique identifier)
o name
o location
o contactInfo
 Functions:
o viewDonorDetails(): Allows hospital to view available donor information.
o selectDonor(): Allows hospital to select a donor based on their details.

5. Admin
 Attributes:
o adminID (unique identifier)
o name
o contactInfo
 Functions:
o registerDonor(): Registers a donor in the system.
o manageInventory(): Handles blood inventory updates.
o facilitateBloodRequest(): Manages blood requests from hospitals.
o monitorBloodExpiry(): Checks for expired blood units.
o checkDonorEligibility(): Ensures that a donor is eligible for donation.
o sendDonationReminder(): Sends reminders to donors for future donations.

Step 3: Identify Relationships Among Objects

1. Donor and Admin: Admin handles donor registration and manages donor-related tasks,
implying an association.
2. Patient and Admin: Admin facilitates blood requests and manages inventory to serve
patients' needs, implying a dependency.
3. Inventory and Admin: Admin oversees the inventory, manages blood availability, and
tracks expiry dates, implying an association.
4. Hospital and Inventory: Hospital accesses inventory to find suitable blood types for
their patients, implying an association.
5. Hospital and Donor: Hospital may view or select donors based on blood type and
availability.

Step 4: Construct the Class Diagram


Hospital
Admin 1
 hospitalID: String
 AdminID: String  Name: String
 Name:handelB
String Faslitates  Location: String
 contactInfo: String  contactInfo: String

 registerDonor(): void
 manageInventory(): void  viewDonorDetails(): Donor
 handleBloodRequest(): void  selectDonor(): Donor
 sendReminderToDonors(): void
M  submitBloodRequest(): void
 checkBloodExpiry(): void
 verifyDonorEligblity(): Boolean
1 1

1 1 proccesses

manage manage Submit Request

M
M
Patient
Donor  patientID: String

 donorID: String
1 Inventry  Name: String Views
 bloodTypeRequirment: string
 name: String
 bloodType: String  medicalHistory: String
 InventryID: String
 contactInfo: String  contactInfo: String
 BloodType: String
 donationHistory: Listr<String>  Quantity: Int  requestStatus: Strings
 lastDonationDate: Date  ExpirationDate: Date M
 eligbiltyStatus: Bolean  registerRequest(): void
CheckAvailbilty(): bolean  updateRequest(): void
1 
 UodateInventry(): void  viewRequestStatus(): void
 removeExpiredBlood(): void
 register(): void 1
 updateProfile(): void
 viewDonationHistory(): void
 checkEligbilty(): Bolean
 recieveReminder(): void

You might also like