Medical facilities often have more patients waiting for organ transplants than t
ID: 3548918 • Letter: M
Question
Medical facilities often have more patients waiting for organ transplants than there are available organs. Suppose that you have been asked to write a computer program that selects which of several candidates should receive an available organ. What data would you want on file to be able to use in your program, and what decisions would you make based on the data? Medical facilities often have more patients waiting for organ transplants than there are available organs. Suppose that you have been asked to write a computer program that selects which of several candidates should receive an available organ. What data would you want on file to be able to use in your program, and what decisions would you make based on the data?Explanation / Answer
We need mainly information related to two categary
(1)Related to candidate who should receive organ
a)date //date on which candidate apply for organ
b)organ type or name
c)blood group of candidate
2)Related to organ available
a)organ type or name
b)blood group
working of programme:-
as we know that the organ list is small comparitive to candidates. So the programme wil maintain two list one for candidate according to information maintioned in (1) and other list who denote the available organ.
so algorithm will be:
step 1) Pick an organ from organ list untill all organ processsed once.//or apply loop for each organ
step 2)Find the candidate in candidate list who needed exact organ type with exact blood group.
step 3)If candidates found with exact organ and blood type than give the organ to who applied first. and then go to step 1.
step 4) if no candidate found with exact match then move to next organ in the organ list.