-
Notifications
You must be signed in to change notification settings - Fork 0
/
Politician.cpp
55 lines (41 loc) 路 976 Bytes
/
Politician.cpp
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
//
// Created by Samuel Benichou on 2020-01-04.
//
#include "Politician.h"
#include "Party.h"
Politician::Politician(string firstName,string lastName,string id,int power) {
this->firstName = firstName;
this->lastName = lastName;
this->id = id;
this->power = power;
this->chairman = NULL;
this->party = NULL;
}
Politician::~Politician() {
}
const string &Politician::getFirstName() const {
return firstName;
}
const string &Politician::getLastName() const {
return lastName;
}
const string &Politician::getId() const {
return id;
}
void Politician::setParty(Party *other) {
this->party = other;
}
Party *Politician::getParty() {
return this->party;
}
Politician *Politician::getChairman() {
return chairman;
}
string Politician::getChairmanName() {
if (chairman == NULL)
return "None";
return chairman->firstName;
}
void Politician::setChaiman(Politician* chaiman) {
this->chairman = chaiman;
}