文件名称:1
介绍说明--下载内容均来自于网络,请自行研究使用
要求正方体、球、圆柱的表面积,可以抽象出一个公共的基类Container为抽象类,在其中定义一个公共的数据成员radius(此数据可以作为正方形的边长、球的半径、圆柱体底面圆半径),以及求表面积的纯虚函数area()。由此抽象类派生出要描述的三个类,利用基类指针和虚函数,分别计算三种图形的表面积。-Requirements of the surface area of 挠甀戀攀, sphere, cylinder, you can abstract out a common base class Container is an abstract class, in which the definition of a public data member radius (this data can be used as the side of a square radius of the sphere, cylinder underside radius ), and seek the surface area of 瀠甀爀攀 virtual function area (). This abstract class derived to describe the three classes, the use of base class pointers and virtual functions, respectively, to calculate the surface area of 琠栀攀 three graphics.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
1.doc