文件名称:7_7
-
所属分类:
- 标签属性:
- 上传时间:2012-11-16
-
文件大小:15.82kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
定义一个基类Person,数据成员包含字符指针类型变量Name用于保存姓名,函数成员包括默认构造函数、带参构造函数用于初始化数据成员和输出姓名的成员函数PrintName()。从Person类派生出Student类,增加长整型数据成员Number用于保存学号,函数成员包括带参构造函数用于初始化数据成员和输出学生信息的成员函数PrintInfo()。要求:在函数PrintInfo()中需要调用基类的成员函数PrintName()。-Define a base class Person, a member data pointer type variable contains characters Name to save the name, function members, including the default constructor with parameters for the constructor to initialize the data members and member functions output the names of PrintName (). Category Person derived from the Student category, increasing long-integer data member to save the school No. Number, function members with constructor parameters used to initialize data members and members of student information output function PrintInfo (). Requirements: in function PrintInfo () need to call the base class' s member functions PrintName ().
(系统自动生成,下载前可以参看下载内容)
下载文件列表
7_作业7.doc
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.