Language: APlayer class should be derived from the TournamentMember class. It holds additional prop- erties such as number, position, number of goals scored, and whether the player is left-footed or right-footed. For each property appropriate setter (except the number of goals scored) and getter methods need to be provided as inline methods, and it should not be possible to manipulate data directly. An appropriate constructor to set all properties on creation should be provided as well as a copy constructor that creates a correct copy of a player, and a destructor. Also all construc- tors and the destructor should print a short informational message on the screen such that you can see which is being called when. Also the following methods are required: • a method which prints all the information of a player on the screen, • a method which increments the number of goals scored by a player. Add code to the files TournamentMember.h, TournamentMember.cpp, and write a testing program named testPlayer.cpp that tests the functionality of the Player class. Create three players with different properties. Then move all players to the location "Hamburg". The needed data can be initialized in the code from the main () function.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
Language: C++
APlayer class should be derived from the TournamentMember class. It holds additional prop-
erties such as number, position, number of goals scored, and whether the player is left-footed or
right-footed. For each property appropriate setter (except the number of goals scored) and getter
methods need to be provided as inline methods, and it should not be possible to manipulate data
directly. An appropriate constructor to set all properties on creation should be provided as well
as a copy constructor that creates a correct copy of a player, and a destructor. Also all construc-
tors and the destructor should print a short informational message on the screen such that you
can see which is being called when.
Also the following methods are required:
• a method which prints all the information of a player on the screen,
• a method which increments the number of goals scored by a player.
Add code to the files TournamentMember.h, TournamentMember.cpp, and write a testing
program named testPlayer.cpp that tests the functionality of the Player class. Create three
players with different properties. Then move all players to the location "Hamburg".
The needed data can be initialized in the code from the main () function.
Transcribed Image Text:Language: C++ APlayer class should be derived from the TournamentMember class. It holds additional prop- erties such as number, position, number of goals scored, and whether the player is left-footed or right-footed. For each property appropriate setter (except the number of goals scored) and getter methods need to be provided as inline methods, and it should not be possible to manipulate data directly. An appropriate constructor to set all properties on creation should be provided as well as a copy constructor that creates a correct copy of a player, and a destructor. Also all construc- tors and the destructor should print a short informational message on the screen such that you can see which is being called when. Also the following methods are required: • a method which prints all the information of a player on the screen, • a method which increments the number of goals scored by a player. Add code to the files TournamentMember.h, TournamentMember.cpp, and write a testing program named testPlayer.cpp that tests the functionality of the Player class. Create three players with different properties. Then move all players to the location "Hamburg". The needed data can be initialized in the code from the main () function.
Expert Solution
steps

Step by step

Solved in 7 steps with 6 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY