Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a program that stores the following data about a soccer player in a struct

ID: 3698367 • Letter: W

Question

Write a program that stores the following data about a soccer player in a structure named Player. (c++ program)

name: a string that stores player’s name

number: an integer that stores player’s number

address: a string that stores player’s address (3rd field in the given file)

city: a string that stores player’s city

state: a string that stores player’s state

zip: an integer that stores player’s ZIP code

phone: an integer that stores player’s phone number

date: an integer that stores player’s contract date

points: an integer that stores points scored by player

The program should use an array of 10 structures named team. Each element is for a different player on the team. The program should have a menu-driven user interface containing the following choices. Write a function for each step.

readData. Read players’ info from file team.txt to the array.

displayData. Display all the data stored in the array.

getAverage. Calculate and display the average of points earned by the team members.

getHighest. Display (print) all the info of the player who has earned the most points.

getTarget. Return (by references) all the info of the player whose number is num.

Function getTarget should accept an array as its first argument and an integer as its second argument. The second argument should be the number of target player. The function should return all the info of the first occurrence of the given number. Use references to return all the player’s info fields.

team.txt =

Explanation / Answer

Hi below i have written the code for your reference :)

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote