![高校人事管理系統(tǒng)設(shè)計說明書_第1頁](http://file3.renrendoc.com/fileroot_temp3/2022-1/6/6481ab41-316d-42bb-ab90-6064250e9e82/6481ab41-316d-42bb-ab90-6064250e9e821.gif)
![高校人事管理系統(tǒng)設(shè)計說明書_第2頁](http://file3.renrendoc.com/fileroot_temp3/2022-1/6/6481ab41-316d-42bb-ab90-6064250e9e82/6481ab41-316d-42bb-ab90-6064250e9e822.gif)
![高校人事管理系統(tǒng)設(shè)計說明書_第3頁](http://file3.renrendoc.com/fileroot_temp3/2022-1/6/6481ab41-316d-42bb-ab90-6064250e9e82/6481ab41-316d-42bb-ab90-6064250e9e823.gif)
![高校人事管理系統(tǒng)設(shè)計說明書_第4頁](http://file3.renrendoc.com/fileroot_temp3/2022-1/6/6481ab41-316d-42bb-ab90-6064250e9e82/6481ab41-316d-42bb-ab90-6064250e9e824.gif)
![高校人事管理系統(tǒng)設(shè)計說明書_第5頁](http://file3.renrendoc.com/fileroot_temp3/2022-1/6/6481ab41-316d-42bb-ab90-6064250e9e82/6481ab41-316d-42bb-ab90-6064250e9e825.gif)
版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報或認(rèn)領(lǐng)
文檔簡介
1、2020年最新您可自由編輯高校人事管理系統(tǒng)設(shè)計說明書多年實戰(zhàn)經(jīng)驗專業(yè)文庫落地性強(qiáng)值得你下載擁有*實踐教學(xué)*蘭州理工大學(xué)計算機(jī)與通信學(xué)院2011年秋季學(xué)期面向?qū)ο笳n程設(shè)計題 目:高校人事管理系統(tǒng)專業(yè)班級:計算機(jī)科學(xué)與技術(shù)四班姓 名:李睦芬學(xué) 號:10240441指導(dǎo)教師:朱紅蕾成 績:摘要在當(dāng)前的全球信息化的浪潮中,無論是企業(yè)、政府機(jī)關(guān),還是各大高校,要想完善自身的管理體系, 就必須擁有一套完善的并且適合自身特點的信息化管理系統(tǒng),以實現(xiàn)降低管理成本、及時反饋人員變動信息、節(jié)省人力資源、提高經(jīng)濟(jì)效益、完善管理體系等目的。以高校為例,本文利用 Microsoft Visual C+ 6.0 編寫程序
2、,實現(xiàn)了用戶對學(xué)校教師、 實驗員、 行政人員、 教師兼實驗員和行政人員兼職教師5 類人員的工資管理,簡單明了,容易操作。本程序主要有六個功能模塊:添加人員信息、查詢?nèi)藛T信息、修改人員信息、刪除人員信息、顯示人員信息和保存人員信息。已經(jīng)過全面的系統(tǒng)測試,能夠很好的運(yùn)行,達(dá)到了預(yù)期的效果。關(guān)鍵詞: 程序設(shè)計 C+ 人員信息 工資管理- 7 -摘 要 1第一章 緒論 31 1 課程設(shè)計的目的 31 2 課程設(shè)計的背景和意義31 2 1課程設(shè)計的背景 31 2 2課程設(shè)計的意義 31 3課程設(shè)計環(huán)境 3第二章需求分析 42 1問題描述 43 2功能要求 44 3問題的解決方案 4第三章系統(tǒng)設(shè)計 65
3、1數(shù)據(jù)設(shè)計 631 1類設(shè)計 631 2類之間的關(guān)系 731 3函數(shù)設(shè)計 73 2結(jié)構(gòu)設(shè)計 7第四章系統(tǒng)測試 124 1模塊測試 125 2 課程設(shè)計過程中遇到的問題 15參考文獻(xiàn) 16附錄 17總結(jié) 42致謝 43第一章 緒論1 1 課程設(shè)計的目的1、熟練掌握C+語言的基本知識和技能。2、基本掌握面向?qū)ο蟪绦蛟O(shè)計的基本思路和方法。3、利用所學(xué)的基本知識和技能,解決簡單的面向?qū)ο蟪绦蛟O(shè)計問題。1 2 課程設(shè)計的背景和意義 1 2 1 課程設(shè)計的背景1. 理論研究基礎(chǔ)(1) C+語言的基本知識和技能,如:類與對象,輸入和輸出,文本文件的 建立和保存等。( 2)面向?qū)ο蟮某绦蛟O(shè)計的基本思路和方法。
4、2. 技術(shù)層面的支持MiCrosoft Visual C+ 6.0 編譯平臺1 2 2 課程設(shè)計的意義以高校為例,本文利用 MiCrosoft Visual C+ 6.0 編寫程序,實現(xiàn)了用戶對學(xué)校教師、 實驗員、 行政人員、 教師兼實驗員和行政人員兼職教師5 類人員的工資管理,實現(xiàn)了降低管理成本、及時反饋人員變動信息、節(jié)省人力資源、提高經(jīng)濟(jì)效益、完善管理體系等目的。同時,鍛煉自己,利用所學(xué)的基本知識和技能,解決簡單的面向?qū)ο蟪绦蛟O(shè)計問題。1. 3 課程設(shè)計環(huán)境軟件: Windows XP professional SP2 操作系統(tǒng)MiCrosoft Visual C+ 6.0第二章 需求分析
5、2 1 問題描述某高校有五類職工:教師,實驗員,行政人員,教師兼職實驗員,行政人員兼職教師。共有的信息包括:編號、姓名、性別和職工類別。每類人員特有的信息,請根據(jù)情況自行添加。職工工資的計算方法如下:教師:基本工資+課時費;實驗員:基本工資+實驗室補(bǔ)助;行政人員:基本工資+行政補(bǔ)貼;教師兼職實驗員:基本工資+課時費+實驗室補(bǔ)助;行政人員兼職教師:基本工資+行政補(bǔ)貼+課時費;其中:1)基本工資:教師800 元,實驗員 650 元,行政人員 750 元2)行政補(bǔ)貼:250 元3)實驗室補(bǔ)助:150 元4)課時費的計算方法為:20* 本月課時數(shù)2 2 功能要求( 1)對各類人員信息完成的基本功能有:
6、1) 添加功能:程序能夠添加相應(yīng)的記錄;2) 查詢功能:能根據(jù)編號和姓名進(jìn)行查詢,并顯示相應(yīng)的記錄信息;3) 編輯功能:根據(jù)查詢結(jié)果對相應(yīng)的記錄進(jìn)行修改;4)刪除功能:根據(jù)查找結(jié)果,完成具體記錄的刪除。5)保存功能:將對高校人員信息進(jìn)行的添加、刪除、修改結(jié)果保存到文本文件中。( 2)本程序處理的任務(wù)是:輸入職工的相關(guān)數(shù)據(jù),經(jīng)過計算后,輸出職工的月工資,并將所有信息保存在文本文件中。( 3)學(xué)生在完成本次課程設(shè)計的基本要求后,進(jìn)一步完善程序,從如下幾個方面加以考慮:( ) 添加人員記錄時,考慮各種數(shù)據(jù)的有效性。2)組合查詢功能的實現(xiàn)。3)編輯數(shù)據(jù)時,注意操作的方便4)刪除數(shù)據(jù)時,考慮刪除操作的方
7、便5)輸入、輸出操作時的方便、易用2 3 問題的解決方案根據(jù)系統(tǒng)功能要求,可以將問題解決分為以下步驟: 1)應(yīng)用系統(tǒng)分析,建立該系統(tǒng)的功能模塊框圖以及界面的組織和設(shè)計; 2)分析系統(tǒng)中的各個實體及它們之間的關(guān)系; 3)根據(jù)問題描述,設(shè)計系統(tǒng)的類層次; 4)完成類層次中各個類的描述; 5)完成類中各個成員函數(shù)的定義; 6)完成系統(tǒng)的應(yīng)用模塊; 7)功能調(diào)試; 8)完成系統(tǒng)總結(jié)報告。第三章 系統(tǒng)設(shè)計3 1 數(shù)據(jù)設(shè)計3 1 1 類設(shè)計1 .基類person包含各類人員所共有的屬性(編號 num、姓名name性別 sex、職工類別title和exist (判斷對象是否刪除)作為數(shù)據(jù)成員,供各 個派生類
8、繼承。2 .教師類teacher公用虛繼承person類,并包括本月課時數(shù) classnunr教 師基本工資工資salaryl和教血工資teacher_salary(乍為本類數(shù)據(jù)成員。3 .實驗員類test:公用虛繼承person類,并包括實驗員基本工資工資 salary2、 實驗室補(bǔ)助test_allowance和實驗員工資test_salary作為本類數(shù)據(jù)成員。4 .行政人員類official :公用虛繼承person類,并包括行政人員基本工資工 資salary行政補(bǔ)貼oficial_allowance和行政人員工資test_salary作為本 類數(shù)據(jù)成員。5 .教師兼實驗員類teache
9、r_test多重繼承teacher類和test類,并包括教師 兼實驗員工資salary4 作為本類數(shù)據(jù)成員。6 .行政人員兼教師類teacher_oficial :多重繼承teacher類和official類,并 包括行政人員兼教師工資salary5作為本類數(shù)據(jù)成員。7 .操作operate類:為以上各類的友元類,用于求各類對象的工資。- 11 -3.1.2類之間的關(guān)系如圖,定義基類person,定義三個派生類teacher; test、official公有虛繼承 person類(虛繼承是為了避免二義性),再定義teacher_test和teacher_oficial兩 個類分別多重繼承tea
10、cheK test和teacher; official 0定義operate類為各類友元3. 1. 3函數(shù)設(shè)計l.person類成員函數(shù)person()exist=1;無參構(gòu)造函數(shù)person(stringn,stringna,chars,stringti):num(n),name(na),sex(s),title(ti)exist=1;構(gòu)造函數(shù)void person_set()set函數(shù),用于添加對象和修改對象數(shù)據(jù)void person_input(ifstream& iput)person_input函數(shù),用于從文件讀取數(shù)據(jù)void person_display()person_d
11、isplay函數(shù),用于向顯示器輸出數(shù)據(jù)void person_output(ofstream& oput)person_output函數(shù),用于向文件輸出數(shù)據(jù)string person_getnum()string person_getnum函數(shù),用于獲取 num 值string person_getname()string person_getname8數(shù),用于獲取 name值 void changeexist()void changeexist 函數(shù),用于改變exist 值int person_exist()int person_exist 函數(shù),用于獲得exist 值2 .教師類成
12、員函數(shù)teacher()無參構(gòu)造函數(shù)teacher(string n,string na,char s,string ti,int sa,int cnum):person(n,na,s,ti),salary1(sa),classnum(cnum)構(gòu)造函數(shù)void teacher_set()一set函數(shù),用于添加對象和修改對象數(shù)據(jù)void teacher_input(ifstream& iput)teacher_input函數(shù),用于從文件讀取數(shù)據(jù)void teacher_display()teacher_display函數(shù),用于向顯示器輸出數(shù)據(jù)void teacher_output(of
13、stream& oput)teacher_output函數(shù),用于向文件輸出數(shù)據(jù)string teacher_getnum()teacher_getnumS數(shù),用于獲取 num 值string teacher_getname()teacher_getnameS數(shù),用于獲取 name 值3 .實驗員類成員函數(shù)test()無參構(gòu)造函數(shù)test(string n,string na,char s,string ti,int sa):person(n,na,s,ti),salary2(sa)構(gòu)造函數(shù)void test_set()一set函數(shù),用于添加對象和修改對象數(shù)據(jù)void test_inpu
14、t(ifstream& iput)test_input函數(shù),用于從文件讀取數(shù)據(jù)void test_display()test_display函數(shù),用于向顯示器輸出數(shù)據(jù)void test_output(ofstream& oput)test_output函數(shù),用于向文件輸出數(shù)據(jù)string test_getnum()test_getnum函數(shù),用于獲取 num 值string test_getname()test_getname®數(shù),用于獲取 name值4 .行政人員類成員函數(shù)official()無參構(gòu)造函數(shù)official(string n,string na,cha
15、r s,string ti,int sa):person(n,na,s,ti),salary2(sa)構(gòu)造函數(shù)void official_set()set函數(shù),用于添加對象和修改對象數(shù)據(jù)void official_input(ifstream& iput)official_input 函數(shù),用于從文件讀取數(shù)據(jù)void official_display()official_display 函數(shù),用于向顯示器輸出數(shù)據(jù)void official_output(ofstream& oput)official_output 函數(shù),用于向文件輸出數(shù)據(jù)string official_getn
16、um()official_getnum 函數(shù),用于獲取num 值string official_getname()official_getname函數(shù),用于獲取 name值5 .教師兼實驗員類成員函數(shù)teacher_test()無參構(gòu)造函數(shù)teacher_test(stringn,stringna,char s,string ti,intsa):person(n,na,s,ti),salary2(sa)構(gòu)造函數(shù)void teachertest_set()一set函數(shù),用于添加對象和修改對象數(shù)據(jù)void teachertest_input(ifstream& iput)teacherte
17、stjnput®數(shù),用于從文件讀取數(shù)據(jù)void teachertest_display()teachertest_display§數(shù),用于向顯示器輸出數(shù)據(jù)void teachertest_output(ofstream& oput)teachertest_outputS數(shù),用于向文件輸出數(shù)據(jù)string teachertest_getnum()teachertest_getnumS數(shù),用于獲取 num 值string teachertest_getname()teachertest_getnameS數(shù),用于獲取 name值6 .行政人員兼教師類成員函數(shù)teacher
18、_official() 無參構(gòu)造函數(shù)teacher_official(string n,string na,char s,string ti,intsa):person(n,na,s,ti),salary2(sa)構(gòu)造函數(shù)void teacherofficial_set()一set函數(shù),用于添加對象和修改對象數(shù)據(jù)void teacherofficial_input(ifstream& iput)teacherofficial_input 函數(shù),用于從文件讀取數(shù)據(jù)void teacherofficial_display()teacherofficial_display 函數(shù),用于向顯示器
19、輸出數(shù)據(jù)void teacherofficial_output(ofstream& oput)teacherofficial_output 函數(shù), 用于向文件輸出數(shù)據(jù)string teacherofficial_getnum()teacherofficial_getnum 函數(shù),用于獲取 num 值 string teacherofficial_getname()teacherofficial_getname函數(shù),用于獲取 name值7 .operate類成員函數(shù)void operate1(teacher &p)operatel函數(shù),用于求教師類對象的工資void operat
20、e2(test &p)operate2函數(shù),用于求實驗員類對象的工資void operate3(official &p)operate3函數(shù),用于求行政人員類對象的工資void operate4(teacher_test &p)operate4函數(shù),用于求教師兼實驗員類對象的工void operate5(teacher_official &p)operate5函數(shù),用于求行政人員兼教師類對象的 工資3.2結(jié)構(gòu)設(shè)計- 15 -第四章系統(tǒng)測試4. 1模塊測試測試抓圖:炎委會會交會會會眾竟成,請選擇所需服分編號二 請選擇數(shù)據(jù)輸入方式;1 .從鍵盤輸入 2 .從文程更入
21、歡迎使用 高校人員工資管理系統(tǒng)圖 F,C;>DCument5 and Setting與QDT2一、*宴而'.salaryDuhu勺 1lary.Exs”二I可X加詢改除一 雪修刪顯保退XIni-#-幽 F;Documents and 5已廿而娶0072222 22厚面53|317呢皿953|31"7*已:”門k保存b-iRifj退七前謂保存,否占業(yè)務(wù)查詢功能;請依次輸入所要查詢的編號號和姓名 例如:眄電秣明:0001張態(tài)號四靦1姓名司卡杰 性別小 職工翔取款師 本為講時數(shù):12g 1:3200輸入數(shù)據(jù)完成.請選擇所需服務(wù)編號上加詢廢除看出前務(wù)iD修刪員保退出出 * A
22、* 六 * 存逐 保人 請目-# -14 *1S嚕尊教 3編請B3編請LQ| "!C:l>ocuments and Settings007laryrDebog&aLary.exe"次嶄人所要修改的人員的編號號和姓名(例如硼配張明”的0靛姓名:眼杰性別加要工類別:教師本月譚時數(shù):1如工資通皿 擇您所需要修改的數(shù)據(jù)的空工類型:師2.實騏員3.行政人得4.教師兼實臉員1行政人員兼教師 請依次輸入編號.姓名、性別和職工類別。如是教師.輸入本月課時數(shù)0001張杰e教師110占我也也女女女女女 女眾 卷卷眾女眾女會卷祗球建Er釵女出吸獸卷 輸入數(shù)據(jù)完成.請選擇所需服務(wù)編號
23、:2 3 4 E £ 7/改除一看出 番修刪顯保退退_出刖請保存,表苔川西哲去在心在在券我我券食我我公心Jt Ji II Jl Ji ill II出入八八3AAA3入入內(nèi)八A人AA曩圖*K所要刪除的人員的的編號號和姓名(例如 '01弓妹:fl001 張明):本月課時數(shù)門工附工資;入行政人員兼教師號海酗工姓名二張杰 性別/整工類別二教師 連星您所需要刪除的數(shù)據(jù)的職工類型=.教師2.系驗員3.行政人員4.教師兼實驗員際成功,打我丹言 ii人數(shù)據(jù)完成,請選擇所需服務(wù)編號:出的詢保存,出加詢改除 寓修刪S3 'C:Docunients and Setting510072息面、
24、疑后華、口也叫拈口0叩,其亡”依我表表食六會表會會去泰人表食A備六代會女會聶最妥泰00 02840*- 2譚工工工15o:2數(shù) 建數(shù)時 數(shù)時課 日時彗 R00普本 湘;1月本s:600n 資本員 課課資:6資工員人 月月工員驗政 本本工員至實行 員員人 師師驗員人政裾師 蒙買垃政一tew 另另另:另T-3另 工工工羹工類工工職職職工工職工職職舊眼眼E Em « ,皿 nJmIT 七Ems-0-二-V 性性性s性別性性 性性性 成君南:林,鵬宇 純整兵源正程3 鄭方王北出陳劉夏 B 9 B 名名名畬名名名名 姓姓姓K姓姓姓姓 14自心0000幽弛flflg 1000i犯信:0:0:0_
25、u 11 HFl-¥ * - z工 DrurnlpoIPOIFOIPOIPnlp* n叮例-可口q =可口可=叼閂_引- 21 -編號:嬲曬 姓名:張詩龍 性別皿 職工類別:教師兼行政人員 本月課時數(shù)式5 XU=2ie笈心心泰強(qiáng)妥泰食公會會心會聶臺聶會善會聶戲會會會會會表會擊泰 始1 %數(shù)據(jù)完成,請選擇所需黑點編號:立 加詢改除 添查修刪困 ""UDccumpnt鼻and 宓11111口£100丁2e2E印2 2面5_3口”>|)叩813/足w2''加詢改除一再出 .毒修刪顯保退春出改性坦兇退出前請保存,.過我 « 六 產(chǎn)
26、乂造已保存!玄 £玲 。人數(shù)據(jù)完成,請選擇所需服務(wù)編號工退出劇語保存,在含 £ 備含含畫"CDocu ments a nd 5cttinq多、。07足2 2'川建面Isalary'Debuglsalary.Exe"J9J2S-顯不 .保左 .退出退出叫請保存T加詢改除一等出 雪修刪>保1E承已保存,i!人數(shù)據(jù)完成.請選擇所需服務(wù)編號!由謝使用!pes£ any kej to continue 為拼音 :4. 2課程設(shè)計過程中遇到的問題剛開始做課設(shè)時,的確遇到了很多問題,比如對象怎么刪除、怎么存檔等。 在老師的幫助下,自己也
27、參考了一些書,逐漸打開了思路,解決了問題。例如, 定義對象時加一個變量 exist,通過改變它的值來判斷是否刪除;把各個類的對 象分開存在不同的文檔,并引入計數(shù)變量來統(tǒng)計各個類的對象數(shù),方便下次讀入 數(shù)據(jù)。解決了這些問題,感到自己的編程水平有明顯提高, 對于一些常見問題能夠 很好的解決了。參考文獻(xiàn)1 陳維興,林小茶.c+ 面向?qū)ο蟪绦蛟O(shè)計教程. 北京 : 清華大學(xué)出版社,1996.2004.2 張國峰 . C+ 程序設(shè)計實用教程. 北京 : 清華大學(xué)出版社, 1996.3 張松梅 . C+ 語言教程 . 電子科技大學(xué)出版社, 1993.4閻龍.C程序員的C+旨南.北京航空航天大學(xué)出版社,199
28、2.5 王博 . 面向?qū)ο蟮慕?、設(shè)計技術(shù)與方法 . 北京希望電腦公司, 1990.- 31 -s,stringsa,int程序代碼:Salary.h:#include<iostream>#include<fstream>#include<string>using namespace std;class operate;/基類“人”class personpublic:person()exist=1;person(stringn,stringna,charti):num(n),name(na),sex(s),title(ti)exist=1;void per
29、son_set();void person_input(ifstream& iput);void person_display();void person_output(ofstream& oput);string person_getnum();string person_getname();void changeexist();int person_exist();friend operate;private:string num;string name;char sex;string title;int exist;/教師類class teacher:virtual pu
30、blic personpublic:teacher()teacher(string n,string na,char s,string ti,intcnum):person(n,na,s,ti),salary1(sa),classnum(cnum)void teacher_set();void teacher_input(ifstream& iput);void teacher_display();void teacher_output(ofstream& oput);string teacher_getnum();string teacher_getname();friend
31、 operate;protected:int classnum;private:int salary1;static int teacher_salary;/實驗員類 class test:virtual public personpublic:test()test(string n,string na,char s,string ti,int sa):person(n,na,s,ti),salary2(sa) void test_set();void test_input(ifstream& iput);void test_display();void test_output(ofs
32、tream& oput);string test_getnum();string test_getname();friend operate;private:int salary2;static int test_salary;static int test_allowance;/行政人員類class official:virtual public person public:official() official(stringn,stringna,chars,stringti,intsa):person(n,na,s,ti),salary3(sa)void official_set(
33、);void official_input(ifstream& iput);void official_display();void official_output(ofstream& oput);string official_getnum();string official_getname();friend operate;private:int salary3;static int official_salary;static int official_allowance;/教師兼職實驗員class teacher_test:public teacher,public t
34、estpublic:teacher_test()teacher_test(string n,string na,char s,string ti,int sa1,int sa2,int cnum,int sa3):teacher(n,na,s,ti,sa1,cnum),test(n,na,s,ti,sa2),salary4(sa3)void teachertest_set();void teachertest_input(ifstream& iput);void teachertest_display();void teachertest_output(ofstream& op
35、ut);string teachertest_getnum();string teachertest_getname();friend operate;private:int salary4;/行政人員兼教師類成員函數(shù)class teacher_official:public teacher,public officialpublic:teacher_official()teacher_official(string n,string na,char s,string ti,int sa1,int sa2,int cnum,int sa3):teacher(n,na,s,ti,sa1,cnum
36、),official(n,na,s,ti,sa2),salary5(sa3)void teacherofficial_set();void teacherofficial_input(ifstream& iput);void teacherofficial_display();void teacherofficial_output(ofstream& oput);string teacherofficial_getnum();string teacherofficial_getname();friend operate;private:int salary5;“operate
37、類class operatepublic:void operate1(teacher &);void operate2(test &);void operate3(official &);void operate4(teacher_test &);void operate5(teacher_official &);Salary.cpp:#include<iostream>#include<fstream> #include<string>#include"salary.h"using namespa
38、ce std;/人類成員函數(shù)void person:person_set()cin>>num>>name>>sex>>title;void person:person_input(ifstream& iput)iput>>num;iput>>name;iput>>sex;iput>>title;void person:person_display()cout<<"編號:"<<num<<""cout<<&q
39、uot;姓名:"<<name<<”"cout<<"性另 :"<<sex<<”"cout<<”職工類另ij :"<<title<<""void person:person_output(ofstream& oput)oput<<num<<" "oput<<name<<" "oput<<sex<<"
40、; "oput<<title<<" "string person:person_getnum()return num;string person:person_getname()return name;void person:changeexist()exist=0;int person:person_exist()return exist;/教師類成員函數(shù)void teacher:teacher_set()person_set();cin>>classnum;void teacher:teacher_input(ifstrea
41、m& iput)person_input(iput);iput>>classnum;iput>>salary1;void teacher:teacher_display()if(person_exist()!=0)person_display();cout<<”本月課時數(shù):"<<classnum<<"" cout<<"工資:"<<salary1<<endl;void teacher:teacher_output(ofstream& o
42、put)if(person_exist()!=0)person_output(oput);oput<<classnum<<" "oput<<salary1<<endl;string teacher:teacher_getnum()string str;str=person_getnum();return str;string teacher:teacher_getname()string str;str=person_getname();return str;int teacher:teacher_salary=800;/實驗
43、員類成員函數(shù)void test:test_set()person_set();void test:test_input(ifstream& iput)person_input(iput);iput>>salary2;void test:test_display()if(person_exist()!=0)person_display();cout<<"工資:"<<salary2<<endl;void test:test_output(ofstream& oput)if(person_exist()!=0)per
44、son_output(oput);oput<<salary2<<endl;string test:test_getnum()string str;str=person_getnum();return str;string test:test_getname()string str;str=person_getname();return str;int test:test_salary=650;int test:test_allowance=150;/行政人員類成員函數(shù)void official:official_set()person_set();void offici
45、al:official_input(ifstream& iput)person_input(iput);iput>>salary3;void official:official_display()if(person_exist()!=0)person_display();cout<<"工資:"<<salary3<<endl;void official:official_output(ofstream& oput)if(person_exist()!=0)person_output(oput);oput<&
46、lt;salary3<<endl;string official:official_getnum()string str;str=person_getnum();return str;string official:official_getname()string str;str=person_getname();return str;int official:official_salary=750;int official:official_allowance=250;/教師兼實驗員類成員函數(shù) void teacher_test:teachertest_set()teacher_
47、set();void teacher_test:teachertest_input(ifstream& iput) person_input(iput);iput>>classnum;iput>>salary4;void teacher_test:teachertest_display()if(person_exist()!=0)person_display();cout<<”本月課時數(shù):"<<classnum<<"" cout<<"工資:"<<sala
48、ry4<<endl;void teacher_test:teachertest_output(ofstream& oput)if(person_exist()!=0)person_output(oput); oput<<classnum<<" " oput<<salary4<<endl;string teacher_test:teachertest_getnum()string str;str=teacher_getnum();return str;string teacher_test:teacherte
49、st_getname()string str;str=teacher_getname();return str;/行政人員兼教師類成員函數(shù)void teacher_official:teacherofficial_set()teacher_set();void teacher_official:teacherofficial_input(ifstream& iput) person_input(iput);iput>>classnum;iput>>salary5;void teacher_official:teacherofficial_display()if(
50、person_exist()!=0)person_display();cout<<”本月課時數(shù):"<<classnum<<"" cout<<"工資:"<<salary5<<endl;void teacher_official:teacherofficial_output(ofstream& oput)if(person_exist()!=0)person_output(oput); oput<<classnum<<" "
51、oput<<salary5<<endl;string teacher_official:teacherofficial_getnum()string str;str=teacher_getnum();return str;string teacher_official:teacherofficial_getname()string str;str=teacher_getname();return str;/operate類成員 函數(shù)void operate:operate1(teacher &p)p.salary1=p.teacher_salary+20*p.c
52、lassnum;void operate:operate2(test &p)p.salary2=p.test_salary+p.test_allowance;void operate:operate3(official &p)p.salary3=p.official_salary+p.official_allowance;void operate:operate4(teacher_test &p)p.salary4=p.teacher_salary+20*p.classnum+p.test_salary+p.test_allowance;void operate:ope
53、rate5(teacher_official &p)p.salary5=p.teacher_salary+20*p.classnum+p.official_salary+p.official_allo wance;Main.cpp:#include<iostream>#include<fstream>#include<string>#include"salary.h" using namespace std; int main()/定義各類的對象數(shù)組及操作類的對象 teacher t100;test te100;official
54、o100;teacher_test t_te100;teacher_official t_o100;operate op;ifstream infile,infile1,infile2,infile3,infile4,infile5;ofstream outfile,outfile1,outfile2,outfile3,outfile4,outfile5;/選擇標(biāo)記 int a=0,b=0,c=0,d=0,x=0;/位置標(biāo)記 int p=0,i=0,j=0,k=0,l=0,m=0,n=0,del=0;/結(jié)束標(biāo)記 char CorN;/界面說明cout<<" "&
55、lt;<endl;cout<<" “<<endl;cout<<" “<<endl;cout<<" 歡 迎 使 用 “<<endl;cout<<"高校人員工資管理系統(tǒng) “<<endl;cout<<" “<<endl;cout<<" “<<endl;cout<<" "<<endl;/數(shù)據(jù)輸入cout<<"請選擇數(shù)據(jù)輸入方式:1.從鍵盤輸入2.從文檔讀入"<<endl;cin>>x;if(x<1|x>2)cout<<"輸入錯誤!"<<endl;if(x=1)cout<<” "<<endl;cout&l
溫馨提示
- 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)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 2025年度大型活動安保合同承包方式安全保障
- 2025年度城市軌道交通工程招投標(biāo)及合同監(jiān)管辦法
- 2025年度建筑工程智能化系統(tǒng)供應(yīng)合同范本
- 2025年度國際貨運(yùn)代理與物流服務(wù)合同范本
- 2025年度城市地下空間開發(fā)聯(lián)營協(xié)議合同范本
- 2025年度休閑農(nóng)業(yè)用地承包與綠色食品生產(chǎn)合同
- 2025年度國際教育培訓(xùn)交流項目合同范本
- 2025年度文化旅游資源整合開發(fā)咨詢合同
- 2025年度醫(yī)療設(shè)備技術(shù)咨詢服務(wù)合同模板
- 2025年基坑支護(hù)工程信息化管理服務(wù)合同
- 多指畸形-課件
- 5G NSA站點開通指導(dǎo)書(臨時IP開站)
- 宗教與社會課件
- 3人-機(jī)-環(huán)-管理本質(zhì)安全化措施課件
- 生殖醫(yī)學(xué)中心建設(shè)驗收標(biāo)準(zhǔn)分析-講座課件PPT
- DB44∕T 1811-2016 石灰?guī)r山地造林技術(shù)規(guī)程
- 慶陽煤炭資源開發(fā)調(diào)研報告
- 橋博常見問題
- 貴州省電梯日常維護(hù)保養(yǎng)合同范本
- 《我們的方言》-教案(共4頁)
- 泰國主要城市中英泰文對照
評論
0/150
提交評論