-
Notifications
You must be signed in to change notification settings - Fork 0
/
Party.h
60 lines (45 loc) · 1.29 KB
/
Party.h
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
//
// Created by Samuel Benichou on 2020-01-04.
//
#pragma once
#ifndef HW5_PARTY_H
#define HW5_PARTY_H
#include <iostream>
#include <string>
#include <vector>
#include <list>
#include <algorithm>
using namespace std;
class Politician;
class Party {
protected:
string name;
Politician *chairman;
list<Politician*> listOfMembers;
int size;
public:
//^^^^^^^^^^ Constructors and Destructor ^^^^^^^^^^//
Party(string);
virtual ~Party();
//^^^^^^^^^^ General Functions ^^^^^^^^^^//
void deletePolitician(Politician* newPolitician);
void primeRise();
int partyPower();
//^^^^^^^^^^ Pure Virtual Functions ^^^^^^^^^^//
virtual bool isRepublican()const = 0;
virtual bool isDemocratic()const = 0;
virtual void printParty() = 0;
virtual void addDemocratPolitician(Politician*) = 0;
virtual void addRepublicanPolitician(Politician*) = 0;
virtual void updateNumOfParties(int*,int*) = 0;
virtual bool politicalMatch(Politician*) = 0;
//^^^^^^^^^^^^^^Getters and Setters^^^^^^^^^^^^^^//
Politician* getChairman();
string getPartyName();
int getSize();
list<Politician*> getList();
Politician* getAndDelFirstPolitician();
string getChairmanFirstName();
void setPartyToPoliticians();
};
#endif //HW5_PARTY_H