0% found this document useful (0 votes)
14 views2 pages

OOP LAB EXER 1 - Java Language Elements

Uploaded by

crapaaud
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views2 pages

OOP LAB EXER 1 - Java Language Elements

Uploaded by

crapaaud
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

CS129L OBJECT-ORIENTED PROGRAMMING LABORATORY

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.

The program should do the ff:

1. Show the applicant the given menu

Select Team
------------------
[1] Basketball
[2] Volleyball
[3] Exit
------------------
Choice:

2. Let the applicant make the selection (1 or 2).


3. Prompt the applicant to input the following information after making the selection.

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.

Team Open Minimum Maximum


slots Age Age
Basketball 2 18 21
Volleyball 3 14 17

Store the applicant in an array if he/she is qualified to join the team.

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.

Prepared by: Antonette D. Gabriel


Date Prepared: 8/25/20

You might also like