-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathboss.cpp
More file actions
67 lines (57 loc) · 1.06 KB
/
boss.cpp
File metadata and controls
67 lines (57 loc) · 1.06 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
64
65
66
67
//
// Created by xiaohai on 4/11/23.
//
#include "boss.h"
//构造函数
Boss::Boss(int ID,string name,int DeptID)
{
SetID(ID);
SetName(name);
SetDeptID(DeptID);
SetDeptName("总裁");
};
//显示个人信息
void Boss::Show_Info()
{
cout<<"职工编号:"<<GetID()<<"\t职工姓名:"<<GetName()<<"\t岗位:"<<GetDeptName()<<"\t岗位职责:总览公司所有事务"<<endl;
};
//获取部门名称,dept是department的缩写
string Boss::GetDeptName()
{
return Deptname;
};
//获取职工编号编号
int Boss::GetID()
{
return ID;
};
//获取职工姓名
string Boss::GetName()
{
return name;
};
//获取所在部门编号
int Boss::GetDeptID()
{
return DeptID;
};
//设置部门名称
void Boss::SetDeptName(string DeptName)
{
this->Deptname=DeptName;
};
//设置职工编号编号
void Boss::SetID(int ID)
{
this->ID=ID;
};
//设置职工姓名
void Boss::SetName(string name)
{
this->name=name;
};
//设置所在部门编号,dept是department的缩写
void Boss::SetDeptID(int DeptID)
{
this->DeptID=DeptID;
};