1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
|
class user
{
string firstname, lastname, currentteam, position, status ;
int age ;
public:
user() {};
user(string fname, string lname, string cteam, string pos, string stat, int age)
{
setFirstName(fname);
setLastName(lname);
setCurrentTeam(cteam);
setPosition(pos);
setStatus(stat);
setAge(age);
} ;
user(const user& source):
firstname(source.firstname),
lastname(source.lastname),
currentteam(source.lastname),
position(source.position),
status(source.status),
age(source.age){};
user& operator = (const user& source)
{
firstname = source.firstname;
lastname = source.lastname ;
currentteam = source.currentteam ;
position = source.position ;
status = source.status ;
age = source.age ;
}
void setFirstName(string fname)
{firstname = fname;}
void setLastName(string lname)
{lastname = lname;}
void setCurrentTeam(string cteam)
{currentteam = cteam;}
void setPosition(string pos)
{position = pos;}
void setStatus(string stat)
{status = stat;}
void setAge(int _age)
{age = _age;}
string getFirstName()
{return firstname ;}
string getLastName()
{return lastname ;}
string getCurrentTeam()
{return currentteam ;}
string getPosition()
{return position ;}
string getStatus()
{return status ;}
int getAge()
{return age ;}
};
|