subject

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.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 02:00
Alocal reaction will occur at the site of the exposure such as irritation or damage to the skin eye or local reaction will occur at the site of the exposure such as irritation or damage to the skin ireland lounges
Answers: 3
question
Computers and Technology, 22.06.2019 20:00
Which location-sharing service offers items for users as a gaming component and also allows them to collectively link their check-ins to publish a trip? a. whrrl b. buzzd c. foursquare (this option is wrong i already tried) d. gowalla for plato
Answers: 2
question
Computers and Technology, 23.06.2019 01:00
Petrică, tânăr licean în clasa a ix-a, a primit în dar de la părinţii săi un cont bancar pentru micile sale cheltuieli curente. el este pasionat de internet banking şi îşi verifică cu grijă toate tranzacţiile efectuate. pentru creşterea securităţii tranzacţiilor online, banca îi furnizează lui petrică un număr pe care el va trebui să îl modifice, obţinând un număr tan – număr de autentificare a tranzacţiei (transaction authentication number). regula de obţinere a numărului tan este următoarea: se formează cel mai mic număr par din toate cifrele numărului furnizat de bancă. cerinţă cunoscând numărul n furnizat de bancă, să se determine numărul tan obţinut de petrică. date de intrare fişierul tan.in conţine pe prima linie numărul natural n cu semnificaţia din enunţ. date de ieşire fişierul de ieşire tan.out va conţine o singură linie pe care va fi scris numărul tan cerut. restricţii • 0 < n < 18*1018 • n are cel puţin o cifră pară • numărul tan obţinut nu poate conţine zerouri nesemnificative
Answers: 2
question
Computers and Technology, 23.06.2019 10:50
Your friend kayla is starting her own business and asks you whether she should set it up as a p2p network or as a client-server network. list three questions you might ask to kayla decide which network to use and how her answers to those questions would affect your recommendation.
Answers: 2
You know the right answer?
Create a separate class each in a .java file to represent a blood collection center, a donor, a blo...
Questions
question
History, 27.08.2019 20:10
Questions on the website: 13722362