-
Notifications
You must be signed in to change notification settings - Fork 0
/
company.cpp
44 lines (39 loc) · 993 Bytes
/
company.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
#include <iostream>
#include <vector>
#include <array>
#include <numeric>
#include <cmath>
#include "Functions.cpp"
#include "dev.cpp"
#include "testing.cpp"
#include "admin.cpp"
#include "hr.cpp"
using namespace std;
class Company
{
Dev d;
Test t;
Admin a;
Hr h;
int flag;
vector<int> flagsVector;
public:
Company(vector<string> devinfo, vector<string> testinfo, string admininfo, string hrinfo) : d(devinfo), t(testinfo), a(admininfo), h(hrinfo)
{
flagsVector.push_back(0); // temp
flagsVector.push_back(d.getFlag());
flagsVector.push_back(t.getFlag());
flagsVector.push_back(a.getFlag());
flagsVector.push_back(h.getFlag());
flag = round((flagsVector[1] + flagsVector[2] + flagsVector[3] + flagsVector[4]) / 4);
flagsVector[0] = flag;
}
Company()
{
flag = 0;
}
vector<int> getFlags()
{
return flagsVector;
}
};