-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEmployee.cpp
More file actions
47 lines (37 loc) · 759 Bytes
/
Copy pathEmployee.cpp
File metadata and controls
47 lines (37 loc) · 759 Bytes
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
/*
Employee.cpp
Teng Zhao: 40089560
Thomas Flynn: 40034877
*/
#include "Employee.h"
Employee::Employee():Person() {
jobFunction = " ";
for (auto& i : flightList) {
i = nullptr;
}
}
Employee::Employee(int a, string b, string c, string d): Person(a, b, c) {
jobFunction = d;
for (auto& i : flightList) {
i = nullptr;
}
}
void Employee::setJobFunction(string a) {
jobFunction = a;
}
bool Employee::addFlight(Flight* f) {
for (auto& i : flightList) {
if (i == nullptr) {
i = f;
return true;
}
}
return false;
}
void Employee::print() {
cout << "--Employee-- " << endl;
cout << "ID: " << id << endl;
cout << "Name: " << name << endl;
cout << "Job Function: " << jobFunction << endl;
cout << "Address: " << address << endl;
}