subject

The volleyball coach at Verde Valley High School would like some help managing her team. She is looking for a piece of software to help her see who her best players are, and build scrimmage teams that are well balanced. She has a team roster stored in a text file that contains the names of her players (first name, then last name separated by a space), and their stats as attacks per set (double) followed by blocks per set (double). Higher stats are better. Each data field is separated by a space. For example, one line would look like: Gabrielle Reece 4.57 1.79

DIRECTIONS

The coach would like the program to do the following:

Present a menu with the following options:

1) Open a roster
2) List top 3 attackers
3) List top 3 blockers
4) Make and display scrimmage teams
5) Quit

If the user chooses 1) Open a roster, then the program should ask for the filename of the roster, then read the data from that file into an array.

If the user chooses 2) List top 3 attackers, then the program should determine and list the names and stats of the players with the top 3 attack stats.

If the user tries to list the top attackers without first opening a roster file, then the program should respond with the error message "Please open a roster."

If the user chooses 3) List top 3 blockers, then the program should determine and list the names and stats of the players with the top 3 stats for blocks.

If the user tries to list the top blockers without first opening a roster file, then the program should respond with the error message "Please open a roster."

If the user chooses 4) Make and display scrimmage teams, then the program should divide the roster into 6-person scrimmage teams, and display the list of players on each team.

If the user tries to make and display scrimmage teams without first opening a roster file, then the program should respond with the error message "Please open a roster."

Your program will need to be able to divide a roster into the maximum possible number of teams. For example, a roster with 18 players on it would be divided up into three different scrimmage teams with six players each. A roster file will always contain a list of between 12 and 25 players, and a scrimmage team always has six players.

The coach would like the teams to be reasonably well balanced. To do this, your program should make up half of each scrimmage team by distributing the best attackers to each of the different teams. For example, a roster with 12 players on it would be divided up into two scrimmage teams, and three of the top six attackers would be assigned to each of the two scrimmage teams. After the top attackers have been assigned to make up half of each scrimmage team, then the top blockers (from the remaining unassigned players) would similarly be assigned (three to each scrimmage team in this example) to make up the other half of each team.

As a more detailed example, consider the following roster:

Name

Attack Stat

Blocking Stat

Rachael Adams

3.36

1.93

Foluke Akinradewo

4.81

1.14

Kayla Banwarth

2.98

0.50

Michelle Bartsch

0.28

1.42

Krista Vansant

2.78

0.86

Courtney Thompson

0.59

0.93

Kelly Murphy

1.15

0.58

Lauren Gibbemeyer

2.25

0.50

Alexis Crimes

3.89

1.34

Tori Dixon

0.92

1.62

Nicole Fawcett

4.01

0.61

Alisha Glass

1.96

1.55

Natalie Hagglund

2.49

0.52

Kim Hill

1.53

1.76

Cursty Jackson

0.69

1.44

Given the above roster with 15 players, your program should make and display the follow two scrimmage teams:

Team 1:

  Foluke Akinradewo

  Alexis Crimes

  Kayla Banwarth

  Kim Hill

  Alisha Glass

  Michelle Bartsch

Team 2:

  Nicole Fawcett

  Rachael Adams

  Krista Vansant

  Tori Dixon

  Cursty Jackson

  Courtney Thompson

If the user chooses 5) Quit, then the program should exit.

Things to think about when you’re designing and writing this program:

Break this problem down into a set of simpler problems - each of which needs to be solved in order to solve this whole problem.
Design a solution for each of these smaller problems.
Combine the solutions to the smaller problems into a solution for this problem.
Consider whether one or more user-defined classes might help you solve this problem. If so, then what attributes (variables) and operations (methods) should each of these classes have.
Consider whether or not your main class can benefit from any additional methods.
Spend some time choosing your variable and method names carefully. Names should be descriptive.
Take advantage of variables to name values whose purpose may not be obvious.
Take advantage of variables by breaking any complex expressions down into a set of simpler expressions and storing the intermediate results in variables.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 20:00
Which location-sharing service offers items for users as a gaming component and also allows them to collectively link their check-ins to publish a trip? a. whrrl b. buzzd c. foursquare (this option is wrong i already tried) d. gowalla for plato
Answers: 2
question
Computers and Technology, 23.06.2019 00:30
Quic which one of the following is the most accurate definition of technology? a electronic tools that improve functionality b electronic tools that provide entertainment or practical value c any type of tool that serves a practical function d any type of tool that enhances communication
Answers: 1
question
Computers and Technology, 23.06.2019 11:50
While preforming before operation pmcs, you notice the front right tire appears slightly under-inflated. what is the proper action?
Answers: 3
question
Computers and Technology, 24.06.2019 08:00
Java the manager of a football stadium wants you to write a program that calculates the total ticket sales after each game
Answers: 1
You know the right answer?
The volleyball coach at Verde Valley High School would like some help managing her team. She is look...
Questions
question
Mathematics, 22.05.2020 01:06
question
Mathematics, 22.05.2020 01:06
Questions on the website: 13722360