文件名称:7_7
介绍说明--下载内容均来自于网络,请自行研究使用
定义一个基类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