Computers and Technology

Create a separate class each in a .java file to represent a blood collection center, a donor, a blood donation.
The blood collection center has a name and a list of eligible donors. Each donor has a name,
blood type and contact number. The donor has also single list to keep track of all his/her blood
donations’ types at specific dates. Initially the list is empty.
Types of blood donations are:
1. Whole Blood Donation: it is the most flexible type of donation. It can be transfused in its
original form, or used to help multiple people when separated into its specific
components of red cells, plasma and platelets.
Ideal blood types: All blood types.
Waiting period: 56 days.
2. Power Red Donation: during a Power Red donation, the donor give a concentrated dose
of red cells only.
Ideal blood types: O positive, O negative, A negative, and B negative.
Waiting period: 112 days, up to 3 times/year.
3. Plasma Donation: plasma is a part of the blood used to treat patients in emergency
situations. Plasma can be given to anyone regardless of their blood type.
Ideal blood types: AB positive, AB negative.
Waiting period: 28 days, up to 13 times/year.
4. Platelet Donation: platelets are tiny cells in blood that form clots and stop bleeding.
Platelets are most often used by cancer patients and others facing life-threatening
illnesses and injuries.
Ideal blood types: A positive, A negative, B positive, O positive, AB positive and AB
negative.
Waiting period: 7 days, up to 24 times/year.

Note:
ď‚· Waiting period is the period that a donor should wait after the donation in order to be
capable for giving another donation.
Create a class for each blood donation type and define necessary attributes and methods.
Each class must store its state in private variables. All required access is done through public
methods. The public methods which you must implement allow the user to do the following:
- Initiate, get and set the state of any created object.
- Create a new blood collection center and give it a name.
- Add a donor to the center if he/she is not already in the donors list.
- For each donor, list the ideal blood donation types based on the donor’s blood type.
- For each donor, determine whether the donor is capable for a new donation based on
the most recent donation date among all his/her past donations records, the given
waiting period constraints in each respective blood donation type and the total number
of donations given by him/her during the last year (i. e. the last 365 days).
- Add a blood donation for a donor assuming all given donor’s data is correct in time
frame with respect to his/her past donation records (i. e. ordered chronologically).
- Dump the center structure into text. The text should include center name and donors
list which shows their blood donations details along with a status field that shows
whether the donor is capable for a new blood donation or not.
- Save the information of the blood collection center into a file.
If the user attempts do an operation that will violate the state of objects, you must check for it.
In that case, the operation should be ignored and the application should give back an error
message.

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 00:10, witerose701
Write a function so that the main0 code below can be replaced by the simpler code that calls function mphandminutes tomiles0. original main0 int main) l double milesperhour-70.0; double minutestraveled = 100.0; double hourstraveled; double milestraveled; hourstraveled = minutestraveled / 60.0; milestraveled = hourstraveled * milesperhour; cout < "miles" 2 using namespace std; 4 /* your solution goes here/ 6 int maino 1 test passed 7 double milesperhour 70.0 all tests passed 8 double minutestraveled 100.0; 10 cout < < "miles: " < < mphandminutestomiles(milesper-hour, minutestraveled) < < endl; 12 return 0; 13
Answers: 1
image
Computers and Technology, 23.06.2019 02:30, paolaviviana
Experimental data that is expressed using numbers is said to be
Answers: 1
image
Computers and Technology, 23.06.2019 17:10, madams4450
Ac++an of of pi. in , pi is by : pi = 4 – 4/3 + 4/5 – 4/7 + 4/9 - 4/11 + 4/13 - 4/15 + 4/17 . ., to pi (9 ). , if 5 to pi, be as : pi = 4 - 4/3 + 4/5 - 4/7 + 4/9 = 4 – 1. + 0.8 - 0. + 0. = 3.. atoofbe to pi?
Answers: 2
image
Computers and Technology, 24.06.2019 05:00, alfarodougoy8lvt
Who is most likely be your target audience if you create a slide presentation that had yellow background and purple text
Answers: 2
Do you know the correct answer?
Create a separate class each in a .java file to represent a blood collection center, a donor, a blo...

Questions in other subjects:

Konu
Social Studies, 25.04.2021 14:00
Konu
Mathematics, 25.04.2021 14:00
Konu
Mathematics, 25.04.2021 14:00