利用线性链表实现学生成绩管理系统,具体功能:输入、输出、插入、删除、查找、追加、读入、显示、保存、拷贝、排序、索引、分类合计、退出,并能在屏幕上输出操作前后的结果。
1. 写出系统需求分析,并建模。 
2. 编程实现,界面友好。 
3. 输出操作前后的结果
1.头文件
#define MAX_NUM 10
#include <String>
#include <fstream>
using namespace std;
bool quit = false;
struct StuNode{
    int num;
    int math, eng, yuwen;
    int sum;
    StuNode *nextstu;
};
class SInfo{
    StuNode *StuListHead;
public:
    SInfo();      //构造函数
    ~SInfo();     //析构函数
    void CreatSinfo();  //创建学生信息
    void StuInsert(int snum, int smath, int seng, int syuwen);  //插入学生信息
    void StuDelete(int snum);    //删除学生信息
    StuNode *StuFind(int snum);   //查找学生信息,传入参数学号
    void StuModify(int snum, int smath, int seng, int syuwen);   //修改学生信息
    void StuCopy(StuNode *ptemp, StuNode *p);  //学生信息拷贝
    void StuSort(char ch);
    void StuClassfy();     //分类合计
    void StuRead();        //从文件读入学生信息
    void StuSave();        //保存学生信息到文件
    int IsRead();
    void StuQuit();
    void ShowInfo();           //遍历输出学生信息
};
int Systemdoor()
{
    string username = "Hecoz", password = "password";
    string name, temp;
    int number = 3;
    while (1)
    {
        cout << "                用 户 名:";
        cin >> name;
        cout << "                密    码:";
        cin >> temp;
        if (name != username || temp != password)
        {
            number--;
            if (number >0)
            {
                cout << "          用户名/密码错误!你还有" << number << "次机会" << endl;
            }
            else
                cout << "用户名/密码错误!" << endl, exit(0);
}
        else
        {
            cout << "********************密码正确********************" << endl<<endl;
            return 1;
        }
    }
}
void ShowMenu()
{
    cout << "********************************************" << endl;
    cout << "******     学  生  信  息  系  统    ******" << endl;
    cout << "******       0.安全退出系统          ******" << endl;
    cout << "******       1.文件读入学生信息      ******" << endl;
    cout << "******       2.录入新的学生信息      ******" << endl;
    cout << "******       3.添加新的学生信息      ******" << endl;
    cout << "******       4.删除已有学生信息      ******" << endl;
    cout << "******       5.查找已有学生信息      ******" << endl;
    cout << "******       6.修改已有学生信息      ******" << endl;
    cout << "******       7.已有学生信息排序      ******" << endl;
    cout << "******       8.分类合计学生信息      ******" << endl;
    cout << "******       9.输出所有学生信息      ******" << endl;
    cout << "******      10.保存现有学生信息      ******" << endl;
    cout << "\n\t\n\t\t请选择:";
}
SInfo::SInfo()   //构造函数
{
    StuListHead = new StuNode;
    StuListHead->nextstu = NULL;
}

