Answer:
Explanation:
A heart transplant is a surgical procedure that replaces the person’s heart with a donor heart. A person may require a heart transplant for several reasons including congenital, arterial and muscle diseases or for unforeseen reasons such as accidents or viral infections.
The donor heart is matched to the recipient by blood type. More variables are also used to decide which recipient receives a heart if there are not enough hearts available for all recipients waiting for a transplant. The variables included in the decision may include the recipient state of health, cause of the heart condition and the urgency of the transplant.
The main goal of this project is for you to write a matching function that receives as a parameter the number of available hearts for transplant and will output all the recipients ranked in order of precedence.