文件名称:5
-
所属分类:
- 标签属性:
- 上传时间:2013-03-16
-
文件大小:958byte
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
(1)设计Person类,要求具有用于表示姓名的保护数据成员:string szName; 实现信息打印的公有成员函数:void Print()。其中,Print函数设计为虚函数,输出的信息格式为:“Person 姓名”。
(2)从Person类派生Student类,添加用于表示学号的保护数据成员:int iNumber;重定义用于信息打印的公有成员函数:void Print()。其中,Print函数输出的信息格式为:“Student 姓名 学号”。
(3)从 Person类派生Teacher类,添加用于表示教龄的保护数据成员:int iYear;重定义用于信息打印的公有成员函数:void Print()。其中,Print函数输出的信息格式为:“Teacher 姓名 教龄”。
(4)从Student类派生Graduate类,添加用于表示研究方向的保护数据成员:string szResearch;重定义用于信息打印的公有成员函数:void Print()。其中,Print函数输出的信息格式为:“Graduate 姓名 研究方向”。
-(1) Design Person class requirements used to indicate the name of protecting data members: string szName public member function print information: void Print (). Print function designed for virtual function output format: " Person Name. (2) Student class derived from the Person class, add is used to represent the protected data members of the student number: int iNumber the information Print redefine public member functions: void Print (). Print function to output the information format: Student Name Student number. (3) Teacher classes derived from the Person class and add teaching experience is used to represent the protected data members: int iYear the information Print redefine public member functions: void Print (). Print function to output the information format: " Teacher Name seniority" . (4) derived from the Student class Graduate class, to add research direction is used to represent a member of the protected data: string szResearch the information Print redefin
(2)从Person类派生Student类,添加用于表示学号的保护数据成员:int iNumber;重定义用于信息打印的公有成员函数:void Print()。其中,Print函数输出的信息格式为:“Student 姓名 学号”。
(3)从 Person类派生Teacher类,添加用于表示教龄的保护数据成员:int iYear;重定义用于信息打印的公有成员函数:void Print()。其中,Print函数输出的信息格式为:“Teacher 姓名 教龄”。
(4)从Student类派生Graduate类,添加用于表示研究方向的保护数据成员:string szResearch;重定义用于信息打印的公有成员函数:void Print()。其中,Print函数输出的信息格式为:“Graduate 姓名 研究方向”。
-(1) Design Person class requirements used to indicate the name of protecting data members: string szName public member function print information: void Print (). Print function designed for virtual function output format: " Person Name. (2) Student class derived from the Person class, add is used to represent the protected data members of the student number: int iNumber the information Print redefine public member functions: void Print (). Print function to output the information format: Student Name Student number. (3) Teacher classes derived from the Person class and add teaching experience is used to represent the protected data members: int iYear the information Print redefine public member functions: void Print (). Print function to output the information format: " Teacher Name seniority" . (4) derived from the Student class Graduate class, to add research direction is used to represent a member of the protected data: string szResearch the information Print redefin
(系统自动生成,下载前可以参看下载内容)
下载文件列表
5.txt
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.