-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path職工管理系統.cpp
65 lines (54 loc) · 1007 Bytes
/
職工管理系統.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
#include <iostream>
using namespace std;
#include "workerManager.h"
#include "worker.h"
#include "employee.h"
#include "manager.h"
#include "boss.h"
int main() {
////測試代碼
//Worker* worker = NULL;
//worker = new Boss(1, "張三", 1);
//worker->showInfo();
//實例化管理對象
WorkerManager wm;
int choice = 0; // 用來儲存用戶的選項
while (true) {
//調用展示菜單成員函數
wm.Show_Menu();
cout << "請輸入您的選擇: " << endl;
cin >> choice; //接收用戶的選項
switch (choice)
{
case 0://退出管理程序
wm.ExitSystem();
break;
case 1://增加職工信息
wm.Add_Emp();
break;
case 2://顯示職工信息
wm.Show_Emp();
break;
case 3://刪除離職職工
wm.Del_Emp();
break;
case 4://修改職工信息
wm.Mod_Emp();
break;
case 5://查找職工信息
wm.Find_Emp();
break;
case 6://按照編號排序
wm.Sort_Emp();
break;
case 7://清空所有文檔
wm.Clean_File();
break;
default:
system("cls");//清屏
break;
}
}
system("pause");
return 0;
}