c++-小型公司工資管理系統(tǒng)實習(xí)報告_第1頁
c++-小型公司工資管理系統(tǒng)實習(xí)報告_第2頁
c++-小型公司工資管理系統(tǒng)實習(xí)報告_第3頁
c++-小型公司工資管理系統(tǒng)實習(xí)報告_第4頁
c++-小型公司工資管理系統(tǒng)實習(xí)報告_第5頁
已閱讀5頁,還剩7頁未讀, 繼續(xù)免費閱讀

下載本文檔

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

文檔簡介

1、精選優(yōu)質(zhì)文檔-傾情為你奉上精選優(yōu)質(zhì)文檔-傾情為你奉上專心-專注-專業(yè)專心-專注-專業(yè)精選優(yōu)質(zhì)文檔-傾情為你奉上專心-專注-專業(yè)#include #include #include #include using namespace std;const A=2;const B=4;int a,b,c,d,s;class employee /員工(基類)protected:string name;int num;int age;char sex;double pay;public: employee() name=0; num=0; age=0; sex=0; pay=0; void set() c

2、outname;coutsex;coutage;int get1()return num;string get2()return name;char get3()return sex;int get4()return age;double payment()return pay;class technician:public employee /技術(shù)員protected:int workhour;public:void set()coutnum;employee:set();coutworkhour;coutendl;pay=100*workhour;technician teA;class

3、manager:public employee /經(jīng)理public:void set()coutnum;employee:set();coutendl;int get()return 8000;manager manaA;class seller:public employee /銷售員protected:double sell;int managernum;public:void set()coutnum;employee:set();coutsell;coutmanagernum;pay=sell*0.04;coutendl;int get5()return managernum;doub

4、le get6() return sell;void tongji()coutsetw(12)numsetw(12)namesetw(12)sellendl; ;seller seB;class sellmanager:public employee /銷售經(jīng)理protected:int sumsale;public:void set()coutnum;employee:set(); coutendl; for (int i=0;iB;i+) if (num=sei.get5()sumsale=sumsale+sei.get6(); pay=5000+sumsale*0.005;void to

5、ngji()cout職工號為 num 銷售經(jīng)理 name 下屬銷售員的業(yè)績?yōu)椋篹ndl; coutendl;coutsetw(12)職工號setw(12)姓名setw(12)銷售額 endl;sellmanager semanaA;void line()cout-endlendl;void shuru1() for(a=0;aA;a+)tea.set();line();void shuru2() for(a=0;aA;a+)manaa.set();line();void shuru3() for(b=0;bB;b+)seb.set();line();void shuru4() for(a=0;

6、aA;a+)semanaa.set();line();void mulu()cout 小型公司工資管理系統(tǒng) endl; coutendl;cout 請選擇您所需的操作 endl; cout 數(shù)據(jù)輸入:1,并按回車鍵 endl;cout 數(shù)據(jù)統(tǒng)計:2,并按回車鍵 endl;cout 數(shù)據(jù)打?。?,并按回車鍵 endl;cout 數(shù)據(jù)備份:4,并按回車鍵 endl;cout 退出系統(tǒng):5,并按回車鍵 endl; coutendl;coutc;coutendl;void cijimulu()cout 小型公司工資管理系統(tǒng) endl; coutendl;cout 請選擇您所需的操作 endl; cou

7、t技術(shù)員數(shù)據(jù)輸入: 1,并按回車鍵 endl;cout經(jīng)理數(shù)據(jù)輸入: 2,并按回車鍵 endl;cout銷售員數(shù)據(jù)輸入: 3,并按回車鍵 endl;cout銷售經(jīng)理數(shù)據(jù)輸入:4,并按回車鍵 endl;cout返回上一級: 5,并按回車鍵 endl; coutendl;coutd;coutendl; void biaotou()coutendl; coutsetw(12)職工號setw(12)姓名setw(12)性別setw(12)年齡setw(12)工資endl;void biaozhong() coutendl;void biaowei()coutendl; void tongji() in

8、t a,b,s; for(a=0;aA;a+) s=0; semanaa.tongji(); for(b=0;bB;b+) if(seb.get5()=semanaa.get1() coutendl; seb.tongji(); s=s+seb.get6(); coutendl; coutsetw(8)銷售額總計: setw(21)s endl; coutendl; cout銷售經(jīng)理按工資排序為:endl; biaotou(); for(int i=0;iA-1;i+) for(int j=i+1;jA;j+) if(semanai.payment()semanaj.payment() sel

9、lmanager g; g=semanai; semanai=semanaj; semanaj=g; for (int k=0;kA;k+) biaozhong(); coutsetw(12)semanak.get1()setw(12)semanak.get2()setw(12)semanak.get3()setw(12)semanak.get4()setw(12)semanak.payment()endl; biaowei();void daying()int k;cout請等待.endlendl;cout職工基本情況一覽表如下endlendl;cout技術(shù)員endlendl;biaotou

10、();for(k=0;kA;k+)biaozhong();coutsetw(12)tek.get1()setw(12)tek.get2()setw(12)tek.get3()setw(12)tek.get4()setw(12)tek.payment()endl; biaowei();line(); cout經(jīng)理endlendl; biaotou();for(k=0;kA;k+)biaozhong();coutsetw(12)manak.get1()setw(12)manak.get2()setw(12)manak.get3()setw(12)manak.get4()setw(12)manak.

11、get()endl; biaowei(); line(); cout銷售經(jīng)理endlendl; biaotou();for(k=0;kA;k+)biaozhong();coutsetw(12)semanak.get1()setw(12)semanak.get2()setw(12)semanak.get3()setw(12)semanak.get4()setw(12)semanak.payment()endl; biaowei(); line(); cout銷售員endlendl; coutendl; coutsetw(8)職工號setw(8)姓名setw(8)性別setw(8)年齡setw(8

12、)工資setw(20)所屬部門經(jīng)理endl; for(k=0;kB;k+) coutendl; coutsetw(8)sek.get1()setw(8)sek.get2()setw(8)sek.get3()setw(8)sek.get4()setw(8)sek.payment()setw(20)sek.get5()endl; coutendlendl; cout-endlendl;void beifen()ofstream myfile(qt.txt);int k;cout請等待.endlendl;myfile職工基本情況一覽表如下endlendl;myfile技術(shù)員endlendl;myfi

13、leendl; myfilesetw(12)職工號setw(12)姓名setw(12)性別setw(12)年齡setw(12)工資endl;for(k=0;kA;k+)myfileendl;myfilesetw(12)tek.get1()setw(12)tek.get2()setw(12)tek.get3()setw(12)tek.get4()setw(12)tek.payment()endl; myfileendl; myfile經(jīng)理endlendl; myfileendl; myfilesetw(12)職工號setw(12)姓名setw(12)性別setw(12)年齡setw(12)工資e

14、ndl;for(k=0;kA;k+)myfileendl;myfilesetw(12)manak.get1()setw(12)manak.get2()setw(12)manak.get3()setw(12)manak.get4()setw(12)manak.get()endl; myfileendl; myfile銷售經(jīng)理endlendl; myfileendl; myfilesetw(12)職工號setw(12)姓名setw(12)性別setw(12)年齡setw(12)工資endl;for(k=0;kA;k+)myfileendl;myfilesetw(12)semanak.get1()s

15、etw(12)semanak.get2()setw(12)semanak.get3()setw(12)semanak.get4()setw(12)semanak.payment()endl; myfileendl; myfile銷售員endlendl; myfileendl; myfilesetw(8)職工號setw(8)姓名setw(8)性別setw(8)年齡setw(8)工資setw(20)所屬部門經(jīng)理endl; for(k=0;kB;k+) myfileendl; myfilesetw(8)sek.get1()setw(8)sek.get2()setw(8)sek.get3()setw(8)sek.get4()setw(8)sek.payment()setw(20)sek.get5()endl; myfileendlendl; int main()while (c!=5)mulu();line();switch(c)ca

溫馨提示

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

最新文檔

評論

0/150

提交評論