Answered step by step
Verified Expert Solution
Question
1 Approved Answer
This week you will start on an NFL Football Team Program. For starters, you will create an abstract base class called player. This will
This week you will start on an NFL Football Team Program. For starters, you will create an abstract base class called player. This will have attributes of name and playerID (number), methods getName and getPlayerID, and abstract methods getPlayerPosition, play, and toString (which returns a string with the player name, number, position, etc.) You will create subclasses (all of which extend from player) for Offense QuarterBack Wide Receiver o Tight End Running Back o Offensive Lineman Defense o Defensive Lineman o Linebacker o Defensive Back Special Teams Kicker Holder Punter Returner (Kick, Punt) Create a menu driven program that will allow the user to add players to a team (use only one data structure to hold your players). Add at least one player from each category to your order and then print out the list of players on a team (name, number, position, description, etc.). Display the number of players on the team. You will be expanding on your project in future sessions by adding an enumeration type for Offensive and Defensive Linemen, Defensive Backs, etc. C++
Step by Step Solution
★★★★★
3.50 Rating (147 Votes )
There are 3 Steps involved in it
Step: 1
include include include using namespace std class Player int playerlD string name public Playerint playerlD string name string getName int getPlayerlD abstract methods virtual string getPlayerPosition 0 pure virtual function virtual void play 0 pure virtual function virtual string toString constructor PlayerPlayerint playerlD string name playerlDplayerlD namename return name of the player string PlayergetName return name return player id int PlayergetPlayerlD return playerlD return description of player string PlayertoString return ID tostringplayerlD Name name class Offense public Player ...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