-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEmployee.h
40 lines (31 loc) · 1.01 KB
/
Employee.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
#ifndef EMPLOYEE_H
#define EMPLOYEE_H
class Company;
class Employee
{
int employee_id;
int salary;
int grade; // the rank of the employee
Company *company;
public:
Employee() = default;
Employee(int employee_id, Company *company, int salary , int grade);
~Employee()=default;
int getGrade() const;
int getSalary() const;
int getEmployeeID() const;
int getCompanyID() const;
Company *getCompany() const;
void setGrade(int grade);
void increaseGrade();
void setSalary(int salary);
void increaseSalary(int salary);
void setCompany(Company *company);
bool operator<(const Employee &other) const;
bool operator>(const Employee &other) const;
bool operator==(const Employee &other) const;
bool operator!=(const Employee &other) const;
static bool compareBySalary(Employee *const &temp1, Employee *const &temp2);
static bool compareByPointer(Employee *const &temp1, Employee *const &temp2);
};
#endif