forked from RossTs/CPPQT-2016-1-PrintEmployes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathemployee.cpp
76 lines (61 loc) · 1.12 KB
/
employee.cpp
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
64
65
66
67
68
69
70
71
72
73
74
#include "employee.h"
Employee::Employee()
{
m_name = "NULL";
m_phone = "NULL";
m_adress = "NULL";
m_salary = -1;
m_workyear = -1;
}
Employee::Employee(std::string name, std::string phone, std::string adress, int salary, int workyear)
{
m_name = name;
m_phone = phone;
m_adress = adress;
m_salary = salary;
m_workyear = workyear;
}
void Employee::setName(std::string name)
{
m_name = name;
}
void Employee::setPhone(std::string phone)
{
m_phone = phone;
}
void Employee::setAdress(std::string adress)
{
m_adress = adress;
}
void Employee::setSalary(int salary)
{
m_salary = salary;
}
void Employee::setWorkYear(int workyear)
{
m_workyear = workyear;
}
std::string Employee::getName()
{
return m_name;
}
std::string Employee::getPhone()
{
return m_phone;
}
std::string Employee::getAdress()
{
return m_adress;
}
int Employee::getSalary()
{
return m_salary;
}
int Employee::getWorkYear()
{
return m_workyear;
}
void Employee::print()
{
std::cout << m_name << ", " << m_phone << ", " << m_adress << ", " << m_salary << ", " << m_workyear <<std::endl;
}