學(xué)生平時成績管理系統(tǒng)答辯_第1頁
學(xué)生平時成績管理系統(tǒng)答辯_第2頁
學(xué)生平時成績管理系統(tǒng)答辯_第3頁
學(xué)生平時成績管理系統(tǒng)答辯_第4頁
學(xué)生平時成績管理系統(tǒng)答辯_第5頁
已閱讀5頁,還剩15頁未讀 繼續(xù)免費閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報或認(rèn)領(lǐng)

文檔簡介

學(xué)生平時成績管理設(shè)計答辯

PPT指導(dǎo)教師:周立章學(xué)生:周陽系統(tǒng)介紹本系統(tǒng)對學(xué)生平時成績的錄入,計算,排序等功能實現(xiàn)。具體有以下功能:1.成績錄入:按上述要求錄入學(xué)生平時的各項成績,并當(dāng)輸入學(xué)生姓名為”ps”結(jié)束輸入,同時將錄入的信息以增加的方式寫入到指定的文件中;2.計算所有學(xué)生的平時成績3.分別按學(xué)號、姓名、查詢學(xué)生的平時成績信息,若查到則輸出學(xué)生的所有成績信息;否則輸出未找到4.輸入學(xué)生的學(xué)號,查找該學(xué)生,若找到則修改該生的成績信息,并顯示修改前后的結(jié)果,將修改結(jié)果寫回文件保存5.輸入學(xué)生姓名,若該學(xué)生存在,則刪除,并顯示刪除后余下的學(xué)生成績信息,將刪除后結(jié)果寫回文件6.對全班學(xué)生的平時成績進(jìn)行降序排列后輸出7.輸入學(xué)生的平時的各項成績,插入到指定位置;當(dāng)指定的位置超出范圍時,將其插入到全班的最后,并顯示插入成功后的結(jié)果

分工情況整個程序由喻斗和周陽共同完成其中喻斗負(fù)責(zé)學(xué)生成績錄入,查詢學(xué)生信息,修改學(xué)生成績的功能代碼,并能保存數(shù)據(jù)到文本中。周陽負(fù)責(zé)編寫刪除學(xué)生信息,對平時成績排序和插入新學(xué)生信息的代碼,并保存數(shù)據(jù)。程序總體結(jié)構(gòu)我用的測試數(shù)據(jù)學(xué)號姓名考勤成績作業(yè)成績實踐成績322張飛908967323光宇897878

324張云908978325戰(zhàn)云898967326趙云908976327劉備898978328李典908978329洛奇896778330高斯907878

331李薩茹8989

89

332劉璋908989

關(guān)于系統(tǒng)功能選擇歡迎進(jìn)入學(xué)生平時成績管理系統(tǒng)-----------------------------------------------------1-----------------------成績錄入

2-------------------計算平時成績

3-------------------查詢學(xué)生信息

4-------------------修改學(xué)生信息

5-------------------刪除學(xué)生信息

6---------------學(xué)生平時成績排名

7-------------------插入學(xué)生信息

8---------------瀏覽所有學(xué)生信息

0-----------------------退出菜單-----------------------------------------------------

請選擇功能刪除學(xué)生成績代碼voide(){studentstud[50];intn,i=0;ifstreamfin("shuju.txt");while(!fin.eof()){fin>>stud[i].num>>stud[i].name>>stud[i].score1>>stud[i].score2>>stud[i].score3;i++;}n=i-1;intb,m,mark;cout<<"請輸入學(xué)生的學(xué)號"<<endl;cin>>b;for(inti=0;i<n;i++){ if(stud[i].num==b) {cout<<"所查學(xué)生信息如下,現(xiàn)在已被刪除"<<endl; cout<<"學(xué)號"<<""<<"姓名"<<""<<"考勤成績"<<""<<"作業(yè)成績"<<""<<"實踐成績"<<""<<"平時成績"<<endl;cout<<stud[i].num<<""<<stud[i].name<<""<<stud[i].score1<<""<<stud[i].score2<<""<<stud[i].score3<<""<<stud[i].score1*0.33+stud[i].score2*0.34+stud[i].score3*0.33<<endl;刪除學(xué)生成績代碼mark=i;for(inti=mark;i<n-1;i++){stud[i].num=stud[i+1].num;stud[i].score1=stud[i+1].score1;stud[i].score2=stud[i+1].score2;stud[i].score3=stud[i+1].score3;strcpy(stud[i].name,stud[i+1].name);}刪除學(xué)生成績代碼n--;cout<<"-----------刪除后的所有學(xué)生成績----------"<<endl;cout<<"學(xué)號"<<""<<"姓名"<<""<<"考勤成績"<<""<<"作業(yè)成績"<<""<<"實踐成績"<<""<<"平時成績"<<endl;for(inti=0;i<n;i++)cout<<setw(3)<<stud[i].num<<setw(9)<<stud[i].name<<setw(10)<<stud[i].score1<<setw(11)<<stud[i].score2<<setw(13)<<stud[i].score3<<setw(13)<<stud[i].score1*0.33+stud[i].score2*0.34+stud[i].score3*0.33<<endl;cout<<"----------------請返回查看--------------"<<endl;ofstreamout;out.open("shuju.txt");for(intm=0;m<n;m++)out<<stud[m].num<<""<<stud[m].name<<""<<stud[m].score1<<""<<stud[m].score2<<""<<stud[m].score3<<endl;out.close();

刪除學(xué)生信息5請輸入學(xué)生的學(xué)號328所查學(xué)生信息如下,現(xiàn)在已被刪除學(xué)號姓名考勤成績作業(yè)成績實踐成績平時成績328李典90897885.7-----------刪除后的所有學(xué)生成績----------學(xué)號姓名考勤成績作業(yè)成績實踐成績平時成績322張飛90896782.07323光宇89787881.63324張云90897885.7325戰(zhàn)云89896781.74326趙云90897685.04327劉備89897885.37329洛奇89677877.89330高斯90787881.96331李薩茹8989

89

89332劉璋90898989.33排序代碼inta,b,t;floatm,p,x;charnam[10];for(a=0;a<n-1;a++)for(b=0;b<n-1-a;b++)if((stud[b].score1*0.33+stud[b].score2*0.34+stud[b].score3*0.33)<(stud[b+1].score1*0.33+stud[b+1].score2*0.34+stud[b+1].score3*0.33)){t=stud[b].num;m=stud[b].score1;p=stud[b].score2;x=stud[b].score3;stud[b].num=stud[b+1].num;stud[b].score1=stud[b+1].score1;stud[b].score2=stud[b+1].score2;stud[b].score3=stud[b+1].score3;stud[b+1].score1=m;stud[b+1].score2=p;stud[b+1].score3=x;stud[b+1].num=t;strcpy(nam,stud[b+1].name);strcpy(stud[b+1].name,stud[b].name);strcpy(stud[b].name,nam);}排序代碼intu=1;cout<<"------------------------平時成績排序后--------------------"<<endl;cout<<"名次"<<""<<"學(xué)號"<<""<<"姓名"<<""<<"考勤成績"<<""<<"作業(yè)成績"<<""<<"實踐成績"<<""<<"平時成績"<<endl;for(inti=0;i<n;i++)cout<<setw(3)<<u++<<""<<stud[i].num<<setw(9)<<stud[i].name<<setw(10)<<stud[i].score1<<setw(11)<<stud[i].score2<<setw(13)<<stud[i].score3<<setw(13)<<stud[i].score1*0.33+stud[i].score2*0.34+stud[i].score3*0.33<<endl;學(xué)生成績排名

請選擇功能6------------------------平時成績排序后--------------------名次學(xué)號姓名考勤成績作業(yè)成績實踐成績平時成績

1332劉璋80898986.032324張云90897885.73328李典90897885.74322張飛90896782.075330高斯90787881.966325戰(zhàn)云89896781.747323光宇89787881.638329洛奇89677877.899327劉備89507872.11請按任意鍵繼續(xù)...插入部分代碼inta1,a5;floata2,a3,a4;charnam[10];cout<<"請輸入新學(xué)生的學(xué)號,姓名,考勤成績,作業(yè)成績,實踐成績和插入的行數(shù)"<<endl;cin>>a1;cin>>nam;cin>>a2>>a3>>a4>>a5;intq,m;floatw,e,r;q=a1;w=a2;e=a3;r=a4;m=a5;f(m<1||m>=n+1)cout<<"-----------------范圍超界,插入失敗---------------"<<endl;else{ for(inti=n-1;i>=m-1;i--)插入部分代碼{stud[i+1].num=stud[i].num;stud[i+1].score1=stud[i].score1;stud[i+1].score2=stud[i].score2;stud[i+1].score3=stud[i].score3;strcpy(stud[i+1].name,stud[i].name);} stud[m-1].num=q; stud[m-1].score1=w;stud[m-1].score2=e;stud[m-1].score3=r;strcpy(stud[m-1].name,nam);n++;cout<<"-----------插入后的所有學(xué)生成績----------"<<endl;cout<<"學(xué)號"<<""<<"姓名"<<""<<"考勤成績"<<""<<"作業(yè)成績"<<""<<"實踐成績"<<""<<"平時成績"<<endl;for(inti=0;i<n;i++){cout<<setw(3)<<stud[i].num<<setw(9)<<stud[i].name<<setw(10)<<stud[i].score1<<setw(11)<<stud[i].score2<<setw(13)<<stud[i].score3<<setw(13)<<stud[i].score1*0.33+stud[i].score2*0.34+stud[i].score3*0.33;cout<<endl;}ofstreamout;out.open("shuju.txt");for(intm=0;m<n;m++)out<<stud[m].num<<""<<stud[m].name<<""<<stud[m].score1<<""<<stud[m].score2<<""<<stud[m].score3<<endl;out.close();}插入學(xué)生信息

7請輸入新學(xué)生的學(xué)號,姓名,考勤成績,作業(yè)成績,實踐成績和插入的行數(shù)328李典9089782-----------插入后的所有學(xué)生成績----------學(xué)號姓名考勤成績作業(yè)成績實踐成績平時成績322張飛90896782.07328李典90897885.7323光宇89787881.63324張云90897885.7325戰(zhàn)云89896781.74327劉備89507872.11328李典90897885.7329洛奇89677877.89330高斯90787881.96332劉璋80898986.03請按任意鍵繼續(xù)...查詢學(xué)生信息voidh(){studentstud[50];intn,i=0;ifstreamfin("shuju.txt");while(!fin.eof()){ fin>>stud[i].num>>stud[i].name>>stud[i].score1>>stud[i].score2>>stud[i].score3;i++;}n=i-1;cout<<"-----------------所有學(xué)生成績總況---------------"<<endl;cout<<"學(xué)號"<<""<<"姓名"<<""<<"考勤成績"<<""<<"作業(yè)成績"<<""<<"實踐成績"<<""<<"平時成績"<<endl;for(intm=0;m<n;m++){ cout<<setw(3)<<stud[m].num<<setw(9)<<stud[m].name<<setw(10)<<stud[m].score1<<setw(11

溫馨提示

  • 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)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

最新文檔

評論

0/150

提交評論