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 10:10
3. bob is arguing that if you use output feedback (ofb) mode twice in a row to encrypt a long message, m, using the same key each time, it will be more secure. explain why bob is wrong, no matter what encryption algorithm he is using for block encryption (15 points).
Answers: 3
question
Computers and Technology, 22.06.2019 11:30
Andrina writes letters that are regularly sent to hundreds of her company’s customers. because of this, she would like for the mail merge command to be in her quick access toolbar, and she wants it to be the first button on the left. what should andrina do to place the mail merge button there?
Answers: 1
question
Computers and Technology, 23.06.2019 13:30
Best laptops for college [$100-$500 range]?
Answers: 2
question
Computers and Technology, 23.06.2019 16:30
20 points archie wants to use a reflector as he photographs a newlywed couple. what would he consider in his choice? a. shadow and sunny b. homemade and professional c. lamps and boards d. incident and reflected e. neutral density and enhancement
Answers: 3
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
Mathematics, 02.06.2021 20:10
question
Mathematics, 02.06.2021 20:10