Application

You are to write an application that creates and processes a linked list of players. Again, the application must be in its own file. Be sure to include the playenh and linkedList.cpp in the application. When the application begins it should read the values into the objects from a file player.dat which can be found in the public directory. The program should ask the user how many players there are so it knows how many to read. These objects should then be read one a time and inserted into the linked list. The program should then display a menu that will allow the user to: the list, locate an item, remove an item, print the list, calculate all the team batting averages, and record an at bat for a given player. Each activity in the application should be performed using a function. The minimum functions used are

  • initializeList - requests the file name and number of players in the file fi-om the user. It reads each player object and inserts it into the list.
  • printList - uses the << operator for the linked list to print out the list
  • locateltem - requests a player number to be found. It assigns the number to a player instance and then attempts to find the instance. If successful, the player object should be displayed. If not successful, failure should be reported.
  • calcAverages - For each player in the list, the fimction retrieves a player, calculates the batting average for the player and places the object back in the list.
  • addAtBats - requests a player number. It assigns the number to a player instance and then attempts to find the instance. If found, it requests the result of the bat (H, B, K, N) and records the at bat. It then puts the updated object back in the list. If not found, report failure.
  • removeltem - requests a player number. It assigns the number to a player instance and then attempts to remove the instance. The function should report success or failure. All display of results and errors should be done in the application.
Academic Honesty!
It is not our intention to break the school's academic policy. Projects posted are only used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly fill out the form. Please provide a valid email address and we'll get back to you in less than 24 hours. We will be sending an invoice through PayPal upon confirmation. We are a non profit organization however we need an amount to keep this organization running, and to be able to complete our research and development.