Question: Write a Java program that executes user - defined exception handling on a Scholarship Eligibility Check Program for the potential candidates. The program should prompt

Write a Java program that executes user-defined exception handling on a Scholarship
Eligibility Check Program for the potential candidates. The program should prompt
users to input their details, such as name, residency status, date of birth, first
language, phone number, and email address. It should validate each input against
eligibility criteria and throw specific exceptions such as InvalidInputException using
the throws and throw keyword with clear error messages if any criterion is not met.
Finally, the program should display whether the student is eligible for the scholarship
or not based on the entered information.
Use all 5 keywords discussed in the Lecture.
Eligibility Criteria:
Candidate should be a resident of Ireland.
Candidates date of birth should be in DD/MM/YYYY format.
Based on the candidates date of birth, their age should be between 18 and 30
years.
Candidate's first language should be English.
Phone number should be in 08X-XXXXXXX format.
Email should be in proper format like xyz@example.com.
Prompt the user to enter their information, including:
Name
Residency Status (Yes/No)
Date of Birth
English as First Language (Yes/No)
Phone Number
Email Address
Implement exception handling to ensure that the entered information meets the
eligibility criteria. If any criterion is not met, throw an appropriate exception with an
informative error message.
Display a message indicating whether the student is eligible for the scholarship or not
based on the entered information.Hilme:
Write a Java program that executes user - defined

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Accounting Questions!