【正文】
{ p1=(worker *)malloc(LEN)。\n39。\n39。 if(head==NULL) cout This Is An Empty Table, Please Enter The Information Workers!\n。 cout\tPlease enter new information wages of staff and workers\nendl。 while((p1paid[0])0||(p1paid[0])100000) { () 。 while((p1paid[2])0||(p1paid[2])100000) { () 。 } //插入到第一個(gè)結(jié)點(diǎn)之前 else { p3next=p1。 cout Delete the id ofidworker is\n。 cout\n。 (1024,39。 (1024,39。p1next!=NULL)//尋找結(jié)點(diǎn)當(dāng)p1所指的職工編號(hào)不是輸入的職工編號(hào)并且p1所指的next指針不為空 { p1=p1next。 cout\n。im。arg3/=m。 head=NULL。 p1paid[0]=[0]。 long i。 cout\t※ ※endl。 cout\t※ ※endl。 case 4: cout Please Enter The Search Number:。 cini。 case 8: coutInformation has been saved successfully!endl。 cout\n Please enter the administrator name: 。 //系統(tǒng)暫停 system(cls)。,忘記加花括弧。但是我非常倔!逼迫自己通過(guò)書(shū)本,手冊(cè)和資料找解決辦法,絕不向老師同學(xué)請(qǐng)教。 另外我還體會(huì)了從事C++語(yǔ)言課程設(shè)計(jì)工作需要特別謹(jǐn)慎認(rèn)真地態(tài)度和作風(fēng),一點(diǎn)都不能馬虎。,當(dāng)你輸入的顏色在內(nèi)存中不存在時(shí),運(yùn)行程序過(guò)后,系統(tǒng)會(huì)告訴你相應(yīng)的顏色符號(hào)常數(shù)及數(shù)值。 } cout\n\t\tWele to the administrator!!!!!!!!\nendl。cout\n\t Fortheprotectionofworkers39。 ()。 case 5: head=(head)。 case 3: (head)。 cout\t※ ※endl。 cout\t※※※※※※※※※※※※※※※※※※※※endl。 return (head)。 in [0][1][2]。此函數(shù)意在保存一定信息,為員工及董事對(duì)工資有一定掌控。 arg3+=p1paid[2]。j++) if(p[k]totalp[j]total) { p2=p[k]。 worker *p[N]。 return(head)。cinp1paid[1]。 cinp1sex。 cout\n。p1next!=NULL) { p2=p1。 (p2next !=NULL )) { p3=p2。 cout Sorry for you to input error! Please reenter 0~100000 numerical: 。 //將輸入的姓名存放到結(jié)構(gòu)體名為p1的數(shù)組name中 cout Sex:。int Information::count(struct worker *head) { if(head==NULL)return(0)。 return (head)。 } cout Other Bonuses:。 } cout Basic wage:。 cout Please Establish The Staff Information Table,The Name at The End of The Input to Bond!endl。}。 void Pass()。)(表一){這個(gè)表為職工信息的添加}(表二) {這個(gè)表為后來(lái)由于職工的辭職,而做的信息變更,刪除職工信息后的表格}(6)職工工資管理系統(tǒng)中職工工資的修改功能//The Structure Definition An Employee Information.struct worker{ char name[N]。:OrderStatisticsofWages。3系統(tǒng)功能模塊的具體設(shè)計(jì).定義變量char ch。 (3)職工工資查詢模塊,根據(jù)用戶輸入職工編號(hào)后,方可進(jìn)行查詢。2)添加職工的工資信息模塊,用戶根據(jù)輸入職工編號(hào)后,對(duì)工資信息進(jìn)行錄入。進(jìn)度要求1. 布置設(shè)計(jì)題目,講解要求和說(shuō)明 2. 確定設(shè)計(jì)任務(wù),確定具體的功能,熟悉相關(guān)知識(shí) 3. 按功能需求確定程序的主要模塊 4. 編程實(shí)現(xiàn)程序的功能 5. 調(diào)試并完善程序 6. 撰寫(xiě)課程設(shè)計(jì)報(bào)告 7. 提交課程設(shè)計(jì)報(bào)告并答辯 參考資料《面向?qū)ο蟪绦蛟O(shè)計(jì)》 清華大學(xué)出版社 2012年3月出版 2012年10月第七次印刷其它說(shuō)明,院系審批后交院系辦備案,一份由負(fù)責(zé)教師留用。最后附有主要的源程序代碼清單。子函數(shù)之間也是有聯(lián)系的,對(duì)個(gè)人所得稅的計(jì)算、職工工資信息的修改、刪除、查詢、統(tǒng)計(jì),必須是在職工工資錄入的情況下進(jìn)行的。:DisplayTheWagesofWorkers。簡(jiǎn)單說(shuō)明:該功能主要顯示的是給用戶一個(gè)進(jìn)入界面,它主要的是顯示該程序主要能夠執(zhí)行的有哪些功能。 //Define A Global Variable Statistical Number of Employees.//***************************************************************//Wage Management System//The List of Program:include iomanipinclude iostreaminclude fstreaminclude include include includelimitsincludeincludedefine NULL 0int const N=20。 void save(worker *head)。worker *Information::creat(void) { char ch[N]。)。)。 //The number of employees n value plus 1. cout\n Name:。 p1=p1next。 cinp1id。 (1024,39。p1next=NULL。 } else { p1=head。amp。 //將輸入的編號(hào)存放到p1所指結(jié)構(gòu)體的數(shù)組id中 } cout Name:。\n39。} /************************修改職工數(shù)據(jù)***********************/ 由于種種原因,部分工人工資出現(xiàn)錯(cuò)誤,他們會(huì)找到管理人員去核實(shí),并索要其應(yīng)得工資,為此工資管理系統(tǒng)中添加了修改工資函數(shù),此函數(shù)使工資管理系統(tǒng)中有了修改功能。在某些情況下,員工工資出現(xiàn)錯(cuò)誤,需要核實(shí)或者員工想知道自己的工資情況,通過(guò)此功能可以進(jìn)行查找并核實(shí)。km1。km。 while(head!=NULL) { outheadname\t headid\t\t headsex\t headpaid[0]\t headpaid[1]\t headpaid[2]\t headtotalendl。 for(。 cout ………………………………………………………………………………………………endl。cout\t※ ※endl。cout\t※ 6. Delete The Wages of Staff And Workers. ※endl。 break。 } cin i。 cini。 char Passward[20]。 //超過(guò)4次則登陸失敗,退出系統(tǒng) i++。6總結(jié)在本課程設(shè)計(jì)的設(shè)計(jì)過(guò)程中,我一直都感覺(jué)到有點(diǎn)頭痛。 由于我的知識(shí)淺薄,經(jīng)驗(yàn)不足及閱歷頗淺,在該系統(tǒng)的設(shè)計(jì)方面還有很多不足,我會(huì)在以后的學(xué)習(xí)過(guò)程中,根據(jù)具體要求不斷的修改、完善,爭(zhēng)取使系統(tǒng)慢慢趨于完美。然后按所提示的在09中選擇,分別輸入相應(yīng)的數(shù)字后按Enter鍵即可。 system(cls)。 //超過(guò)4次則登陸失敗,退出系統(tǒng) i++。 case 9: system(cls)。 ()。 fflush(stdin)。 cinchoice。 cout\t※ Wages. ※endl。cout\t※ ※endl。 p1total=。 if(i==0){coutdataThedatainthefileisempty,pleaseinputdata firstly!endl。 cout\t\tThe Average of The Basic Wage: setw(4)arg1 \n\t\tThe Average of The Overtime Wage: setw(4)arg2 \n\t\tThe Average of The Other Bonuses: setw(4)arg3\n。 } }} 職工工資排序函數(shù),函數(shù)是程序的靈魂,此函數(shù)目的在于及時(shí)觀察員工工資情況,以便查找出員工的能力所在,積極調(diào)整以達(dá)到為公司獲得更多利益,這樣一來(lái)工廠會(huì)越做越大! void Information::average(worker *head){ int k,m。 p1=head。 cout\n。cout sorryforyoutoinputerror! Please reenter 0~100000 numerical: 。cout sor