Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Soccer Scores Write a program that stores the following data about a soccer player in a structure: Player s Name Player s Number Points Scored
Soccer Scores
Write a program that stores the following data about a soccer player in a structure:
Players Name
Players Number
Points Scored by Player
The program should keep an array of of these structures. Each element is for a different
player on a team. When the program runs it should ask the user to enter the data
for each player. It should then show a table that lists each players number, name, and
points scored. The program should also calculate and display the total points earned by
the team. The number and name of the player who has earned the most points should
also be displayed.
Input Validation: Do not accept negative values for players numbers or points scored.
Design a class named PlayerInfo that holds the following attributes:
Declare one attribute called name, the MyString data type that holds the players name.
Declare one attribute called number, the integer data type that holds the players number.
Declare one attribute called pointScore, the integer data type that holds the players point score.
Design a class named PlayerTeam that holds the following attribute:
Declare one attribute called playerTeam, the static list of PlayerInfo data type that holds the player infomation.
Declare one attribute called numOfPlayers, the integer data type that holds the number of players in the team.
Implement overloaded constructors functions. Default constructors, constructors with arguments, and copy constructors functions.
Implement the destructors function.
Implement mutators, accessors, and member functions in your code.
Overload operators in your classes.
Validate players numbers and points scored using a catch throw instance.
Implement an Options Menu in the main program with the following operations:
Enter the players data.
Search the players data by name.
Show the total point earner by the team.
Show the player data that earn the most point.
Show the list of player teams.
Quit of program.
The solution must contain the following:
C Code.
Code execution.
Descriptive Table.
Diagram UML.
CRC cards.
Step 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