学生成绩管理系统代码
include include include include include include include using namespace std; class Student { public string number; string name; string math,english,computer; public Studentstring nu“0“,string na“0“,string ma“0“,string en“0“,string co“0“; void setstudentstring Nu,stringNa,stringMa,stringen,string co; void setmathstring ma{mathma;} void setenglishstring en{englishen;} void setcomputerstring eo{computereo;} bool searchstring num{return numbernum;} void display; }; StudentStudentstring nu,stringna,stringma,stringen,string co { number nu; name na; math ma; english en; computer co; } void Studentsetstudentstring Nu,stringNa,stringMa,stringEn,string Co { number Nu; name Na; math Ma; english En; computer Co; } void Studentdisplay { couts.name; couts.english; coutnum; forint j0;jnu; forint j0;jnu; forint j0;jmaenco; stu[j].mathma; stu[j].englishen; stu[j].computerco; coutnunamaenco { Student tempnu,na,ma,en,co; stu.push_backtemp; } infile.close; } void Manage Play { cout“学号“setw6“姓名“setw6“数学“setw6“英语“setw8“计算机 “endl; forinti0;istu.size;i stu[i].display; } void Managesum { forinti0;istu.size;i { coutstu[i].name“的总分是“; } } /* void Manageave { } */ int main { Student s; Manage m; m.Load; char way; string ma,en,co; while1 { system“cls“; cout“******学生成绩管理系统*******“; cout“\n1.添加学生信息“; cout“\n2.修改学生信息“; cout“\n3.根据学生学号删除学生信息“; cout“\n4.计算每位学生总分“; cout“\n5.计算每位学生平均分“; cout“\n6.根据学生学号查询学生成绩信息“; cout“\n7.学生成绩排序“; cout“\n8.退出“; cout“\n***********************************“; cout“\n 请输入您的选择“; way getchar; system“cls“;//清屏 switchway { case 1m.Adds;break; case 2m.Alterma,en,co;break; case 3m.Delete;break; case 4m.sum;break; case 5//m.ave;break; case 6m.Seek;break; case 7 case 0m.Store;return 0;break; defaultcontinue; } cout“\n\t\t 按回车键继续“; getchar; getchar; } return 0; }