-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathExecutive.cpp
50 lines (38 loc) · 1.88 KB
/
Executive.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
#include "Executive.h" // class implemented
using namespace std;
// File scope starts here
/////////////////////////////// PUBLIC ///////////////////////////////////////
//============================= LIFECYCLE ====================================
// Executive Default + Overloaded Constructor
Executive::Executive(const string& aName, const string& aNIC, const Date& aDateOfBirth, const Date& aDateOfHire, const Address& aHomeAddress, double aTaxRate, double aBasicSalary, const string& aDepartment) : Manager(aName, aNIC, aDateOfBirth, aDateOfHire, aHomeAddress, aTaxRate, aBasicSalary, aDepartment) {
// base class initilzation using member initlizer list
}
// end Executive constructor
//============================= OPERATIONS ===================================
// Overriding function that prints all the details of the Manager.
void Executive::PrintEmployee()const {
cout << "Executive" << endl;
Manager::PrintEmployee();
}
// end function PrintEmployee
//============================= ACESS ===================================
// function that sets the Executive
void Executive::SetExecutive(const string& aName, const string& aNIC, const Address& aHomeAddress, double aTaxRate, double aBasicSalary, const string& aDepartment) {
this->SetManager(aName, aNIC, aHomeAddress, aTaxRate, aBasicSalary, aDepartment);
}
// end function SetExecutive
// overloaded function that sets the Executive
void Executive::SetExecutive(const Manager& aManager) {
this->SetSalariedEmp(aManager.GetManager());
}
// end function SetExecutive
// overloaded function that sets the Executive
void Executive::SetExecutive(const Executive& aExecutive) {
this->SetExecutive(aExecutive.GetManager());
}
// end function SetExecutive
// function that gets the Executive
const Executive& Executive::GetExecutive()const {
return *this;
}
// end function GetExecutive