-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathClient.cpp
More file actions
53 lines (46 loc) · 1.56 KB
/
Client.cpp
File metadata and controls
53 lines (46 loc) · 1.56 KB
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
#include "Client.h"
// Constructeur simplifié
Client::Client(string c_nom, string c_prenom, string c_numcin, int c_numTel, Compte c_compte)
{
nom = c_nom;
prenom = c_prenom;
numcin = c_numcin;
numTel = c_numTel;
compte = c_compte; // Associe le compte directement dans le corps du constructeur
}
// Méthode pour afficher un client et son compte
void Client::afficherClient() {
cout << "Nom: " << nom << endl;
cout << "Prenom: " << prenom << endl;
cout << "NumCIN: " << numcin << endl;
cout << "Numero Tel: +33 " << numTel << endl;
cout << "/Y\\ --> Informations du client affichees avec succes ! " << endl;
}
// Méthode pour modifier les informations du client
// void Client::modifierClient(string mod_nom, string mod_prenom, string mod_numcin, int mod_num) {
// nom = mod_nom;
// prenom = mod_prenom;
// numcin = mod_numcin;
// numTel = mod_num;
// cout << "/Y\\ --> Client modifie avec succes !" << endl;
// }
void Client::virementCompte(Client &destinataire, float montant)
{
compte.virementCompte(destinataire.compte, montant);
}
void Client::crediterCompte(float montant) // Crédite le compte
{
compte.crediterCompte(montant);
}
void Client::debiterCompte(int code_secret, float montant) // Débite le compte
{
compte.debiterCompte(code_secret, montant);
}
void Client::consulterCompte() // Affiche les informations du compte
{
compte.consulterCompte();
}
void Client::commanderChequierCompte()
{
compte.commanderChequierCompte();
}