OOP LAB EXER 1 - Java Language Elements
OOP LAB EXER 1 - Java Language Elements
Exercise no. 1
Java Language Elements and Netbeans IDE
Objective/s: To familiarize you with the Java syntax and the use of the Netbeans IDE.
XYZ Team Membership application for a sports league is needed for the upcoming sportsfest. The league is
composed of the volleyball team and basketball team. Each team is recruiting members to fill-in their open slots.
Write a Java Console application program that will be used for the recruitment of the team members.
NOTE: Use only one class for this exercise. OOP should not be applied yet.
Select Team
------------------
[1] Basketball
[2] Volleyball
[3] Exit
------------------
Choice:
Enter name:
Enter age:
4. Check if the applicant is qualified to join his/her chosen team based on the required age and the
availability of the slot. Refer to the table below.
5. Display a message that will tell if the applicant has successfully joined the team or not.
Example:
Applicant is qualified ➔ “Welcome to the Basketball Team!”
Applicant is not qualified ➔ “Sorry, you are not qualified!”
6. Let the Applicant know when the team has already reached the required number of members.
Example: When the Basketball team has already recruited 2 Applicants, display:
“Basketball team is no longer accepting applicants.”
7. When the Exit option is selected, display the name of all successful applicants of each team then
terminate the program.