文件名称:Lab12_2
介绍说明--下载内容均来自于网络,请自行研究使用
要求计算正方体、球和圆柱3个几何体的表面积和体积。要求抽象出一个公共的基类Base,把它作为抽象类,在该类内定义求表面积和体积的纯虚函数。在抽象类中可以定义一个数据成员length,它可作为球的半径、正方体的边长或圆柱体底面积的半径。-Required to calculate cube, sphere and cylinder 3 geometry surface area and volume. Requires a common abstract base class Base, take it as an abstract class defined within the class find the surface area and volume of pure virtual functions. In an abstract class can define a data member length, it can be used as the radius of the ball, cube or cylinder side length of the radius of the bottom area.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
Lab12_2.cpp