-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEmployee.h
60 lines (53 loc) · 1.26 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#ifndef EMP
#define EMP
#include <iostream>
#include <cstring>
using namespace std;
class Employee
{
protected:
string employeeID;
string employeeName;
float employeeBasicSalary;
int employeeAttendance;
string employeeContact;
int otHrs;
float otRate;
public:
Employee() {
employeeID = "E000";
employeeName = "aaa";
employeeBasicSalary = 0.0;
employeeAttendance = 0;
employeeContact = "011";
otHrs = 0;
otRate = 0.0;
}
Employee(string EID, string name, float salary, int attent, string contact, int hrs, float rate) {
employeeID = EID;
employeeName = name;
employeeBasicSalary = salary;
employeeAttendance = attent;
employeeContact = contact;
otHrs = hrs;
otRate = rate;
}
virtual float calcSalary() {
return 0;
}
virtual void displayinfo() {}
void displayEmpDetails() {
cout << "Employee ID : " << employeeID <<endl;
cout << "Employee name : " << employeeName << endl;
cout << "Employee Salary : " << employeeBasicSalary << endl;
cout << "Attendance: " << employeeAttendance << endl;
cout << "Employee Contact : " << employeeContact << endl;
cout << "OT houres : " << otHrs << endl;
cout << "OT Rate : " << otRate << endl<<endl;
displayinfo();
}
~Employee() {
cout << "Employee deleted " << endl;
}
};
#endif