freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內容

c++小型企業(yè)工資管理系統(tǒng)-文庫吧

2024-11-26 15:13 本頁面


【正文】 大學課程設計報告 第 2 頁 共 25 頁 二、概要設計 首先 ,創(chuàng)建了一個 employee 類 .然后派生出四個類 : manager、technician、 salesman、 sales ,分別是 :數(shù)據(jù)輸入函數(shù) (Input),表格輸出函數(shù) (Print),排序函數(shù) (Pay). 其次 ,在總體結構上 ,建立以各根菜單 ,用于選擇各種功能 . 1. Input(數(shù)據(jù)輸入 ):輸入員工的各種數(shù)據(jù) . 2. Total(數(shù)據(jù)統(tǒng)計 ):將員工的總數(shù)據(jù)進行對比排序 ,然后輸出 . 3. Output(數(shù)據(jù)顯示 ):顯示輸入的各種數(shù)據(jù) . 4. Save(數(shù)據(jù)保存 ):對輸入的數(shù)據(jù)進行保存?zhèn)浞?. 5. Eixt(退出程序 ):執(zhí)行退出程序命令 . 華東交通大學課程設計報告 第 3 頁 共 25 頁 三、詳細設計 1. Input(數(shù)據(jù)輸入 ): 定義了各個崗位的人員的類,并把每個類的人員的屬性設為類中的保護成員,其中技術工的工作時間和每小時的所得為私有成員,而銷售員的銷售額、經理的工資和銷售經理的所轄部門的 銷售額和其底薪設為公有成員,再依次錄入。 2. Total(數(shù)據(jù) 統(tǒng)計 ): 根據(jù)所有類的工資算法在其所屬類中定義一個函數(shù) void pay()來根據(jù)各個職位的具體情況來計算工資,并且算出的工資經過冒泡法排序 . void printtotal() { cout├─────┴──┬──┴─────┤ endl。 cout│ Total │ setw(10)total │ endl。 cout└────────┴────────┘ endl。 } 3. Output(數(shù)據(jù)顯示 ): 通過 dowhile循環(huán)以及制表格和 setw的使用將輸入的數(shù)據(jù)和統(tǒng)計并排序的數(shù)據(jù)以表格的形式打印出來,銷售額合計一欄寬度要大些。 void saleprint() { cout│ setw(10)no1│ setw(10)name1│setw(10)sale1│ endl。 cout├─────┼─────┼─────┤ endl。 cout│ setw(10)no2│ setw(10)name2│setw(10)sale2│ endl。 cout├─────┼─────┼─────┤ endl。 cout│ setw(10)no3│ setw(10)name3│setw(10)sale3│ endl。 cout├─────┼─────┼─────┤ endl。 cout│ setw(10)no4│ setw(10)name4│setw(10)sale4│ endl。 } void print() { cout├─────┼─────┼─────┼─────┼─────┤ endl。 cout │ setw(10)no │ setw(10)name │setw(10)sex│ \ 華東交通大學課程設計報告 第 4 頁 共 25 頁 setw(10)age │ setw(10)salary │endl。 } 4. Save(數(shù)據(jù)保存 ): 通過函數(shù) save()來將輸入的數(shù)據(jù)和統(tǒng)計并排序的數(shù)據(jù)進 行保存 .例如 : void save() { fstream outfile。 (f:,ios::app)。 if(!outfile) { coutf can39。t open.\n。 abort()。 } outfileSales mangerendl。 outfileIDnoNAMEnameSEXsexAGEageSALARYsalaryendl。 } 5. Eixt(退出 ):利用 exit 來完成退出系統(tǒng)功能。 華東交通大學課程設計報告 第 5 頁 共 25 頁 四、設計和調試分析 程序清單 : include include include include include class employee { public: employee() { salary=0。 } void pay(){} void print(){} void input() { coutID:。 cinno。 cout NAME:。 cinname。 cout SEX(m/w):。 cinsex。 cout AGE:。 cinage。 } protected: int no。 華東交通大學課程設計報告 第 6 頁 共 25 頁 char name[8]。 float salary。 char sex。 int age。 }。 class manager:virtual public employee { protected: float monthlypay,sale。 public: manager(){monthlypay=8000。} void input(){coutManger。employee::input()。} void save() { fstream outfile。 (f:,ios::app)。 if(!outfile) { coutf can39。t open.\n。 abort()。 } outfileMangerendl。 outfileIDnoNAMEnameSEXsexAGEageSALARYsalaryendl。 } void pay(){salary=monthlypay。} void print() { cout├─────┼─────┼─────┼───
點擊復制文檔內容
研究報告相關推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1