|
楼主 |
发表于 2021-5-25 09:56:56
|
显示全部楼层
Identity.h文件内容:
#pragma once //防止头文件包含
#ifndef _identity_
#define _identity_
#include<iostream>
#include<string>
using namespace std;
class Identity
{
public:
Identity();
virtual void operMenu() = 0;//纯虚函数 后面必须继承重写
private:
string m_Name;
string m_Pwd;
};
#endif // !_identity_
student.h文件内容:
#pragma once //防止头文件包含
//#ifndef _student_
//#define _student_
#include"identity.h"
#include<iostream>
#include<string>
using namespace std;
class Student:public Identity
{
public:
//默认构造
Student();
//参数构造
Student(int id, string name, string pwd);
//菜单界面
virtual void operMenu();//继承重写
//申请预约
void applyOrder();
//查看所有预约
void checkallOrder();
//查看自己预约
void checkselfOrder();
//学生学号
int m_Id;
};
//#endif // !_student_
student.cpp文件内容:
#include"student.h"
Student::Student(){}
Student::Student(int id, string name,string pwd) {
}
void Student::operMenu() {
}
//申请预约
void Student::applyOrder(){}
//查看所有预约
void Student::checkallOrder(){}
//查看自己预约
void Student::checkselfOrder(){}
|
|