Problem StatementUsing C++ You are to develop a program to read Baseball player statistics from an input file. Each player should be storedin a Player object. Therefore you need toreusethe Player classfrom program 1. Each player will have a first name last name a position (strings) and a batting average (floating point number).This program adds on to the requirements for Program #1. Please see that assignment. This will read in the same type of player data from an input file and write the results to an output file.
New RequirementsYou are to reuse yourPlayerclass (or my version) from Program1. You are to implement aPlayerList data structure/data type that stores players ina Linked Liststructure (internal to the class). Store the players in the list in alphabetical order (By lastname use firstnameto further distinguishin the event there ismore than 1 player with the same last name).You will need to add the class PlayerList and the class Node to facilitate the linked list operations.You must implement the following operations on your PlayerList along with any other utility functions you might need. You may also need to add operations to the class Player to facilitate comparisons since Player data is private.
OperationsDefault Constructor
Destructor
Add a Player to the List
Iterate through the List so that you can get each player
Clear out the list to make it empty
Test if a list isEmpty
Get the size of the list
Find a Player in the List (get)-Put a couple of hard-coded callsin your main programto make
sure thisfeature works.
Summary of OperationPrompt the user for the input and output file names. DO NOT hardcode file names into your
program.
Open input file
Read each player andaddthemtoyour PlayerList
Keep track of the number of players inthe list
Store the players in the list in alphabetical order (lastname then firstname in the event of two people with the same last name).You should be adding them in between other nodes as appropriate
Test your find operation a couple of times. This can be hardcoded into your program. You do not have to prompt the user for players unless you wish to. Just make sure you test for players that exist and that do not
Open an output file
Write each player fromthe list intothe output file along with any other output required by the assignment