Create a program that allows you to create a fantasy football roster based on the existing list of available players. Your team can only have 5 players, so create an array that can store 5 possible players. Prompt the user to pick 5 players to add to their team. If the player is available in the list of availablePlayers, then add that player to the users array, and remove that player from the availablePlayers list. Then prompt the user to pick another player. Once all five players have been added, then print the list in the console. Create a search method to find the index at which the player is located in the availablePlayers list so you can remove the player, and make sure that they are an eligible pick. Here is a sample run of the program: Enter Player you would like on your team: Cam Newton Great! That player is added to your team! Enter Player you would like on your team: Travis Kelce Great! That player is added to your team! Enter Player you would like on your team: Alvin Kamara Great! That player is added to your team! Enter Player you would like on your team: Alvin Kamara That player is not available, please pick another player. Enter Player you would like on your team: Patrick Mahomes Great! That player is added to your team! Enter Player you would like on your team: Mike Evans Great! That player is added to your team! Your team is: Cam Newton Travis Kelce Alvin Kamara Patrick Mahomes Mike Evans

Programming Logic & Design Comprehensive
9th Edition
ISBN:9781337669405
Author:FARRELL
Publisher:FARRELL
Chapter6: Arrays
Section: Chapter Questions
Problem 5GZ
icon
Related questions
Question

Create a program that allows you to create a fantasy football roster based on the existing list of available players.

Your team can only have 5 players, so create an array that can store 5 possible players.

Prompt the user to pick 5 players to add to their team. If the player is available in the list of availablePlayers, then add that player to the users array, and remove that player from the availablePlayers list. Then prompt the user to pick another player. Once all five players have been added, then print the list in the console.

Create a search method to find the index at which the player is located in the availablePlayers list so you can remove the player, and make sure that they are an eligible pick.

Here is a sample run of the program:

Enter Player you would like on your team: Cam Newton Great! That player is added to your team! Enter Player you would like on your team: Travis Kelce Great! That player is added to your team! Enter Player you would like on your team: Alvin Kamara Great! That player is added to your team! Enter Player you would like on your team: Alvin Kamara That player is not available, please pick another player. Enter Player you would like on your team: Patrick Mahomes Great! That player is added to your team! Enter Player you would like on your team: Mike Evans Great! That player is added to your team! Your team is: Cam Newton Travis Kelce Alvin Kamara Patrick Mahomes Mike Evans

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 4 images

Blurred answer
Knowledge Booster
Array
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning