-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathCommEmp.h
75 lines (68 loc) · 1.9 KB
/
CommEmp.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
/** CommEmp class inherited from Employee class.
*
* #include "CommEmp .h" <BR>
* -llib
*
*/
#ifndef COMM_EMP_H
#define COMM_EMP_H
// SYSTEM INCLUDES
#include<iostream>
// LOCAL INCLUDES
#include "Employee.h"
// CommEmp class definition
class CommEmp : public Employee {
public:
// LIFECYCLE
/** Default + Overloaded constructor.
*/
CommEmp(const string& = "", const string& = "", const Date& = Date::sGetDefaultDate(), const Date& = Date::sGetDefaultDate(), const Address& = Address::sGetDefaultAddress(), double = 0.0, double = 0.0, int = 0, double = 0.0);
// Use compiler-generated copy constructor, assignment, and destructor.
// CommEmp(const CommEmp&);
// CommEmp& operator=(const CommEmp&);
// ~CommEmp();
// OPERATIONS
/** Overriding function that prints all the details of the commissioned employee.
*
* @param void
*
* @return void
*/
void PrintEmployee()const;
/** Overriding function that calculates net salary
* of the commissioned employee
*
* @param void
*
* @return net salary
*/
virtual double CalcSalary()const;
// ACCESS
// setters
void SetSales(int = 0);
void SetCommRate(double = 0.0);
void SetCommEmp(const string& = "", const string& = "", const Address& = Address::sGetDefaultAddress(), double = 0.0, double = 0.0, int = 0, double = 0.0);
/**
# @overload void SetCommEmp(const Employee& aEmployee, int = 0, double = 0.0);
*/
void SetCommEmp(const Employee& aEmployee, int = 0, double = 0.0);
/**
# @overload void SetCommEmp(int = 0, double = 0.0);
*/
void SetCommEmp(int = 0, double = 0.0);
/**
# @overload void SetCommEmp(const CommEmp& aCommEmp);
*/
void SetCommEmp(const CommEmp& aCommEmp);
// getters
int GetSales()const;
double GetCommRate()const;
const CommEmp& GetCommEmp()const;
private:
// DATA MEMBERS
int mSales;
double mCommRate;
};
// end class CommEmp
#endif
// _COMM_EMP_H_