第十/十一周训练5 老师干部

#include<iostream>
#include<string>
using namespace std;
class Teacher
{
private:
string name;
int age;
char sex;
string address;
string tell;
string title;
public:
Teacher(string na,int ag,char se,string add,string te,string tit);
void display();
};
Teacher::Teacher(string na,int ag,char se,string add,string te,string ti):name(na),age(ag),sex(se),address(add),tell(te),title(ti){}
void Teacher::display() { cout<<name<<" "<<age<<" "<<sex<<" "<<address<<" "<<tell<<" "<<title<<endl;}






class Cadre
{
private:
string name;
int age;
char sex;
string address;
string tell;
string post;
public:
Cadre(string na,int ag,char se,string add,string te,string po);
void display();
};
Cadre::Cadre(string na,int ag,char se,string add,string te,string po):name(na),age(ag),sex(se),address(add),tell(te),post(po){}
void Cadre::display() { cout<<name<<" "<<age<<" "<<sex<<" "<<address<<" "<<tell<<" "<<post<<endl;}










class Teacher_Cadre:public Teacher,public Cadre
{
private:
int wages;
public:
   Teacher_Cadre(string na,int ag,char se,string add,string te,string tit,string po,int wa);
   void show()
   {
  Teacher:: display();
   cout<<wages<<endl;
   }
};

你可能感兴趣的:(第十/十一周训练5 老师干部)