




已閱讀5頁,還剩12頁未讀, 繼續(xù)免費閱讀
版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領
文檔簡介
“學生學習成績管理系統(tǒng)”用于對學生學習成績數(shù)據(jù)文件的新文件創(chuàng)建和老文件管理,并可以進行密碼設置。具體要求實現(xiàn)的功能如下:1、輸入添加記錄:將每一個學生的學號、姓名和各科學習成績作為一個記錄進行輸入或添加。要求經(jīng)過密碼驗證后能建立一個新的數(shù)據(jù)文件或給已建立好的數(shù)據(jù)文件增加記錄。2、顯示、查詢記錄:能按學生姓名(或學號)顯示、查詢一個或多個學生的各門(或某門)功課的成績和平均成績。3、修改記錄:可以對數(shù)據(jù)文件中的任意記錄的數(shù)據(jù)進行修改,在修改前后對該記錄的內容進行顯示,并設確認提示。(要求設置密碼,驗證通過后方可進入修改環(huán)節(jié))4、刪除記錄:可以刪除數(shù)據(jù)文件中的任一記錄,包括邏輯刪除(具有恢復功能)和物理刪除(不可恢復)。(說明:該功能也應設置為經(jīng)過驗證密碼后才可實施刪除)5、成績排序:采用不同的排序方法對單科成績和總(或平均)成績進行排序,但不能改變原記錄的順序。6、統(tǒng)計功能:(A)計算各門課程全班總成績及平均成績;(B)統(tǒng)計各門課程得分為100、9099、8089、7079、6069和不及格學生的人數(shù),以及與全班總人數(shù)的百分比。7、其他:該軟件應具有系統(tǒng)名稱、設計單位或個人等基本信息。學生成績管理系統(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);/*按學號查找*/voidsearch_name(student*head);/*按姓名查找*/student*search_score(student*head,intmin,intmax,inti);/*按成績查找*/voidenter_record(student*p);/*輸入成績*/student*creat(void);/*建立鏈表*/student*insert(student*head);/*插入結點*/voidcount(int*p);/*計算總成績及平均成績*/voidprint(student*p);/*輸出結點*/voidprint_title();/*輸出標題*/student*delete(student*head);/*刪除結點*/voidrecover(student*head);/*恢復刪除*/voidrevise(student*head);/*修改記錄*/voidtongji(student*head);/*統(tǒng)計*/voidpaixu(student*head,intm);/*排序*/intcipher_check();/*密碼檢測*/voidset_up_cipher();/*設立密碼*/student*load();/*載入*/voidsave(student*head);/*保存*/voidabout();/*關于*/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)/*插入結點*/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)/*刪除結點*/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)/*恢復刪除*/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等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經(jīng)權益所有人同意不得將文件中的內容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
- 6. 下載文件中如有侵權或不適當內容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 大班健康的蔬菜公開課
- 河南中考答案 數(shù)學試卷
- 廣東省職高一數(shù)學試卷
- 醫(yī)院課件宣傳海報制作
- 肝炎病毒微生物與免疫基礎99課件
- 2025年中國生物傳感器行業(yè)市場運營現(xiàn)狀及投資戰(zhàn)略咨詢報告
- 2025年中國河北省房地產行業(yè)未來前景預測研究報告
- 青海省項目-藏區(qū)區(qū)域醫(yī)療中心項目可行性研究報告-智博睿編制
- 2025-2030年中國防水防油針刺呢行業(yè)深度研究分析報告
- 健康的人快樂多課件
- 安徽高危人員管理辦法
- 安保工作月度總結
- 開業(yè)美容項目活動方案
- 2025年技術玻璃制品行業(yè)市場調研報告
- 2025至2030高純氯化鉀行業(yè)產業(yè)運行態(tài)勢及投資規(guī)劃深度研究報告
- 2025年湖南省高考物理真題
- 2025年吉林省中考數(shù)學試卷真題(含答案詳解)
- 2025年中國自由鍛件行業(yè)發(fā)展運行現(xiàn)狀及投資潛力預測報告
- 醫(yī)學美容技術專業(yè)教學標準(高等職業(yè)教育??疲?025修訂
- QGDW11970.7-2023輸變電工程水土保持技術規(guī)程第7部分水土保持設施質量檢驗及評定
- 變電站創(chuàng)優(yōu)工程匯報
評論
0/150
提交評論