-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathemployee.cpp
More file actions
63 lines (55 loc) · 1.29 KB
/
Copy pathemployee.cpp
File metadata and controls
63 lines (55 loc) · 1.29 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
51
52
53
54
55
56
57
58
59
60
61
62
63
#include "employee.h"
#include <iomanip>
Employee::Employee()
{
name = "";
userID = 0;
email = "";
salary = 0;
position = "";
}
Employee::Employee(int id, const string &name, const string &email, double salary, const string &position)
{
userID = id;
this->name = name;
this->email = email;
this->salary = salary;
this->position = position;
}
Employee::~Employee() {};
//---------------------------------
// Getterlar
double Employee::getSalary() const
{
return salary;
}
string Employee::getPosition() const
{
return position;
}
//----------------------------------
// Setterlar
void Employee::setSalary(double s)
{
salary = s;
}
void Employee::setPosition(const string &s)
{
position = s;
}
void Employee::displayInfo() const
{
cout << "\n----- Calisan Bilgileri -----" << endl;
cout << left
<< setw(15) << "User ID:"
<< userID << endl
<< setw(15) << "Isim:"
<< name << endl
<< setw(15) << "Email:"
<< email << endl
<< setw(15) << "Pozisyon:"
<< position << endl
<< setw(15) << "Maas:"
<< fixed << setprecision(2) << salary << " TL" << endl;
cout << "----------------------------" << endl;
}