#ifndef Team_h

#ifndef Team_H

#define Team_H

#include "PNode.h"

//class Team declaration…

class Team

{

private:

char TeamName[MAX_NAME_LENGTH]; //to store the name

char TeamColors1[30], TeamColors2[30];

US TeamNumber;

US Points, Plays, Wins, Loses, Draws, LeaguePosition;

short int Average; //may be negative so not declared US i.e. unsigned short

float TeamDefence, TeamMidfield, TeamAttack;

PNode *pPList; //head pointer for linked list of players

short int NumberOfPlayers; //a necessary member for searching and control

public:

//default constructors for normal and loading issues…

Team();

Team(const char* tName, const char* tColors1, const char* tColors2);

//destructor to deallocate memory

~Team();

//accessors and modifiers… inline…

const char* GetTeamName() const { return TeamName;}

const char* GetBanner1() const { return TeamColors1;}

const char* GetBanner2() const { return TeamColors2;}

void SetTeamNumber(US tno) { TeamNumber = tno; }

US GetTeamNumber() const { return TeamNumber; }

short int GetNOP() const { return NumberOfPlayers ;}

US GetPoints() const { return Points; }

void SetPoints(US pnts) { Points = pnts; }

US GetPlays() const { return Plays; }

void SetPlays(US plys) { Plays = plys; }

US GetWins() const { return Wins; }

void SetWins(US wns) { Wins = wns; }

US GetLoses() const { return Loses; }

void SetLoses(US lss) { Loses = lss; }

US GetDraws() const { return Draws; }

void SetDraws(US drws) { Draws = drws; }

US GetLP() const { return LeaguePosition; }

void SetLP(US lps) { LeaguePosition = lps; }

short int GetAverage() const { return Average; }

void SetAverage(short int avg) { Average = avg; }

float GetDefence() const { return TeamDefence; }

float GetMidfield() const { return TeamMidfield; }

float GetAttack() const { return TeamAttack; }

PNode* Getp() const { return pPList;}

//other methods…

//overloaded one is necessary for loading issues

void AddPlayer() ;

void AddPlayer(const char* theName,US pos,US ag,US nmb,US tack,US sk,US agl,US acc);

void RemovePlayer();

void ModifyTeam();

void ModifyTeamPlayer();

void DisplayTeamPlayer();

void DisplayTeam() const;

void PrintPlayerList() const;

void TeamAvg();

//a method to get the shirt number of player and returns the pointer

//that points to it

PNode* Search(US shirt_no);

void SetTeam(); //default constructor calls this

}; //end of declaration

#endif

Yorum Yapın


Destekliyoruz arkadaş - arkadaş - partner - partner - partner - oyun oyna - çocuk oyunları - ben10 oyunları - jinekolog - kadın dogum doktoru - kadın doğum uzmanı - amerikan pastası -