Reference no: EM132200479
Write a GUI-based program that simulates the selection of ball team. You will retrieve the data from a text file containing 10 lines. On each line will be the name of a player.
Your program needs to read the file and display 10 checkboxes representing the 10 players. A text area will display the team, made up of the C being selected.
A basketball team has five players. Your program should not allow the user to change his or her selection after the team has five players.
Every time the user checks or unchecks a checkbox the team in the text area should be updated accordingly. Provide buttons for the following:
One button, when clicked, displays how many players are currently on the team. Another button, when clicked, displays how many players remain unselected.
For this, you should design and code a separate (non-GUI) class encapsulating the player selection process, then instantiate an object of that class inside your GUI class and call the various methods as needed.