




版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報(bào)或認(rè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)計(jì):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)銷售額總計(jì): setw(21)s endl; coutendl; cout銷售經(jīng)理按工資排序?yàn)?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)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 員工保密協(xié)議合同
- 礦權(quán)轉(zhuǎn)讓居間合同
- 房產(chǎn)出售委托協(xié)議書
- 旅游服務(wù)合作協(xié)議
- 公路工程投資合伙協(xié)議
- 人教版五年級下冊數(shù)學(xué)求最大公因數(shù)練習(xí)300題及答案
- 鐵肩中學(xué)門衛(wèi)合同8篇
- 第1課 殖民地人民的反抗斗爭(教學(xué)設(shè)計(jì)) 九年級歷史下冊同步高效課堂(部編版)
- 第十章 第4節(jié) 跨學(xué)科實(shí)踐:制作微型密度計(jì)(教學(xué)設(shè)計(jì))2024-2025學(xué)年度人教版(2024)物理八年級下冊
- 房屋健康監(jiān)測設(shè)備安裝協(xié)議
- 2024年河南鄭州二七區(qū)侯寨中心衛(wèi)生院招聘筆試真題
- 數(shù)學(xué)-山東省天一大聯(lián)考齊魯名校教研共同體2024-2025學(xué)年(下)高三開學(xué)質(zhì)量檢測聯(lián)考試題和答案
- 2025-2030年中國電解鋁市場需求規(guī)模分析及前景趨勢預(yù)測報(bào)告
- 閩教版(2020)小學(xué)信息技術(shù)三年級上冊第2課《人工智能在身邊》說課稿及反思
- 正面上手發(fā)球技術(shù) 說課稿-2023-2024學(xué)年高一上學(xué)期體育與健康人教版必修第一冊
- 2025年上海寶冶集團(tuán)限公司招聘歷年高頻重點(diǎn)提升(共500題)附帶答案詳解
- 佛山市普通高中2025屆高三下學(xué)期一??荚嚁?shù)學(xué)試題含解析
- 人教 一年級 數(shù)學(xué) 下冊 第6單元 100以內(nèi)的加法和減法(一)《兩位數(shù)加一位數(shù)(不進(jìn)位)、整十?dāng)?shù)》課件
- 事故隱患排查治理情況月統(tǒng)計(jì)分析表
- 救護(hù)車掛靠私立醫(yī)院協(xié)議書(2篇)
- 《血透患教》課件
評論
0/150
提交評論