Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Help with this Programming Problem for an Intro to Java class? ------------------------------------------------------------------------------------------------------------------------------------------------------ The volleyball coach at Verde Valley High School would like some help managing

Help with this Programming Problem for an Intro to Java class?

------------------------------------------------------------------------------------------------------------------------------------------------------

image text in transcribed

image text in transcribed

image text in transcribed

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 op 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." ening a roster file, th en 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 Rachael Adams Foluke Akinradewo Kayla Banwarth Michelle Bartsch Krista Vansant Courtney Thompson Kelly Murphy Lauren Gibbemeyer Alexis Crimes Tori Dixon Nicole Fawcett Alisha Glass Natalie Hagglund Kim Hill Cursty Jackson Attack Stat 3.36 4.81 2.98 0.28 2.78 0.59 1.15 2.25 3.89 0.92 4.01 1.96 2.49 1.53 0.69 Blocking Stat 1.93 1.14 0.50 1.42 0.86 0.93 0.58 0.50 1.34 1.62 0.61 1.55 0.52 1.76 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 If the user chooses 5) Quit, then the program should exit

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2010 Barcelona Spain September 2010 Proceedings Part 1 Lnai 6321

Authors: Jose L. Balcazar ,Francesco Bonchi ,Aristides Gionis ,Michele Sebag

2010th Edition

364215879X, 978-3642158797

More Books

Students also viewed these Databases questions

Question

Help with this Programming Problem for an Intro to Java class?...

Answered: 1 week ago