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/19601260NoSorry, Not Eligible: Over Age
3Mr. C01/02/19901040NoGreat, you are Eligible.
4Mr. D05/15/1992640YesGreat, you are Eligible.
5Mr. E03/23/1992720YesSorry, Not Eligible: Not Available for minimum days.
6Mr. F12/09/20013120NoSorry, 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.