文件名称:person
介绍说明--下载内容均来自于网络,请自行研究使用
声明基类Person,其中有name,age和no,然后分别声明Teacher(教师)类和Cadre(干部)类从Person继承,这两个类派生出新类Teacher_Cadre(教师兼干部)。要求:1、在Teacher类中还包含数据成员title(职称),在Cadre类中还包含数据成员post(职务),在Teacher_Cadre(教师兼干部)中还包含数据成员wages(工资)。2、在派生类Teacher_Cadre的成员函数show中调用Teacher类中的display函数,输出姓名、年龄、职称,然后再用cout语句输出职务与工资。-Declare the base class Person, including name, age, and no, and then were declared Teacher (teacher) Class and Cadre (cadres) class inherits from Person, multiple inheritance using classes derived from these two new classes Teacher_Cadre (teachers and cadres) . Requirements: 1, also included in the Teacher class data member title (title), in Cadre class contains data members of the post (office), in Teacher_Cadre (teachers and cadres) also contains data members wages (wages). 2, the derived class member function show Teacher_Cadre Teacher class to call display function, the output name, age, title, and then use cout statement output functions and wages.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
person\person.cpp
person
person