Question: Program assignment: Create a C++ application to assist users in dealing with a text file containing football player data. This application will focus on file

Program assignment: Create a C++ application to assist users in dealing with a text file containing football player data. This application will focus on file handling and using structs to model real-world data. Learn to manipulate arrays of structs in C+4, reinforcing concepts such as data input/output, searching, updating, and saving data Requirements: 1. Define a struct named FootballPlayer to store a player's data: name, position, touchdowns, catches, passing yards, receiving yards, and rushing yards. 2. Declare an array named players of type FootballPlayer with 10 elements. 3. Implement a function named inputData that reads player data from a text file (players_data.txt) and stores it in the players array. 4. The text file format will be as follows, with each player's data on a new line and fields separated by commas: Name, Position, Touchdowns,Catches,PassingYards,ReceivingYards,RushingYards 5. Implement a function named outputData that displays the data of all players stored in the players array. 6. Implement a function named searchPlayer that searches for a player by name in the players array and returns the index of the player. 7. Implement a function named updatePlayer that allows updating the data of a player given their array index. 8. Implement a function named saveDataToFile that writes the current data of all players in the players array back to the file, overwriting the existing data. 9. Create a menu-driven interface that allows the user to choose between inputting data, displaying data, searching for a player, updating a player's data, and saving data to the file. Assignment Deliverables: * Source code implementations required for submission must include comments (name, date, course, assignment, instructor and description of program and meaningful variables.) * Use proper prompts and labels for all output. * Ensure your code is well-commented to explain key functionalities and logic. Source code must compile and produce correct code to get full credit. If code does not compile, 0 points will be given. e Submit source code as P1_LastName_FirstInitial.cpp. * Asample players_data.txt file used for testing. * Submit a screenshot that shows the source code, the result of its compilation, and the outcome of running the program. menor nen tie Tae 1. Input Data . Display Data Search Player Update Player Data Save Data to File Exit eal choice: |

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mathematics Questions!