【正文】
rs of students data. Along with the science and technology unceasing enhancement, the puter science is mature day after day, its formidable function hadprofoundly known for the people, it entered the human society eachdomain and plays a more and more important role. As a part of puter application, use the puter to students39。 performance management system can convenient user fast, accurate processing students39。 information according to the document preservation. This paper introduces the simple student performance management system in Microsoft Visual c + + environment of realization process: system analysis, function module design, system missioning and testing. The system39。s main function of the student39。s requirements according to class, name, student id inquires the student performance information, calculate each student39。 performance management system; Function module (function);Pointers;Structure;List;File save and load1 概述此系統(tǒng)的主要管理的信息有:學(xué)生的班級(jí),學(xué)號(hào),姓名和三(可以更改)門(mén)課的成績(jī)。:簡(jiǎn)易學(xué)生成績(jī)管理系統(tǒng)主要有4個(gè)大的模塊:學(xué)生成績(jī)從文件讀入和寫(xiě)入,學(xué)生成績(jī)的輸入和刪除,學(xué)生成績(jī)信息的查詢,以及學(xué)生成績(jī)的分類匯總。實(shí)際生活中學(xué)生成績(jī)的文件主要以word或excel保存,為了方便操作我在調(diào)式本系統(tǒng)中成績(jī)文件采用了txt的文檔格式保存,當(dāng)然以word文檔形式保存也是可以的。添加操作是根據(jù)用戶的要求實(shí)現(xiàn)的。主要功能是按照用戶的要求查詢學(xué)生的成績(jī)。統(tǒng)計(jì)主要功能是某個(gè)班級(jí)的每門(mén)學(xué)科的總分。然后定義鏈表的結(jié)點(diǎn)類型為結(jié)構(gòu)就可以實(shí)現(xiàn)對(duì)學(xué)生學(xué)號(hào)、姓名、成績(jī)、班級(jí)等學(xué)保存。各個(gè)功能模塊的實(shí)現(xiàn)主要轉(zhuǎn)變到對(duì)單鏈表的遍歷,添加和刪除結(jié)點(diǎn)。這樣的話各個(gè)子函數(shù)都可以調(diào)用一開(kāi)始輸入的數(shù)據(jù),這樣就實(shí)現(xiàn)了各個(gè)不同函數(shù)調(diào)用時(shí)都能使用整個(gè)系統(tǒng)連續(xù)起來(lái)了。includeiostream includeiomanip includefstream includestring using namespace std。 class student { public: student *next。//姓名 long num。int AA。}。 num=snum。 y=sy。 } }。 sload()。 p=stu。 delete stu。 } stu=0。 //添加 void sremove()。 //修改 void ssearch()。 //排序 void ssave()。 //讀取 //排序函數(shù) void pxh()。 void pyw()。 void pAA()。 //頭接點(diǎn) }。 string name1。 int x1,y1,z1。 cout\n **增加的學(xué)生** \nendl。 cout姓名 學(xué)號(hào) c++ 微機(jī)原理 數(shù)字信號(hào)處理:endl。 q=new student(name1,num1,x1,y1,z1)。 qAA=x1+y1+z1。 t=stu。 return。 return。 } tnext=q。 } cout輸入完畢endl。 int num1。 cout請(qǐng)輸入想要?jiǎng)h除學(xué)生的學(xué)號(hào):。 //查找要?jiǎng)h除的結(jié)點(diǎn) student *p1,*p2。 while(p1) { if(p1num==num1) break。 p1=p1next。 cout確定刪除嗎?[Y/N]endl。cinc。Y39。 if(p1==stu) //若要?jiǎng)h除的結(jié)點(diǎn)是第一個(gè)結(jié)點(diǎn) { stu=p1next。 } else //若要?jiǎng)h除的結(jié)點(diǎn)是后續(xù)結(jié)點(diǎn) { p2next=p1next。 } cout找到學(xué)號(hào)為num1的學(xué)生,并刪除\n。 } void cla::samend()//修改 { system(cls)。 cout\n** 修改學(xué)生信息 **\n。 cinnum1。 p1=stu。 else { p2=p1。 } } if(p1!=NULL) { cout學(xué)號(hào)是num1的學(xué)生的信息endl。 cout請(qǐng)輸入修改后的信息:姓名 c++成績(jī) 微機(jī)原理成績(jī) 數(shù)字信號(hào)處理成績(jī)endl。 p1AA=p1x+p1y+p1z。 } else //未找到接點(diǎn) cout未找到!\n。 cout\n** 查詢學(xué)生信息 **\nendl。 coutendl。 coutendl。 cinc。139。 cout要查詢的學(xué)號(hào)endl。 //查找要查詢的結(jié)點(diǎn) student *p1,*p2。 while(p1) { if(p1num==num1) break。 p1=p1next。 cout姓名:p1name c++:p1x 微機(jī)原理:p1y 數(shù)字信號(hào)處理:p1zendl。 } else //未找到接點(diǎn) cout未找到!\n。 } case 39。: { string name1。 cinname1。 p1=stu。 else { p2=p1。 } } if(p1!=NULL) { coutname1的學(xué)生的信息endl。 cout查詢完畢...。 break。339。 } } void cla::pxh() //按學(xué)號(hào)排序 { student *p1,*p2。 p1=stu。 while(p1next) { n++。 } cout共有n條信息...endl。 p1=stu。in。 if (p1nump1nextnum) // 如果頭結(jié)點(diǎn)大于第二個(gè)的 { p2=p1next。 p2