// Base Class
player(string &s1 , string &s1, int);
player(const player& p1);
void setPlayer(string s1, string s2, int&);
void printPlayerInfo () const;
Derive different football players from the player class (different positions). Each player will have a different set of skills. Every players start with 3000 points. Each player will have a set of skills (of type int). The total number of points for each player will be deducted from the 3000 they are starting with. The variables are:
Quarterback = accuracy, scrambling, armstrength, pocket presence. All random values, where the total number of points has to 2500.
Runningback = speed, strength, fumbling. Random values, total of 1000
Tight end = blocking, strength, catching, fumbling. Randoms value, total of 2000
Offensive lineman = strength, blocking. Randoms value, total of 500
Wide receiver = speed, catching, routerunning. Randoms values Total of 2500.
defensiveLineman = strength. Random values, total of 500
linebacker = speed, strength, pressure. Random values, total of 1000
defensiveback = speed, coverage. Random values Total of 2500.
Safety = speed, coverage, strength. Random values Total of 2500.
Test your classes by creating a offense and defense vectors of players (different) objects. Calculate the offense and defense total number of points. If the offense has more points than the defense then the offense scores. Otherwise the defense stops the offense.
Part of main is shown below
using namespace std;
#include "quarterback.h" // offense
#include "wideReceiver.h" // offense
#include "runningBack.h" // offense
#include "tightEnd.h" // offense
#include "offensiveLineman.h" // offense
#include "defensiveLineman.h" // defense
#include "lineBacker.h" // defense
#include "safety.h" // defense
#include "defensiveBack.h" // defense
vector <player*> OFFENSE (11);
vector <player*> DEFENSE (11);
OFFENSE = new quarterback;
.... // pick any package you want as along as there is a quarterback and the total is 11 players
DEFENSE = new defensiveLineman
....// pick any package. Total must be 11