c公司人員標(biāo)準(zhǔn)管理系統(tǒng)_第1頁
c公司人員標(biāo)準(zhǔn)管理系統(tǒng)_第2頁
c公司人員標(biāo)準(zhǔn)管理系統(tǒng)_第3頁
c公司人員標(biāo)準(zhǔn)管理系統(tǒng)_第4頁
c公司人員標(biāo)準(zhǔn)管理系統(tǒng)_第5頁
已閱讀5頁,還剩67頁未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡介

1、c公司人員標(biāo)準(zhǔn)管理系統(tǒng) 系統(tǒng)需求分析 1.1系統(tǒng)設(shè)計(jì)的目的與意義: 現(xiàn)在的公司越做越大,公司的人員數(shù)量越來越多,因此需要一個(gè)公司人員管理系統(tǒng)來對(duì)公司的人員進(jìn)行管理。1.2 系統(tǒng)功能需求:本系統(tǒng)有五個(gè)類:Stuff類、Manager類、Salesman類、SalesManager類、Technicist類,存儲(chǔ)基本信息、經(jīng)理信息、銷售人員信息、銷售經(jīng)理信息及技術(shù)人員信息。1基礎(chǔ)信息的添加功能程序能夠任意添加經(jīng)理信息、銷售信息、銷售經(jīng)理信息和技術(shù)人員信息。2修改功能對(duì)已添加的記錄(經(jīng)理信息、銷售信息、銷售經(jīng)理信息和技術(shù)人員信息)進(jìn)行修改。3刪除功能對(duì)已添加的記錄(經(jīng)理信息、銷售信息、銷售經(jīng)理信息和

2、技術(shù)人員信息)進(jìn)行刪除。如果當(dāng)前系統(tǒng)中沒有相應(yīng)的記錄,則提示“記錄為空!”并返回操作;否則輸入要?jiǎng)h除的編號(hào)對(duì)該記錄進(jìn)行刪除,如果沒有找到,則提示相應(yīng)的記錄不存在。4查詢功能可根據(jù)職位的編號(hào)查詢某職位的所有職員信息??筛鶕?jù)職員的編號(hào)查詢某職員的所有信息。如果未找到,給出相應(yīng)的提示信息,如果找到,則顯示相應(yīng)的記錄信息。5保存功能將當(dāng)前系統(tǒng)中各類記錄存入文件中。6讀取功能將保存在文件中的信息讀入到當(dāng)前系統(tǒng)中,以供用戶使用??傮w設(shè)計(jì)2.1 系統(tǒng)功能分析:系統(tǒng)通過調(diào)用函數(shù)來實(shí)現(xiàn)信息錄入、信息修改、信息刪除、信息查詢以及數(shù)據(jù)保存文件等功能。add()函數(shù)用于錄入信息;modify()函數(shù)用來修改信息;de

3、l()函數(shù)用來修改信息;look()函數(shù)用來搜索職員信息;read()函數(shù)用于將文件中的數(shù)據(jù)讀取到內(nèi)存中;save()函數(shù)用于將內(nèi)存中的信息存入文件內(nèi);count用于統(tǒng)計(jì)職員總數(shù);show()顯示職員信息;主函數(shù)main()用于調(diào)用這些函數(shù)。 2.2系統(tǒng)功能模塊劃分與設(shè)計(jì):系統(tǒng)定義了Stuff類、Manager類、Salesman類、SalseManager類這五個(gè)類,定義了add()、modify()、del()、read()、save()、look()、count()、show()、等函數(shù)來實(shí)現(xiàn)系統(tǒng)所需功能。2.3 系統(tǒng)功能模塊圖:公司人員信息管理系統(tǒng)公司人員信息管理系統(tǒng) 技術(shù)人員信息添加

4、 技術(shù)人員信息查詢 技術(shù)人員信息顯示 技術(shù)人員信息修改 技術(shù)人員信息刪除 技術(shù)人員信息統(tǒng)計(jì) 技術(shù)人員信息保存 技術(shù)人員信息讀取技術(shù)人員信息管理 銷售經(jīng)理信息添加 銷售經(jīng)理信息查詢 銷售經(jīng)理信息顯示 銷售經(jīng)理信息修改 銷售經(jīng)理信息刪除 銷售經(jīng)理信息統(tǒng)計(jì) 銷售經(jīng)理信息保存 銷售經(jīng)理信息讀取銷售經(jīng)理信息管理 銷售人員信息添加 銷售人員信息查詢 銷售人員信息顯示 銷售人員信息修改 銷售人員信息刪除 銷售人員信息統(tǒng)計(jì) 銷售人員信息保存 銷售人員信息讀取銷售人員信息管理 經(jīng)理信息的添加 經(jīng)理信息的查詢 經(jīng)理信息的顯示 經(jīng)理信息的修改 經(jīng)理信息的刪除 經(jīng)理信息的統(tǒng)計(jì) 經(jīng)理信息的保存 經(jīng)理信息的讀取 經(jīng)理信息

5、管理 2.4 類的設(shè)計(jì)(1)Stuff類(抽象類)的設(shè)計(jì):StuffStuffvirtual void read()=0;virtual void add()=0; virtual void modify(int)=0;virtual void del(int)=0;virtual void save()=0;Virtual void look()=0;Virtual void count()=0;Virtual void show()=0;Virtual void Input()=0;Virtual void Output()=0; (2)經(jīng)理類的設(shè)計(jì):ManagerManager floa

6、t pay; void read(); void add(); void look(); void show(); void modify(int); void del(int); void count(); void save(); void Input() (3)銷售人員類的設(shè)計(jì):SalesmanSalesman float market; float rate; void read(); void add(); void look(); void show(); void modify(int); void del(int); void count(); void save(); voi

7、d Input() (4)銷售經(jīng)理類的設(shè)計(jì): SalesManager SalesManagerfloat pay1,market1,rate1; void read(); void add(); void look(); void show(); void modify(int); void del(int); void count(); void save(); void Input(); (5)技術(shù)人員類的設(shè)計(jì):TechnicistTechnicist float hour; void read(); void add(); void look(); void show(); void

8、modify(int); void del(int); void count(); void save(); void Input()Technicistfloat hour;void read();Technicistfloat hour;void read();void add();void look();void show();void modify(int);void del(int);void count();void save();void Input()Stuffvirtual void read()=0;virtual void add()=0; virtual void mo

9、dify(int)=0;virtual void del(int)=0;virtual void save()=0;Virtual void look()=0;Virtual void count()=0;Virtual void show()=0;Virtual void Input()=0;Virtual void Output()=0;Managerfloat pay;void read();void add();void look();void show();Void modify(int);void del(int);void count();void save();void Inp

10、ut();void Input()Salesmanfloat market;float rate;void read();void add();void look();void show();void modify(int);void del(int);void count();void save();void Input()SalesManagerfloat pay1,market1,rate1; void read();void add();void look();void show();void modify(int);void del(int);void count();void sa

11、ve();void Input();Salesmanfloat market;float rate;void read();void add();void look();void show();void modify(int);void del(int);void count();void save();void Input()Managerfloat payManagerfloat pay;void read();void add();void look();void show();Void modify(int);void del(int);void count();void save()

12、;void Input();void Input()SalesManagerfloat pay1,market1,rate1; void read();void add();void look();SalesManagerfloat pay1,market1,rate1; void read();void add();void look();void show();void modify(int);void del(int);void count();void save();void Input();Stuffvirtual void read()=0;virtual void add()=0

13、; virtual void modify(int)=0;virtual void del(int)=0;virtual void save()=0;Virtual void look()=0;Virtual void count()=0;Virtual void show()=0;Virtual void Input()=0;Virtual void Output()=0;詳細(xì)設(shè)計(jì)及實(shí)現(xiàn)3.1Stuff類(抽象類)的實(shí)現(xiàn)class Stuffpublic:virtual void read()=0;virtual void add()=0;virtual void look()=0;virt

14、ual void show()=0;virtual void modify(int)=0;virtual void del(int)=0; virtual void count()=0;virtual void save()=0; virtual void Input()=0; virtual void Output()=0; int number;char name100; char sex10;char department10;char rank10; float monpay;3.2 經(jīng)理類的實(shí)現(xiàn)#include Stuff.h class Manager:public Stuff p

15、ublic:void read();void add();void look();void show();void modify(int); void del(int); void count();void save(); void Input() coutnumber;coutname; coutsex; coutdepartment; coutrank;coutpay; monpay=pay;void Output()coutsetw(10)經(jīng)理信息 setw(10)編號(hào)setw(10)姓名setw(10)性別setw(10)所在部門setw(10)級(jí)別setw(10)月薪endl;cou

16、tsetw(10)經(jīng)理信息 setw(10)numbersetw(10)namesetw(10)sexsetw(10)departmentsetw(10)ranksetw(10)monpaym1count_Manager.numberm1count_Mm1count_Manager.sexm1count_Manager.departmentm1count_Manager.rankm1count_Manager.monpay;while(!managerfile.eof()managerfilem1count_Manager.numberm1count_Manager.na

17、mem1count_Manager.sexm1count_Manager.departmentm1count_Manager.rankm1count_Manager.monpay; count_Manager+;managerfile.close();void Manager:add()m1count_Manager.number=number; strcpy(m1count_M,name); strcpy(m1count_Manager.sex,sex); strcpy(m1count_Manager.department,department); strcpy(m1c

18、ount_Manager.rank,rank); m1count_Manager.monpay=monpay; m1count_Manager.number=number; count_Manager+;void Manager:look() if(count_Manager=0) cout對(duì)不起,沒有相關(guān)記錄!endl; return; int choice; cout請選擇查找方式:1、編號(hào)查找 2、姓名查找 choice; while(choice!=1&choice!=2)coutchoice; switch(choice) case 1:coutnumber; for(int i=0

19、;icount_Manager;i+) if(m1i.number=number) m1i.Output();return; cout沒有相關(guān)人員!endl; break;case 2:coutname;for(int i=0;icount_Manager;i+)if(strcmp(,name)=0)m1i.Output(); return;cout沒有相關(guān)人員!endl;break;default:cout無此選項(xiàng),請重試!endl;break;void Manager:show() for(int i=0;i=count_Manager-1;i+) m1i.Output()

20、; void Manager:modify(int index) m1index-1.number=number; strcpy(,name); strcpy(m1index-1.sex,sex);strcpy(m1index-1.department,department);strcpy(m1index-1.rank,rank); m1index-1.monpay=monpay;void Manager:del(int index)for(int i=index;i=count_Manager-1;i+)m1i-1.number=m1i.number;strcpy

21、(,); strcpy(m1i-1.sex,m1i.sex);strcpy(m1i-1.department,m1i.department);strcpy(m1i-1.rank,m1i.rank); m1i-1.monpay=m1i.monpay;count_Manager-; void Manager:count() int sum=0;int male=0,female=0;for(int i=0;icount_Manager;i+)if(!strcmp(m1i.sex,男)male+;if(!strcmp(m1i.sex,女)female+;sum+;

22、cout總的人數(shù)是:sumendl;cout男的人數(shù)是:maleendl;cout女的人數(shù)是:femaleendl;void Manager:save()ofstream managerfile;managerfile.open(經(jīng)理信息管理.dat);for(int i=0;i=count_Manager-1;i+) managerfilem1i.number m1i.sex m1i.department m1i.rank m1i.monpayendl; managerfile.close();3.3銷售人員類的實(shí)現(xiàn)#include Stuff.hclass Salesma

23、n:public Stuffpublic:void read();void add();void look(); void show();void modify(int); void del(int); void count();void save(); void Input() coutnumber;coutname; coutsex; coutdepartment; coutrank;coutmarketrate; monpay=market*rate;void Output()coutsetw(10)銷售人員信息 setw(10)編號(hào)setw(10)姓名setw(10)性別setw(10

24、)所在部門setw(10)級(jí)別setw(10)月薪endl;coutsetw(10)經(jīng)理信息 setw(10)numbersetw(10)namesetw(10)sexsetw(10)departmentsetw(10)ranksetw(10)monpays1count_Salesman.numbers1count_Ss1count_Salesman.sexs1count_Salesman.departments1count_Salesman.ranks1count_Salesman.monpay;while(!Salesmanfile.eof()Salesmanfil

25、es1count_Salesman.numbers1count_Ss1count_Salesman.sexs1count_Salesman.departments1count_Salesman.ranks1count_Salesman.monpay;count_Salesman+;Salesmanfile.close();void Salesman:add()s1count_Salesman.number=number; strcpy(s1count_S,name); strcpy(s1count_Salesman.sex,sex);strcpy

26、(s1count_Salesman.department,department);strcpy(s1count_Salesman.rank,rank); s1count_Salesman.monpay=monpay; count_Salesman+;void Salesman:look() if(count_Salesman=0) cout對(duì)不起,沒有相關(guān)記錄!endl; return; int choice; cout請選擇查找方式:1、編號(hào)查找 2、姓名查找 choice; while(choice!=1&choice!=2)coutchoice; switch(choice) case

27、1:coutnumber; for(int i=0;icount_Salesman;i+) if(s1i.number=number)s1i.Output();return; cout沒有相關(guān)人員!endl;break;case 2:coutname;for(int i=0;icount_Salesman;i+)if(strcmp(,name)=0)s1i.Output(); return;cout沒有相關(guān)人員!endl;break;default:cout無此選項(xiàng),請重試!endl;break;void Salesman:show() for(int i=0;i=count_

28、Salesman-1;i+) s1i.Output(); void Salesman:modify(int index) s1index-1.number=number; strcpy(,name); strcpy(s1index-1.sex,sex);strcpy(s1index-1.department,department);strcpy(s1index-1.rank,rank); s1index-1.monpay=monpay;void Salesman:del(int index)for(int i=index;i=count_Salesman-1;i+)

29、s1i-1.number=s1i.number;strcpy(,); strcpy(s1i-1.sex,s1i.sex);strcpy(s1i-1.department,s1i.department);strcpy(s1i-1.rank,s1i.rank); s1i-1.monpay=s1i.monpay;count_Salesman-; void Salesman:count() int sum2=0;int male2=0,female2=0;for(int i=0;icount_Salesman;i+)if(!strcmp(s1i.sex,男)male

30、2+;if(!strcmp(s1i.sex,女)female2+; sum2+;cout總的人數(shù)是:sum2endl;cout男的人數(shù)是:male2endl;cout女的人數(shù)是:female2endl;void Salesman:save()ofstream Salesmanfile; Salesmanfile.open(銷售人員信息管理.dat);for(int i=0;i=count_Salesman-1;i+) Salesmanfiles1i.number s1i.sex s1i.department s1i.rank s1i.monpayendl; Salesmanf

31、ile.close();3.4銷售經(jīng)理類的實(shí)現(xiàn)Salesmanager.hclass Salesmanager:public Stuff public: float pay1,market1,rate1; void read(); void add(); void look(); void show(); void modify(int); void del(int); void count();void save(); void Input() coutnumber;coutname; coutsex; coutdepartment; coutrank; coutpay1 market1 r

32、ate1;monpay=market1*rate1+pay1;void Output()coutsetw(10)銷售經(jīng)理信息 setw(10)編號(hào)setw(10)姓名setw(10)性別setw(10)所在部門setw(10)級(jí)別setw(10)月薪endl;coutsetw(10)經(jīng)理信息 setw(10)numbersetw(10)namesetw(10)sexsetw(10)departmentsetw(10)ranksetw(10)monpayss1count_Salesmanager.numberss1count_Sss1count_Salesmana

33、ger.sexss1count_Salesmanager.departmentss1count_Salesmanager.rankss1count_Salesmanager.monpay;while(!Salesmanagerfile.eof()Salesmanagerfiless1count_Salesmanager.numberss1count_Sss1count_Salesmanager.sexss1count_Salesmanager.departmentss1count_Salesmanager.rankss1count_Salesmanager.mo

34、npay;count_Salesmanager+;Salesmanagerfile.close();void Salesmanager:add()ss1count_Salesmanager.number=number; strcpy(ss1count_S,name); strcpy(ss1count_Salesmanager.sex,sex);strcpy(ss1count_Salesmanager.department,department);strcpy(ss1count_Salesmanager.rank,rank); ss1count_Salesmana

35、ger.monpay=monpay; count_Salesmanager+;void Salesmanager:look() if(count_Salesmanager=0) cout對(duì)不起,沒有相關(guān)記錄!endl; return; int choice; cout請選擇查找方式:1、編號(hào)查找 2、姓名查找 choice;while(choice!=1&choice!=2)coutchoice; case 1:coutnumber; for(int i=0;icount_Salesmanager;i+) if(ss1i.number=number)ss1i.Output();return;

36、cout沒有相關(guān)人員!endl;break;case 2:coutname;for(int i=0;icount_Salesmanager;i+)if(strcmp(,name)=0)ss1i.Output(); return;cout沒有相關(guān)人員!endl;break;default:cout無此選項(xiàng),請重試!endl;break;void Salesmanager:show() for(int i=0;i=count_Salesmanager-1;i+) ss1i.Output(); void Salesmanager:modify(int index) ss1index

37、-1.number=number; strcpy(,name); strcpy(ss1index-1.sex,sex);strcpy(ss1index-1.department,department);strcpy(ss1index-1.rank,rank); ss1index-1.monpay=monpay;void Salesmanager:del(int index)for(int i=index;i=count_Salesmanager-1;i+)ss1i-1.number=ss1i.number;strcpy(,)

38、; strcpy(ss1i-1.sex,ss1i.sex);strcpy(ss1i-1.department,ss1i.department);strcpy(ss1i-1.rank,ss1i.rank); ss1i-1.monpay=ss1i.monpay;count_Salesmanager-; void Salesmanager:count() int sum2=0;int male2=0,female2=0;for(int i=0;icount_Salesmanager;i+)if(!strcmp(ss1i.sex,男)male2+;if(!strcmp(ss1i.sex,女)femal

39、e2+;sum2+;cout總的人數(shù)是:sum2endl;cout男的人數(shù)是:male2endl;cout女的人數(shù)是:female2endl;void Salesmanager:save()ofstream Salesmanagerfile; Salesmanagerfile.open(銷售經(jīng)理信息管理.dat);for(int i=0;i=count_Salesmanager-1;i+) Salesmanagerfiless1i.number ss1i.sex ss1i.department ss1i.rank ss1i.monpayendl; Salesmanagerf

40、ile.close();3.5 技術(shù)人員類的實(shí)現(xiàn)Technicist.hclass Technicist:public Stuffpublic: void read(); void add(); void look(); void show(); void modify(int); void del(int); void count(); void save(); void Input() coutnumber;coutname; coutsex; coutdepartment; coutrank;couthour;monpay=100*hour;void Output()coutsetw(1

41、0)技術(shù)人員信息 setw(10)編號(hào)setw(10)姓名setw(10)性別setw(10)所在部門setw(10)級(jí)別setw(10)月薪endl;coutsetw(10)技術(shù)人員信息setw(10)numbersetw(10)namesetw(10)sexsetw(10)departmentsetw(10)ranksetw(10)monpayt1count_Technicist.numbert1count_Tt1count_Technicist.sext1count_Technicist.departmentt1count_Technicist.rankt1c

42、ount_Technicist.monpay;while(!Technicistfile.eof()Technicistfilet1count_Technicist.numbert1count_Tt1count_Technicist.sext1count_Technicist.departmentt1count_Technicist.rankt1count_Technicist.monpay;count_Technicist+;Technicistfile.close();void Technicist:add()t1count_Technicist.number=

43、number; strcpy(t1count_T,name); strcpy(t1count_Technicist.sex,sex);strcpy(t1count_Technicist.department,department);strcpy(t1count_Technicist.rank,rank); t1count_Technicist.monpay=monpay; count_Technicist+;void Technicist:look() if(count_Technicist=0) cout對(duì)不起,沒有相關(guān)記錄!endl; return; int c

44、hoice; cout請選擇查找方式:1、編號(hào)查找 2、姓名查找 choice; while(choice!=1&choice!=2)coutchoice; switch(choice) case 1:coutnumber; for(int i=0;icount_Technicist;i+) if(t1i.number=number)t1i.Output();return; cout沒有相關(guān)人員!endl;break;case 2:coutname;for(int i=0;icount_Technicist;i+)if(strcmp(,name)=0)t1i.Output();

45、 return;cout沒有相關(guān)人員!endl;break;default:cout無此選項(xiàng),請重試!endl;break;void Technicist:show() for(int i=0;i=count_Technicist-1;i+) t1i.Output(); void Technicist:modify(int index) t1index-1.number=number; strcpy(,name); strcpy(t1index-1.sex,sex);strcpy(t1index-1.department,department);strcpy(t1i

46、ndex-1.rank,rank); t1index-1.monpay=monpay;void Technicist:del(int index)for(int i=index;i=count_Technicist-1;i+)t1i-1.number=t1i.number;strcpy(,); strcpy(t1i-1.sex,t1i.sex);strcpy(t1i-1.department,t1i.department);strcpy(t1i-1.rank,t1i.rank); t1i-1.monpay=t1i.monpay;count_Technicis

47、t-; void Technicist:count() int sum1=0;int male1=0,female1=0;for(int i=0;icount_Technicist;i+)if(!strcmp(t1i.sex,男)male1+;if(!strcmp(t1i.sex,女)female1+;sum1+;cout總的人數(shù)是:sum1endl;cout男的人數(shù)是:male1endl;cout女的人數(shù)是:female1endl;void Technicist:save()ofstream Technicistfile; Technicistfile.open(技術(shù)人員信息管理.dat);

48、for(int i=0;i=count_Technicist-1;i+) Technicistfilet1i.number t1i.sex t1i.department t1i.rank t1i.monpayendl; Technicistfile.close();3.6 main.cpp#include #include #include #include #include #include Stuff.h#include Manager.h#include Technicist.h#include Salesman.h#include Salesmanager.hcons

49、t int MAXMANAGER=100;const int MAXTECHNICIST=100;const int MAXSALESMAN=100;const int MAXSALESMANager=100;Manager m1MAXMANAGER;Technicist t1MAXTECHNICIST;Salesman s1MAXSALESMAN;Salesmanager ss1MAXSALESMANager;int count_Manager=0;int count_Technicist=0;int count_Salesman=0;int count_Salesmanager=0;Stu

50、ff *p=NULL;char out;/經(jīng)理管理子菜單void Manager_manage() int choice,i=0; bool quit=false; while(1) system(cls); cout*經(jīng)理管理子菜單*endl; cout 1.添加經(jīng)理信息 endl; cout 2.查詢經(jīng)理信息 endl; cout 3.顯示經(jīng)理信息 endl; cout 4.修改經(jīng)理信息 endl; cout 5.刪除經(jīng)理信息 endl; cout 6.統(tǒng)計(jì)經(jīng)理人數(shù) endl; cout 0.退出 endl; cout*endl; coutchoice; switch(choice) ca

51、se 1: Manager m2;p=&m2; cout請輸入要添加的經(jīng)理的信息n; m2.Input(); for(int i=0;icount_Manager;i+)if(m1i.number=m2.number) cout該編號(hào)的經(jīng)理已存在!=MAXMANAGER) cout經(jīng)理庫已滿,無法添加!endl;return; elsecoutout; if(out=y) p-add(); p-save(); break; case 2:Manager m3;p=&m3; p-look(); system(pause); break; case 3:Manager m4;p=&m4; p-sh

52、ow(); if(count_Manager=0) cout系統(tǒng)中無存儲(chǔ)記錄!endl; system(pause); break; case 4: Manager m5; p=&m5; if(count_Manager=0) cout系統(tǒng)中無存儲(chǔ)記錄!show(); coutindex; for(int i=0;icount_Manager;i+) if(m1i.number=index)cout請對(duì)經(jīng)理信息進(jìn)行修改:Input(); coutout; if(out=y) p-modify(index); p-save(); return; else cout無此經(jīng)理信息!endl; sys

53、tem(pause); break; case 5:Manager m6;p=&m6; int index; if(count_Manager=0) cout經(jīng)理庫為空!endl; else for(int i=0;i=count_Manager-1;i+) coutm1i.number m1i.sex m1i.department m1i.rank m1i.monpayendl; coutindex; for(int i=0;icount_Manager;i+) if(m1i.number=index) cout繼續(xù)endl; coutout; if(out=y) p-de

54、l(index); p-save(); return; cout該編號(hào)的經(jīng)理信息不存在!count(); system(pause);break;case 0:quit=true;break; default:cout請輸入06之間的數(shù)字!endl;break; if(quit=true) break; system(cls); return;/技術(shù)人員管理子菜單void Technicist_manage() int choice,i=0; bool quit=false; while(1) system(cls); cout*技術(shù)人員信息管理子菜單*endl; cout 1.添加技術(shù)人員信

55、息 endl; cout 2.查詢技術(shù)人員信息 endl; cout 3.顯示技術(shù)人員信息 endl; cout 4.修改技術(shù)人員信息 endl; cout 5.刪除技術(shù)人員信息 endl; cout 6.統(tǒng)計(jì)技術(shù)人員人數(shù) endl; cout 0.退出 endl; cout*endl; coutchoice; switch(choice) case 1: Technicist t2;p=&t2; cout請輸入要添加的技術(shù)人員的信息n; t2.Input(); for(int i=0;icount_Technicist;i+)if(t1i.number=t2.number) cout該編號(hào)的

56、技術(shù)人員已存在!=MAXTECHNICIST) cout技術(shù)人員庫已滿,無法添加!endl;return; elsecoutout; if(out=y) p-add(); p-save(); break; case 2:Technicist t3;p=&t3; p-look(); system(pause); break; case 3:Technicist t4;p=&t4; p-show(); if(count_Technicist=0) cout系統(tǒng)中無存儲(chǔ)記錄!endl; system(pause); break; case 4: Technicist t5; p=&t5; if(co

57、unt_Technicist=0) cout系統(tǒng)中無存儲(chǔ)記錄!show(); coutindex; for(int i=0;icount_Technicist;i+) if(t1i.number=index)cout請對(duì)技術(shù)人員信息進(jìn)行修改:Input(); coutout; if(out=y) p-modify(index); p-save(); return; cout無此技術(shù)人員信息!endl; system(pause); break; case 5:Technicist t6;p=&t6; int index; if(count_Technicist=0) cout技術(shù)人員庫為空!e

58、ndl; else for(int i=0;i=count_Technicist-1;i+) coutt1i.number t1i.sex t1i.department t1i.rank t1i.monpayendl; coutindex;for(int i=0;icount_Technicist;i+) if(t1i.number=index) cout繼續(xù)endl; coutout; if(out=y) p-del(index); p-save(); return; cout該編號(hào)的技術(shù)人員信息不存在!count();system(pause);break;case 0:

59、quit=true;break; default:cout請輸入06之間的數(shù)字!endl;break; if(quit=true) break; system(cls); return;/銷售人員管理子菜單void Salesman_manage() int choice,i=0; bool quit=false; while(1) system(cls); cout*銷售人員信息管理子菜單* endl; cout 1.添加銷售人員信息 endl; cout 2.查詢銷售人員信息 endl; cout 3.顯示銷售人員信息 endl; cout 4.修改銷售人員信息 endl; cout 5.

60、刪除銷售人員信息 endl; cout 6.統(tǒng)計(jì)銷售人員人數(shù) endl; cout 0.退出 endl; cout*endl; coutchoice; switch(choice) case 1: Salesman s2;p=&s2; cout請輸入要添加的銷售人員的信息n; s2.Input(); for(int i=0;icount_Technicist;i+)if(s1i.number=s2.number) cout該編號(hào)的銷售人員已存在!=MAXSALESMAN) cout銷售人員庫已滿,無法添加!endl;return; elsecoutout; if(out=y) p-add();

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

最新文檔

評(píng)論

0/150

提交評(píng)論