Question: Create a small program that will allow the user to create players and then it will allow them to view them by different sorting.

Create a small program that will allow the user to create playersand then it will allow them to view them by different sorting.

Create a small program that will allow the user to create players and then it will allow them to view them by different sorting. See next slide for sample output. JAVA PROJECTS < Exercise3 src { } exercise3 {} model Player PlayerByGoalsComparator PlayerByNumberComparator + App Enter player name, 0 to stop Bugs Bunny Enter player's number 12 Enter player's number of goals 33 Enter player name, 0 to stop Daffy Duck Enter player's number 8 Enter player's number of goals 25 Enter player name, 0 to stop Sylvester Enter player's number 4 Enter player's number of goals 76 Enter player name, 0 to stop 0 Display players by 1. Name 2. Number 3. Goals 4. Exit 1 Player Bugs Bunny's number is 12 and has 33 goals Player Daffy Duck's number is 8 and has 25 goals Player Sylvester's number is 4 and has 76 goals Display players by 1. Name 2. Number 3. Goals 4. Exit 2 Player info from player.toString() Player Sylvester's number is 4 and has 76 goals Player Daffy Duck's number is 8 and has 25 goals Player Bugs Bunny's number is 12 and has 33 goals Display players by 1. Name 2. Number 3. Goals 4. Exit 3 Player Daffy Duck's number is 8 and has 25 goals Player Bugs Bunny's number is 12 and has 33 goals Player Sylvester's number is 4 and has 76 goals

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

yergetNumber t playergetGoals break case 3 Sort the players by goals Collectionssortplayers new Play... View full answer

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 Programming Questions!