-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
52 lines (49 loc) · 1.25 KB
/
main.cpp
File metadata and controls
52 lines (49 loc) · 1.25 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
#include "worker.h"
#include "workerManager.h"
#include "employee.h"
#include "boss.h"
#include "manager.h"
#include <windows.h>
using namespace std;
int main(){
SetConsoleOutputCP(CP_UTF8);
SetConsoleCP(CP_UTF8);
//实例化管理者对象
workerManager wm;
int choice;
while (true) {
wm.showMenu();// 展示菜单
cout << "请输入您的选择:";
cin >> choice;// 接受用户选择
switch (choice) {
case 0:// 退出系统
wm.exitSystem();
break;
case 1:// 增加职工
wm.addWorker();
break;
case 2:// 显示职工
wm.show_Emp();
break;
case 3:// 删除职工
wm.Del_Emp();
break;
case 4:// 修改职工
wm.modEmp();
break;
case 5:// 查找职工
wm.findEmp();
break;
case 6:// 排序
wm.sortEmp();
break;
case 7:// 删库
wm.rm_rf();
break;
default:
system("cls");// 清屏
break;
}
}
return 0;
}