【正文】
{ 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) { () 。 } //插入到第一個結(jié)點之前 else { p3next=p1。 cout Delete the id ofidworker is\n。 cout\n。 (1024,39。 (1024,39。p1next!=NULL)//尋找結(jié)點當p1所指的職工編號不是輸入的職工編號并且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)。,忘記加花括弧。但是我非常倔!逼迫自己通過書本,手冊和資料找解決辦法,絕不向老師同學請教。 另外我還體會了從事C++語言課程設(shè)計工作需要特別謹慎認真地態(tài)度和作風,一點都不能馬虎。,當你輸入的顏色在內(nèi)存中不存在時,運行程序過后,系統(tǒng)會告訴你相應的顏色符號常數(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ù)意在保存一定信息,為員工及董事對工資有一定掌控。 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()。)(表一){這個表為職工信息的添加}(表二) {這個表為后來由于職工的辭職,而做的信息變更,刪除職工信息后的表格}(6)職工工資管理系統(tǒng)中職工工資的修改功能//The Structure Definition An Employee Information.struct worker{ char name[N]。:OrderStatisticsofWages。3系統(tǒng)功能模塊的具體設(shè)計.定義變量char ch。 (3)職工工資查詢模塊,根據(jù)用戶輸入職工編號后,方可進行查詢。2)添加職工的工資信息模塊,用戶根據(jù)輸入職工編號后,對工資信息進行錄入。進度要求1. 布置設(shè)計題目,講解要求和說明 2. 確定設(shè)計任務(wù),確定具體的功能,熟悉相關(guān)知識 3. 按功能需求確定程序的主要模塊 4. 編程實現(xiàn)程序的功能 5. 調(diào)試并完善程序 6. 撰寫課程設(shè)計報告 7. 提交課程設(shè)計報告并答辯 參考資料《面向?qū)ο蟪绦蛟O(shè)計》 清華大學出版社 2012年3月出版 2012年10月第七次印刷其它說明,院系審批后交院系辦備案,一份由負責教師留用。最后附有主要的源程序代碼清單。子函數(shù)之間也是有聯(lián)系的,對個人所得稅的計算、職工工資信息的修改、刪除、查詢、統(tǒng)計,必須是在職工工資錄入的情況下進行的。:DisplayTheWagesofWorkers。簡單說明:該功能主要顯示的是給用戶一個進入界面,它主要的是顯示該程序主要能夠執(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。 //將輸入的編號存放到p1所指結(jié)構(gòu)體的數(shù)組id中 } cout Name:。\n39。} /************************修改職工數(shù)據(jù)***********************/ 由于種種原因,部分工人工資出現(xiàn)錯誤,他們會找到管理人員去核實,并索要其應得工資,為此工資管理系統(tǒng)中添加了修改工資函數(shù),此函數(shù)使工資管理系統(tǒng)中有了修改功能。在某些情況下,員工工資出現(xiàn)錯誤,需要核實或者員工想知道自己的工資情況,通過此功能可以進行查找并核實。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]。 //超過4次則登陸失敗,退出系統(tǒng) i++。6總結(jié)在本課程設(shè)計的設(shè)計過程中,我一直都感覺到有點頭痛。 由于我的知識淺薄,經(jīng)驗不足及閱歷頗淺,在該系統(tǒng)的設(shè)計方面還有很多不足,我會在以后的學習過程中,根據(jù)具體要求不斷的修改、完善,爭取使系統(tǒng)慢慢趨于完美。然后按所提示的在09中選擇,分別輸入相應的數(shù)字后按Enter鍵即可。 system(cls)。 //超過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ù)目的在于及時觀察員工工資情況,以便查找出員工的能力所在,積極調(diào)整以達到為公司獲得更多利益,這樣一來工廠會越做越大! void Information::average(worker *head){ int k,m。 p1=head。 cout\n。cout sorryforyoutoinputerror! Please reenter 0~100000 numerical: 。cout sor