The Red Cross Organization is recruiting volunteers for a mission in South Africa to set up medical camps providing correctively eye surgeries to people in need. They received hundreds of applications from nurses who want to volunteer for this mission. The applicants were asked to mention their name and date of birth along with their other particulars like working experience, availability, and previous experience working in South Africa.
Program
Write a program to determine if an applicant qualifies to take part in the mission. If the application does not qualify, indicate the reason why they did not qualify.
Requirements
The eligibility criterion is as follows:
- An applicant must be between 25 and 40 years of age.
- An applicant must have a minimum of 10+years of years of experience if they have no previous experience. However, if the applicant has worked in South Africa before, they would only need a minimum of 5 years of experience.
- An applicant must be available for a minimum of 30 days for the mission.
Evaluate the eligibility criteria from top to bottom. If the applicant fails any one criteria, they are not eligible.
Input
- Name of the applicant.
- Date of birth of the applicant in DD/MM/YYYY format.
- Working experience in years rounded to the nearest integer.
- Applicant availability in days.
- Have any prior experience in South Africa?
Output
- The applicant is qualified or not for the mission.
Testcase
No. | Name | Date of Birth | Experience | Availability | Prior Experience | Outcome |
1 | Mr. A | 12/03/1986 | 5 | 30 | No | Sorry, Not Eligible: Less Experience |
2 | Mr. B | 10/02/1960 | 12 | 60 | No | Sorry, Not Eligible: Over Age |
3 | Mr. C | 01/02/1990 | 10 | 40 | No | Great, you are Eligible. |
4 | Mr. D | 05/15/1992 | 6 | 40 | Yes | Great, you are Eligible. |
5 | Mr. E | 03/23/1992 | 7 | 20 | Yes | Sorry, Not Eligible: Not Available for minimum days. |
6 | Mr. F | 12/09/2001 | 3 | 120 | No | Sorry, Not Eligible: Under Age |
Instructions
- Prompt the application to enter the input fields via the command prompt/shell or initialize it in variables.
- Write the logic to compute the eligibility of the applicant.
- Display if the applicant is qualified or not along with the reason for disqualification if applicable.
Improvements
Extend the program to report all the factors that lead to a disqualification for the application the mission and not just the first factor. The following are some of the examples:
- The application can be disqualified due to being underage (< 25) and not having enough experience (<10). Outcome: Sorry, Not Qualified: Under Age + Less Experience
- The application can be disqualified due to being overage (> 40), being not available for >= 30 days and having less experience (<10). Outcome: Sorry, Not Qualified: Overage Age + Less Experience + Not Available for minimum days.