-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStaff.h
More file actions
50 lines (41 loc) · 1.27 KB
/
Staff.h
File metadata and controls
50 lines (41 loc) · 1.27 KB
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
#ifndef STAFF_H
#define STAFF_H
#include "Person.h"
#include <string>
#include <vector>
using namespace std;
class Staff : public Person{
public:
// Constructor:
Staff();
Staff(const string& id) : Person(id) {}
Staff(string fullName,string id,string nationality,int age,float height ,float weight,string job,int salary,string address,int yearJoined);
// Deconstructor:
virtual ~Staff();
// Declaring Setters:
void setJob(string job);
void setAddress(string address);
void setSalary(int salary);
void setYearJoined(int yearJoined);
// Declaring Getters:
string getJob();
string getAddress();
int getSalary();
int getYearJoined();
// Declaring Functions:
void incrementSalary(double percentage);
void incrementSalary(double percentage,int monthlyBonus);
void incrementSalary(int monthlyBonus);
void displayInfo();
void addPerson();
void writeDataToFile();
void readDataFromFile();
void searchDataInFile();
void removeDataFromFile();
static vector<Staff> staffs;
private:
// Declaring Attributes:
string job,address;
int salary,yearJoined;
};
#endif