444752 American football game

// Base Class

class player



string firstname;

string lastname;

int totalpoints;


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

#include <iostream>

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

#include <vector>

int main()


vector <player*> OFFENSE (11);

vector <player*> DEFENSE (11);

OFFENSE[0] = new quarterback;

.... // pick any package you want as along as there is a quarterback and the total is 11 players

DEFENSE[0] = new defensiveLineman

....// pick any package. Total must be 11

Taidot: kaikki käy, Pelisuunnittelu

Näytä lisää: vector vector string, vector vector int, vector string, vector int int, vector int, total safety, string vector, safety positions, speed type test, h game, game 1000, vector game, test game, std, pocket points, football, football players, football design, derive, defense

Tietoa työnantajasta:
( 2 arvostelua ) dallas,

Projektin tunnus: #2190630