已閱讀5頁,還剩12頁未讀, 繼續(xù)免費(fèi)閱讀
版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡介
“學(xué)生學(xué)習(xí)成績管理系統(tǒng)”用于對(duì)學(xué)生學(xué)習(xí)成績數(shù)據(jù)文件的新文件創(chuàng)建和老文件管理,并可以進(jìn)行密碼設(shè)置。具體要求實(shí)現(xiàn)的功能如下:1、輸入添加記錄:將每一個(gè)學(xué)生的學(xué)號(hào)、姓名和各科學(xué)習(xí)成績作為一個(gè)記錄進(jìn)行輸入或添加。要求經(jīng)過密碼驗(yàn)證后能建立一個(gè)新的數(shù)據(jù)文件或給已建立好的數(shù)據(jù)文件增加記錄。2、顯示、查詢記錄:能按學(xué)生姓名(或?qū)W號(hào))顯示、查詢一個(gè)或多個(gè)學(xué)生的各門(或某門)功課的成績和平均成績。3、修改記錄:可以對(duì)數(shù)據(jù)文件中的任意記錄的數(shù)據(jù)進(jìn)行修改,在修改前后對(duì)該記錄的內(nèi)容進(jìn)行顯示,并設(shè)確認(rèn)提示。(要求設(shè)置密碼,驗(yàn)證通過后方可進(jìn)入修改環(huán)節(jié))4、刪除記錄:可以刪除數(shù)據(jù)文件中的任一記錄,包括邏輯刪除(具有恢復(fù)功能)和物理刪除(不可恢復(fù))。(說明:該功能也應(yīng)設(shè)置為經(jīng)過驗(yàn)證密碼后才可實(shí)施刪除)5、成績排序:采用不同的排序方法對(duì)單科成績和總(或平均)成績進(jìn)行排序,但不能改變?cè)涗浀捻樞颉?、統(tǒng)計(jì)功能:(A)計(jì)算各門課程全班總成績及平均成績;(B)統(tǒng)計(jì)各門課程得分為100、9099、8089、7079、6069和不及格學(xué)生的人數(shù),以及與全班總?cè)藬?shù)的百分比。7、其他:該軟件應(yīng)具有系統(tǒng)名稱、設(shè)計(jì)單位或個(gè)人等基本信息。學(xué)生成績管理系統(tǒng)源程序清單:#include#include#include#include#defineNULL0#defineLENsizeof(student)#defineN5typedefstructstuintflag;longnum;charname10;intscoreN;structstu*next;student;voidedit();/*編輯菜單*/voidsearch(student*head);/*查找函數(shù)*/student*search_number(student*head,longnumber);/*按學(xué)號(hào)查找*/voidsearch_name(student*head);/*按姓名查找*/student*search_score(student*head,intmin,intmax,inti);/*按成績查找*/voidenter_record(student*p);/*輸入成績*/student*creat(void);/*建立鏈表*/student*insert(student*head);/*插入結(jié)點(diǎn)*/voidcount(int*p);/*計(jì)算總成績及平均成績*/voidprint(student*p);/*輸出結(jié)點(diǎn)*/voidprint_title();/*輸出標(biāo)題*/student*delete(student*head);/*刪除結(jié)點(diǎn)*/voidrecover(student*head);/*恢復(fù)刪除*/voidrevise(student*head);/*修改記錄*/voidtongji(student*head);/*統(tǒng)計(jì)*/voidpaixu(student*head,intm);/*排序*/intcipher_check();/*密碼檢測*/voidset_up_cipher();/*設(shè)立密碼*/student*load();/*載入*/voidsave(student*head);/*保存*/voidabout();/*關(guān)于*/intn;charcipher11=;/*字符串,保存密碼*/main()charc;student*head=NULL;system(cls);about();for(;)system(cls);printf(*n);printf(ttWelcometon);printf(nttThestudentscoremanagesystemn);printf(*MENU*n);printf(ttt1.Creattherecordn);printf(ttt2.Loadthefilen);printf(ttt3.Edittherecordn);printf(ttt4.Aboutdesignn);printf(ttt5.Quitn);printf(*n);printf(ntttEnteryourchoice(15):);for(;)c=getchar();if(c=n)continue;elseif(c5)printf(tttEnteryourchoice(15):);elsebreak;getchar();switch(c)case1:head=creat();if(head=NULL)printf(Emptyrecord!nnEnteranykeytocontinue.n);getch();break;set_up_cipher();printf(Enteranykeytoeditmenu.);getch();edit(head);break;case2:head=load();if(head=NULL)printf(nEnteranykeytocontinue.);getch();break;printf(Enteranykeytoeditmenu.);getch();edit(head);break;case3:edit(head);break;case4:about();break;case5:exit(0);voidedit(student*head)/*編輯菜單*/charc,m;inti,f=0;for(;)system(cls);printf(*EDIT*MENU*n);printf(ttt1.Savetherecord.n);printf(ttt2.Insertarecord.n);printf(ttt3.Deletearecord.n);printf(ttt4.Recovertherecord.n);printf(ttt5.Revisetherecord.n);printf(ttt6.Searchrecords.n);printf(ttt7.Sorttherecords.n);printf(ttt8.Tongjitherecords.n);printf(ttt9.Changethepassword.n);printf(ttt0.Returntomainmenu.n);printf(*n);printf(tttEnteryourchoice(09):);for(;)c=getchar();if(c=n)continue;elseif(c9)printf(tttEnteryourchoice(09):);elsebreak;switch(c)case1:save(head);f=0;break;case2:printf(Pleaseentertherightpassword:n);if(cipher_check()=0)printf(Wrongpassword!n);break;head=insert(head);f=1;break;case3:printf(Pleaseentertherightpassword:n);if(cipher_check()=0)printf(Wrongpassword!n);break;head=delete(head);f=1;break;case4:printf(Pleaseentertherightpassword:n);if(cipher_check()=0)printf(Wrongpassword!n);break;recover(head);f=1;break;case5:printf(Pleaseentertherightpassword:n);if(cipher_check()=0)printf(Wrongpassword!n);break;revise(head);f=1;break;case6:search(head);break;case7:printf(Sortonwhichsubject?n);printf(score1(1)/score2(2)/score3(3)/sum(4)n);for(;)scanf(%c,&m);if(m=n);elseif(m=1&mnum);head=NULL;while(p1-num!=0)n+;enter_record(p1);if(n=1)head=p1;elsep2-next=p1;p2=p1;p1=(student*)malloc(LEN);printf(Pleaseenternextnumber(0toend):n);scanf(%ld,&p1-num);if(n!=0)p2-next=NULL;free(p1);returnhead;student*insert(student*head)/*插入結(jié)點(diǎn)*/student*p1,*p2,*new_node;for(;)new_node=(student*)malloc(LEN);if(new_node=NULL)printf(Databaseisfull,cantaddmorerecord.n);returnNULL;printf(nPleaseenterthenumberyouwanttoinsertn(enter0toend):);scanf(%ld,&new_node-num);if(new_node-num=0)break;for(p1=head,p2=NULL;p1!=NULL&(new_node-num)(p1-num);p2=p1,p1=p1-next);if(p1!=NULL&(p1-num)=(new_node-num)&p1-flag=1)charc;printf(Thisnumberalreadyexists:n);print_title();print(p1);printf(Coverornot?(y/n)?);for(;)c=getchar();if(c=n|c=N)free(new_node);break;elseif(c=y|c=Y)free(new_node);enter_record(p1);break;elseif(c!=n)printf(Error!enteragain:);elsecontinue;elseif(p1!=NULL&(p1-num)=(new_node-num)n+;free(new_node);enter_record(p1);elsen+;enter_record(new_node);new_node-next=p1;if(p2=NULL)head=new_node;elsep2-next=new_node;returnhead;student*delete(student*head)/*刪除結(jié)點(diǎn)*/longnumber;charc;student*p1,*p2;for(;)printf(Pleaseenterthenumberyouwanttodelete(enter0toend):n);scanf(%ld,&number);if(!number)break;for(p1=head,p2=NULL;p1!=NULL&p1-num!=number;p2=p1,p1=p1-next);if(p1=NULL|p1-flag=0)printf(thisnumberdoesntexist.n);elseprint_title();print(p1);printf(deletethisrecord?n);printf(sure(s)/cancle(c)/deletethoroughly(t)n);for(;)c=getchar();if(c=c|c=C)break;elseif(c=s|c=S|c=t|c=T)n-;if(c=s|c=S)p1-flag=0;elseif(p2=NULL)head=p1-next;elsep2-next=p1-next;free(p1);break;elseif(c!=n)printf(error!enteragain:);returnhead;voidrecover(student*head)/*恢復(fù)刪除*/student*p;longnumber;printf(recoverwhichnumber?n);scanf(%ld,&number);if(number=0)return;p=search_number(head,number);if(p=NULL)printf(Cantrecoverthisnumber!n);elseif(p-flag=1)printf(Thisnumberhasnotbeendeleted.n);elsen+;p-flag=1;printf(Recoversuccess!n);voidrevise(student*head)/*修改記錄*/charc;longnumber;student*p1;for(;)printf(Whichnumberdoyouwanttorevise?n(enter0toend):);scanf(%ld,&number);if(number=0)return;p1=search_number(head,number);if(p1=NULL|p1-flag=0)printf(thisnumberdoesntexist.n);continue;print_title();print(p1);printf(Doyouwanttorevisetherecord?(y/n)n);for(;)c=getchar();if(c=n)continue;elseif(c=n|c=N)break;elseif(c=y|c=Y)printf(pleaseenternewrecord:n);enter_record
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 2026年宜昌市衛(wèi)生健康委所屬事業(yè)單位“招才興業(yè)”高層次人才引進(jìn)公開招聘111人備考題庫參考答案詳解
- 2025年第四季度蕪湖市第一人民醫(yī)院公開招聘勞務(wù)派遣工作人員備考題庫及1套完整答案詳解
- 2026年成都市龍王廟正街小學(xué)員額教師招聘補(bǔ)招備考題庫完整答案詳解
- 2026年安龍縣美團(tuán)合伙人招聘備考題庫及答案詳解一套
- 2026年惠州大亞灣開發(fā)區(qū)管委會(huì)石化能源產(chǎn)業(yè)局公開招聘事業(yè)單位編外人員備考題庫及參考答案詳解1套
- 2026年東臺(tái)市市級(jí)機(jī)關(guān)公開轉(zhuǎn)任公務(wù)員備考題庫及答案詳解1套
- 2026年揚(yáng)州市新華中學(xué)公開招聘教師6人備考題庫及完整答案詳解一套
- 2026年司法鑒定所鑒定助理招聘備考題庫含答案詳解
- 2026年孟定海關(guān)綜合技術(shù)中心醫(yī)學(xué)檢驗(yàn)工作人員招聘備考題庫及參考答案詳解一套
- 2026年成都市錦江區(qū)東華小學(xué)公開招聘員額教師的補(bǔ)招備考題庫附答案詳解
- 2025年荊楚理工學(xué)院馬克思主義基本原理概論期末考試真題匯編
- 2026年恒豐銀行廣州分行社會(huì)招聘備考題庫帶答案詳解
- 紋繡風(fēng)險(xiǎn)協(xié)議書
- 【語文】湖南省長沙市雨花區(qū)桂花樹小學(xué)小學(xué)一年級(jí)上冊(cè)期末試卷(含答案)
- 貴港市利恒投資集團(tuán)有限公司關(guān)于公開招聘工作人員備考題庫附答案
- 廣東省部分學(xué)校2025-2026學(xué)年高三上學(xué)期9月質(zhì)量檢測化學(xué)試題
- 【道 法】期末綜合復(fù)習(xí) 課件-2025-2026學(xué)年統(tǒng)編版道德與法治七年級(jí)上冊(cè)
- 中國心力衰竭診斷和治療指南2024解讀
- 冬季防靜電安全注意事項(xiàng)
- 2025年國家工作人員學(xué)法用法考試題庫(含答案)
- 2025版煤礦安全規(guī)程題庫
評(píng)論
0/150
提交評(píng)論