文件名称:Point-x-y
介绍说明--下载内容来自于网络,使用问题请自行百度
先建立一个点类Point,包含数据成员x,y(坐标点)。以它为基类,派生出圆类Circle,增加数据成员radius(半径),再以Cirlcle类为直接基类,派生出圆柱体类Cylinder,再增加数据成员height(高)。要求:
(1)每个类都有构造函数、用于从键盘获取数据的成员函数set(),用于显示数据的成员函数display()。
(2)用虚函数输出各类对象信息
-First establish a point class Point contains data members x, y (coordinate points). The base class for derived round class Circle, increased data member radius (radius), then Cirlcle class direct base class, the cylinder class derived Cylinder, additional data members height (H). Requirements: (1) for each class constructor, used to obtain data from the keyboard member function set () member function display (used to display data). (2) virtual function to output all kinds of object information
(1)每个类都有构造函数、用于从键盘获取数据的成员函数set(),用于显示数据的成员函数display()。
(2)用虚函数输出各类对象信息
-First establish a point class Point contains data members x, y (coordinate points). The base class for derived round class Circle, increased data member radius (radius), then Cirlcle class direct base class, the cylinder class derived Cylinder, additional data members height (H). Requirements: (1) for each class constructor, used to obtain data from the keyboard member function set () member function display (used to display data). (2) virtual function to output all kinds of object information
(系统自动生成,下载前可以参看下载内容)
下载文件列表
文件名 | 大小 | 更新时间 |
---|---|---|
Point-x | y.doc |
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.