-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPartTimeEmployee.h
38 lines (36 loc) · 1.01 KB
/
PartTimeEmployee.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
#ifndef PARTTIMEEMPLOYEE_H_INCLUDED
#define PARTTIMEEMPLOYEE_H_INCLUDED
#include<iostream>
#include<string.h>
#include<fstream>
#include"Employee.h"
using namespace std;
class PartTimeEmployee : public Employee
{
private:
int salary = 0;
int HRA = 0;
int PF = 0;
int tax = 0;
int mealAllowance = 0;
int transportAllowance = 0;
int medicalAllowance = 0;
int loanBalance = 0;
int loanDebit = 0;
int grossPay = 0;
int DA = 0;
int hourlyRate=0;
public:
PartTimeEmployee() {}
PartTimeEmployee(const char *name, int code, const char *designation, int exp, int age, int workingHours, int hourlyRate, char anyLoan = 'N')
: Employee(name, code, designation, exp, age, workingHours, anyLoan), hourlyRate(hourlyRate)
{
calculateSalary();
}
void calculateSalary();
void save(ofstream &file);
void load(ifstream &file);
void displayEmployee();
void displayPaySlip();
};
#endif // PARTTIMEEMPLOYEE_H_INCLUDED