c语言——学生成绩管理系统

来源:百度知道 编辑:UC知道 时间:2024/09/21 02:48:03
要求:1) 每条记录包括:学号、姓名、专业和5门课程的成绩;
2) 能够实现添加、删除、修改功能;
3) 能够计算某学生的总分和平均分;
4) 能按照总分排序输出。
5)包括:问题描述、基本要求、系统分析和设计、结构图、流程图、程序清单、测试数据
谢谢啦!

#include<iostream>
#include<iomanip>
#include<fstream>
#include<string>

using namespace std;

#define max 100;

class student
{
public:
student *next;
public:
string name;//姓名
long num;//学号
int x,y,z;//数学,语文,英语
int AA;//总分
void play(){cout<<name<<"学生的学号是"<<num<<",数学:"<<x<<",语文:"<<y<<",英语:"<<z<<",总分:"<<AA<<endl;};
student(string sname,long snum,int sx,int sy,int sz)
{
name=sname;
num=snum;
x=sx;
y=sy;
z=sz;
}
};

class cla
{
public:
cla()//构造函数
{
stu=0;
sload();
}
~cla()//析构函数
{
student *p;
p=stu;
while(p)
{
p=p->next;
delete stu;
stu=p;
}
stu=0;
}
voi