Question
Project Challenge: Verde Valley Volleyball The volleyball coach at Verde Valley High School would like some help managing her team. She is looking for a
Project Challenge: Verde Valley Volleyball
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 youre 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.
Roster 1:
Rachael Adams 3.36 1.93 Kim Hill 1.53 1.76 Tori Dixon 0.92 1.62 Alisha Glass 1.96 1.55 Cursty Jackson 0.69 1.44 Michelle Bartsch 0.28 1.42 Alexis Crimes 3.89 1.34 Foluke Akinradewo 4.81 1.14 Courtney Thompson 0.59 0.93 Krista Vansant 2.78 0.86 Nicole Fawcett 4.01 0.61 Kelly Murphy 1.15 0.58 Natalie Hagglund 2.49 0.52 Kayla Banwarth 2.98 0.5 Lauren Gibbemeyer 2.25 0.5
Roster 2:
Rachael Adams 3.36 1.93 Kim Hill 1.53 1.76 Tori Dixon 0.92 1.62 Alisha Glass 1.96 1.55 Cursty Jackson 0.69 1.44 Michelle Bartsch 0.28 1.42 Alexis Crimes 3.89 1.34 Foluke Akinradewo 4.81 1.14 Courtney Thompson 0.59 0.93 Krista Vansant 2.78 0.86 Nicole Fawcett 4.01 0.61 Kelly Murphy 1.15 0.58 Natalie Hagglund 2.49 0.52 Kayla Banwarth 2.98 0.5 Lauren Gibbemeyer 2.25 0.5 Molly Kreklow 1.65 0.73 Jordan Larson 4.54 1.53 Karsta Lowe 3.70 1.11
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started