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.
The program should do the ff:
- Show the applicant the given menu
Select Team
------------------
[1] Basketball
[2] Volleyball
[3] Open Slots Left
[4] 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.
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.”
- When the user chooses 3 from the menu at any given time, display the names and total number of members in each team. This requires the use of an array. Every time an applicant is accepted in the team, store the name in the array.
Example:
Current number of recruits:
Basketball team = 1
John
Volleyball team = 2
Arya
Dany
- The program ends when the Exit option is selected.
Aucun commentaire:
Enregistrer un commentaire