学生信息管理系统设计

来源:百度知道 编辑:UC知道 时间:2024/06/14 13:31:51
要求:学生信息包括:学号,姓名,年龄,性别,出生年月,地址,电话,E-mail等。试设计一学生信息管理系统,使之能提供以下功能:
1)系统以菜单方式工作
2)学生信息录入功能(学生信息用文件保存)---输入
3)学生信息浏览功能---输出
4)排序功能
5)按学号查询
6)按姓名查询
7)学生信息的删除与修改

# include<iostream.h>
# include<string.h>
# include<stdio.h>
# include<stdlib.h>
# include<fstream.h>
//*****定义一个学生原子的的数据结构*****//
struct stuatom
{
char *name;
int id;
char sex;
float math, eng, comp, totll, aver;
void show();
void setup();
};

//*********定义一系列对学生的操作**********//
class student
{
private:
stuatom ob[100];
int stulen;
public:
student();
void input();
void order();
void save();
void Query();
void read();
void add();
void del();

};

//********对学生数据的初始化(类的构造函数)**********//
student::student()
{
//用for循环对全部数组中的数据初始化
for(int i=0;i<100;i++)
{
ob[i].math=ob[i].eng=ob[i].comp =ob[i].totll =ob[i].aver =0;
ob[i].id =0;
ob[i].sex =' ';
ob[i].name =NULL;
}
this->stulen =0;