Projet

Général

Profil

Publication de fichiers » joueur.cpp

Anonyme, 11/01/2022 10:42

 
#include "joueur.hpp"
#include <sstream>
#include <iostream>

using namespace std;

//constructeur
Joueur::Joueur(string numLicence,string nom,string prenom,int point,int ecart,int poule){
this->m_numLicence=numLicence;
this->m_nom=nom;
this->m_prenom=prenom;
this->m_point=point;
this->m_ecart=ecart;
this->m_poule=poule;
}

//methodes


void Joueur:: setnom(string nom ){
this->m_nom = nom;
}

string Joueur::getm_nom(){
return m_nom;
}



void Joueur:: setprenom(string prenom ){
this->m_prenom = prenom ;
}

string Joueur::getm_prenom(){
return m_prenom;
}



void Joueur::setnumLicence (string numLicence){
this->m_numLicence = numLicence;
}

string Joueur::getnumLicence(){
return m_numLicence;
}




int Joueur::getPoint(){
return m_point;
}

void Joueur::setPoint(int s){
this->m_point += s;
}




int Joueur::getEcart(){
return m_ecart;
}

void Joueur::setEcart(int s){
m_ecart += s;
}




string Joueur::afficher() const{
ostringstream ss;
ss<<"num Licence : "<<m_numLicence<<endl;
ss<<"nom : "<<m_nom<<endl;
ss<<"prenom : "<<m_prenom<<endl;
ss<<"score : "<<m_point<<endl;
return ss.str();
}
(1-1/7)