c++课程设计:教务管理系统源代码

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

#include

#include

using namespace std;

class Person

{

public:

Person(string n):name(n){}

virtual void show(){}

~Person(){}

protected:

string name;

};

class Student:public Person

{

public:

Student(string n,int num,string add,string ss):Person(n),number(num),address(add),str1(ss){}

virtual void show();

void input_stu();

void display_stu();

void display_qu();

~Student(){}

protected:

string str1;

int number;

string address;

};

void Student::show()

{

cout<<"向老师提出的问题是:";

cin>>str1;

}

void Student::display_qu()

{

cout<

}

void Student::input_stu()

{

cin>>Student::name;cin>>Student::number;cin>>Student::address;

}

void Student::display_stu()

{

cout<<"姓名:"<

cout<<"学号:"<

cout<<"地址:"<

}

class Teacher:public Person

{

public:

Teacher(string n,string sub,string sdf):Person(n),subject(sub),str2(sdf){}

virtual void show();

void input_t();

void display_t();

void display_an();

~Teacher(){}

protected:

string subject;

string str2;

};

void Teacher::display_an()

{

cout<

}

void Teacher::show()

{

cout<<"我的回答是:";

cin>>str2;

}

void Teacher::input_t()

{

cin>>Teacher::name;

cin>>Teacher::subject;

}

void Teacher::display_t()

{

cout<<"姓名:"<

cout<<"科目:"<

}

class Admin:public Person

{

public:

Admin(string n,int tel,string ssfs):Person(n),telphone(tel),str3(ssfs){}

virtual void show();

void input_ad();

void display_ad();

void display_gg();

~Admin(){}

protected:

int telphone;

string str3;

};

void Admin::display_gg()

{

cout<<"公告:";

cout<

}

void Admin::show()

{

cout<<"公告是:";

cin>>str3;

}

void Admin::input_ad()

{

cin>>Admin::name;

cin>>Admin::telphone;

}

void Admin::display_ad()

{

cout<<"姓名是:"<

cout<<"电话是:"<

}

int main()

{

int z,h,m;

z=0;

h=0;

m=0;

Student stu("guochun",20150311,"qlu","sdss");

Teacher tea("cuiyu","math","dsdf");

Admin ad("steve jobs",178641,"sdfs");

while(1)

{

int x;

cout<<"*******************"<

cout<<"1.学生"<

cout<<"2.教师"<

cout<<"3.管理员"<

相关文档
最新文档