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

A basketball lineup is 5 players- 2 guards, 2 forwards and 1 center. A basket ba

ID: 3534963 • Letter: A

Question

A basketball lineup is 5 players- 2 guards, 2 forwards and 1 center.


A basket ball team is 12 players - 4 guards, 4 forwards and 4 centers.


Declare a base class, Player. Player has 2 private data members: name, a string of arbitrary length, and number, an integer; the corresponding public accessors and mutators; and two pure, public virtual methods, say, and position. A Player has two constructors: a default constructor and a one-parameter constructor.


Derive the classes Forward, Center, and Guard from Player. The derived class overrides the Player class's virtual methods. The say method writes the player's name, position, and number to an output stream; the position method returns the player's position.


A basket ball team has 12 players: 4 guards, 4 forwards and 4 centers.


Declare a class Team. A Team has at least 3 private members: team name, a string of arbitrary length, population, an integer, player, an array of 12 pointers to Player. Team has one default constructor, a copy constructor, an overloaded assignment operator and a destructor. Team defines an add method that adds a player to the Team. The add method makes sure that a player's number is unique and makes sure that a team has 4 centers, 4 guards and 4 forwards. Team defines a LineUp method. The LineUp method returns a line-up of 5 players , 2 guards, 2 forwards, and 1 center. The players in a line-up must be unique. Write an overloaded LineUp method that writes a line-up to an output stream.





If possible, please email to batboy213@ymail.com

Explanation / Answer

Please rate with 5 stars :)


Here is the code:


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