




版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領
文檔簡介
1、精選優(yōu)質文檔-傾情為你奉上精選優(yōu)質文檔-傾情為你奉上專心-專注-專業(yè)專心-專注-專業(yè)精選優(yōu)質文檔-傾情為你奉上專心-專注-專業(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 /技術員protected:int workhour;public:void set()coutnum;employee:set();coutworkhour;coutendl;pay=100*workhour;technician teA;class
3、manager:public employee /經理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 /銷售經理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 銷售經理 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 數據輸入:1,并按回車鍵 endl;cout 數據統(tǒng)計:2,并按回車鍵 endl;cout 數據打?。?,并按回車鍵 endl;cout 數據備份:4,并按回車鍵 endl;cout 退出系統(tǒng):5,并按回車鍵 endl; coutendl;coutc;coutendl;void cijimulu()cout 小型公司工資管理系統(tǒng) endl; coutendl;cout 請選擇您所需的操作 endl; cou
7、t技術員數據輸入: 1,并按回車鍵 endl;cout經理數據輸入: 2,并按回車鍵 endl;cout銷售員數據輸入: 3,并按回車鍵 endl;cout銷售經理數據輸入: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銷售經理按工資排序為: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技術員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經理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銷售經理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)所屬部門經理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技術員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經理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銷售經理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)所屬部門經理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)系上傳者。文件的所有權益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經權益所有人同意不得將文件中的內容挪作商業(yè)或盈利用途。
- 5. 人人文庫網僅提供信息存儲空間,僅對用戶上傳內容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
- 6. 下載文件中如有侵權或不適當內容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 農業(yè)產業(yè)園可行性分析報告
- 建筑給排水設計規(guī)范gb50015
- 商業(yè)街區(qū)商業(yè)規(guī)劃手冊
- 智能生產線設備維護指南
- 三農文化傳播策略方案
- 重慶高新技術產業(yè)
- 開題可行性分析報告模板
- 醫(yī)療設備操作與使用說明手冊
- 農業(yè)產業(yè)鏈協(xié)同發(fā)展方案
- 衛(wèi)星導航定位系統(tǒng)技術應用文檔
- 關于優(yōu)化員工溝通渠道的通知
- 工藝品加工合同6篇
- 2025年第六屆全國國家版圖網絡知識競賽題庫及答案(中小學組)
- 3《鴻門宴》課件 2024-2025學年統(tǒng)編版高一語文必修下冊
- 【新】部編人教版小學4四年級《道德與法治》下冊全冊教案
- 2025年遼寧石化職業(yè)技術學院單招職業(yè)傾向性測試題庫審定版
- 安徽省六校2024-2025學年高三下學期2月素質檢測考試生物學試題(含解析)
- 【道 法】做自信的人 課件-2024-2025學年統(tǒng)編版道德與法治七年級下冊
- 醫(yī)保電子憑證培訓
- 施工現(xiàn)場交叉作業(yè)安全防護管理措施
- 特殊學生檔案
評論
0/150
提交評論