文件名称:person
-
所属分类:
- 标签属性:
- 上传时间:2012-11-16
-
文件大小:682byte
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
声明基类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
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.