-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathHourlyEmp.h
75 lines (68 loc) · 1.95 KB
/
HourlyEmp.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
/** HourlyEmp class inherited from Employee class.
*
* #include "HourlyEmp.h" <BR>
* -llib
*
*/
#ifndef HOURLY_EMP_H
#define HOURLY_EMP_H
// SYSTEM INCLUDES
#include<iostream>
// LOCAL INCLUDES
#include "Employee.h"
// HourlyEmp class definition
class HourlyEmp : public Employee {
public:
// LIFECYCLE
/** Default + Overloaded constructor.
*/
HourlyEmp(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.
// HourlyEmp(const HourlyEmp&);
// HourlyEmp& operator=(const HourlyEmp&);
// ~HourlyEmp();
// OPERATIONS
/** Overriding function that prints all the details of the hourly employee.
*
* @param void
*
* @return void
*/
void PrintEmployee()const;
/** Overriding function that calculates net salary
* of the HourlyEmp employee
*
* @param void
*
* @return net salary
*/
virtual double CalcSalary()const;
// ACCESS
// setters
void SetHours(int = 0);
void SetHourlyRate(double = 0.0);
void SetHourlyEmp(const string& = "", const string& = "", const Address& = Address::sGetDefaultAddress(), double = 0.0, double = 0.0, int = 0, double = 0.0);
/**
# @overload void SetHourlyEmp(const Employee& aEmployee, int = 0, double = 0.0);
*/
void SetHourlyEmp(const Employee& aEmployee, int = 0, double = 0.0);
/**
# @overload void SetHourlyEmp(int = 0, double = 0.0);
*/
void SetHourlyEmp(int = 0, double = 0.0);
/**
# @overload void SetHourlyEmp(const HourlyEmp& aHourlyEmp);
*/
void SetHourlyEmp(const HourlyEmp& aHourlyEmp);
// getters
int GetHours()const;
double GetHourlyRate()const;
const HourlyEmp& GetHourlyEmp()const;
private:
// DATA MEMBERS
int mHours;
double mHourlyRate;
};
// end class HourlyEmp
#endif
// _HOURLY_EMP_H_