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, 23.06.2019 09:00
The first screen you see when you open word2016 what is called?
Answers: 1
question
Computers and Technology, 23.06.2019 09:30
You have been supporting csm tech publishing's windows server 2016 server network for over a year. the office has two windows server 2016 servers running active directory and a number of other roles. management has informed you that a small sales office is opening in the same building three floors up. the sales manager wants to install a sales application on a server located in the sales office. this server will have limited physical security because there's no special room dedicated for it, which means it will be accessible to non-it personnel and visitors. you're considering installing windows server 2016 server core on the new server because accessing its console regularly probably won't be necessary, and this server will be managed from one of the other csm tech publishing servers. what are the benefits and drawbacks of using server core for this branch office? what are some things you should do to set up this server management environment?
Answers: 1
question
Computers and Technology, 24.06.2019 04:30
Which of the following terms refers to a collection of different types of software that share the goal of infiltrating a computer and making it do something? a- malware b- virus c- spyware d- trojan horse
Answers: 2
question
Computers and Technology, 24.06.2019 08:30
Why might you choose to create a functional resume
Answers: 1
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
Questions on the website: 13722367