Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Program 1 Quidditch Team Manager Needs to be done in C++ CSC1720 Program 1 - Quidditch Team Manager Requirements 1. Write a program that defines
Program 1 Quidditch Team Manager
Needs to be done in C++
CSC1720 Program 1 - Quidditch Team Manager Requirements 1. Write a program that defines a struct to store data about a quidditch player: player's name (first only) position (chaser, keeper, beater, seeker) number of minutes played total number of points scored (10 for goals with quaffle, 30 for snitch capture) total number of dismounts (knocked off broom by bludgers thrown by beaters) total number of goals blocked (made by keeper) total number of bludgeons (made by beaters) All stats are cumulative for a quidditch season. Declare an array of structs to hold information for 10 quidditch players. Details for the non-magical version of the game can be found at: hitps://www.comelleollege.edulintramurals/PDFsiQuidditch\%20Rules.pdef/20for\%20IM.pdf. A sample datafile can be found at: /home/faculty/ktitus/csc1720public/quiddata.txt 2. Your program must include a function to input data from a file specified by the user when the program begins. The input file should include player data for exactly 10 players in the order listed above, one player at a time. If a category is not applicable to a player due to their position, the file will indicate a 0 for that category. A value of 0 should then be output for that category. 3. Your program should also include a function to display data about a single player, a function to display data about all players, a function to sort the array by number of minutes played (highest to lowest) and a function to output the top scoring player's name with their score. 4. Your program should be menu driven. Include all menu choices mentioned in \#3 above as well as an option to quit. If the user chooses to quit, the user should then be asked whether they want to output the table with all players' data to a file. General Instructions and Additional Information: 1. This program is an individual effort event. Please remember that you should not use the code of others. Every keystroke in your program must be your own. You may not collaborate on the details of your solution and may not share your code with or show your code to anyone else. You may ask classmates how to resolve specific compiler errors, but you may otherwise only get help from the SI, other CS tutors, or me. Any help you receive must be described in a comment. 2. Be sure your program includes a comment block at the top that includes your name, the date, and a brief description of what the program does. Include at the end of that comment block any notes to me about things you know that don't work or any other relevant information. Any code that doesn't compile, but that you want me to see, should appear commented out in the body of the program. 3. Part of your project grade will be based on style, readability, and documentation. Use indentation, white space, and other stylistic techniques to make your code easier to read. Adhere to the stylistic guidelines used in the textbook. Use single line or multi-line comments in the body of your functions, as appropriate. It's always good to explain your thought process: what seems obvious to you isn't always obvious to someone else reading your code. Use descriptive variable names and, where appropriate, constants. Sample output for display all, sorting and top scorer menu options with quiddata . txt data file: Hernione is the top scoring player with 170 points. Alphabetized Quidditeh Tean RosterStep 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