From 0da1ddd2763118786c627087520af677623404e9 Mon Sep 17 00:00:00 2001 From: jopierron Date: Thu, 3 Mar 2022 09:24:08 +0000 Subject: [PATCH] Upload New File --- src/Personne.cpp | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 src/Personne.cpp diff --git a/src/Personne.cpp b/src/Personne.cpp new file mode 100644 index 0000000..426a3c2 --- /dev/null +++ b/src/Personne.cpp @@ -0,0 +1,32 @@ +#include +#include "Personne.hpp" + +using namespace std; + +int numPers=0; + +Personne::Personne(const std::string& nom, const std::string& prenom, const string& numTel): nom{nom}, prenom{prenom}, numTel{numTel}{ + numPers = numPers+1; + cout << "Personne créée " << nom << " " << prenom << " " << numTel <<"\n"; +} + +Personne::Personne(): numPers{0}{ + numPers = numPers+1; + cout << "Personne créée \n"; +} + +const string& Personne::getNom() const{ + return nom; +} + +const string& Personne::getPrenom() const{ + return prenom; +} + +const string& Personne::getNumTel() const{ + return numTel; +} + +void Personne::setNumTel(const string& numTel){ + this->numTel = numTel; +} \ No newline at end of file