-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEmployee.cpp
More file actions
47 lines (38 loc) · 1.16 KB
/
Employee.cpp
File metadata and controls
47 lines (38 loc) · 1.16 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
#include <iostream>
#include <string>
#include <locale>
using namespace std;
class Employee {
private:
string name;
int id_number;
string department;
string position;
public:
Employee(string emp_name, int emp_id, string emp_department, string emp_position) {
name = emp_name;
id_number = emp_id;
department = emp_department;
position = emp_position;
}
void display() {
cout << "Èìÿ: " << name << endl;
cout << "Èäåíòèôèêàöèîííûé íîìåð: " << id_number << endl;
cout << "Îòäåë: " << department << endl;
cout << "Äîëæíîñòü: " << position << endl;
cout << endl;
}
};
int main() {
setlocale(LC_ALL, "RUS");
Employee employee1("Ñüþçàí Ìåéåðñ", 47899, "Áóõãàëòåðèÿ", "Âèöå-ïðåçèäåíò");
Employee employee2("Ìàðê Äæîóíñ", 39119, "ÈÒ", "Ïðîãðàììèñò");
Employee employee3("Äæîé Ðîäæåðñ", 81774, "Ïðîèçâîäñòâåííûé", "Èíæåíåð");
cout << "Ñîòðóäíèê 1:" << endl;
employee1.display();
cout << "Ñîòðóäíèê 2:" << endl;
employee2.display();
cout << "Ñîòðóäíèê 3:" << endl;
employee3.display();
return 0;
}