#include
class Student
{
Student();
virtual ~Student();
public:
virtual void AddStudent(Student tmpStudent);//具体实现、参数,自己加吧
virtual void DeleteStudent(int student_num);//参数可以为一个学号,数据应该存在数据库或者文件,删除时,根据键值查找
virtual void DisplayAll();//显示所有学生信息
virtual void DisplayAll(int student_num);//显示指定学生信息
private:
int number;
string name;
char sex;
time_t birthday;//或者自定义一个日期类
int stature; //身高 也许用height、weight更直观
float avoirdupois; //体重
char type; //学生类型
};
class AcademyStudent : Student
{
public:
virtual void AddStudent(AcademyStudent tmpStudent);//在具体实现中,操作对象改为专科生
virtual void DeleteStudent(int student_num);
virtual void DisplayAll();
virtual void DisplayAll(int student_num);
private:
int score; //高考成绩
int majorCode; //专业代码
};
class UndergraduateStudent : Student
{
public:
virtual void AddStudent(UndergraduateStudent tmpStudent);//在具体实现中,操作对象改为本科生
virtual void DeleteStudent(int student_num);
virtual void DisplayAll();
virtual void DisplayAll(int student_num);
private:
int score; //高考成绩
int majorCode; //专业代码
};
class GraduateStudent : Student
{
public:
virtual void AddStudent(GraduateStudent tmpStudent);//在具体实现中,操作对象改为研究生
virtual void DeleteStudent(int student_num);
virtual void DisplayAll();
virtual void DisplayAll(int student_num);
private:
char oralScore; //高考成绩
string mentorName; //导师姓名
};