文件名称:xuhanshu2
介绍说明--下载内容均来自于网络,请自行研究使用
编写一个程序计算正方形、球体和圆柱体的表面积和体积。依题意,抽象出一个公共基类CContaineer为抽象类,在其中定义求表面积和体积的虚函数(该抽象类本身没有表面积和体积可言)。抽象类中定义一个公共的数据成员radius,此数据可作为球体的半径、正方形的边长、圆柱体底面积圆半径。由此抽象类派生出要描述的三个类,在这三个类中都具有求表面积和体积的重定义版本。
-Write a program to calculate square, sphere and cylinder surface area and volume. According to the meaning of problems, a common abstract base class CContaineer an abstract class, which defines requirements in surface area and volume of virtual functions (abstract class does not have the surface area and volume at all). Abstract class defines a public data member radius, this data can be used as the radius of the sphere, square side length of the cylinder base area of the radius. This abstract class derived to describe the three classes in the three classes have a surface area and volume of seeking re-definition version.
-Write a program to calculate square, sphere and cylinder surface area and volume. According to the meaning of problems, a common abstract base class CContaineer an abstract class, which defines requirements in surface area and volume of virtual functions (abstract class does not have the surface area and volume at all). Abstract class defines a public data member radius, this data can be used as the radius of the sphere, square side length of the cylinder base area of the radius. This abstract class derived to describe the three classes in the three classes have a surface area and volume of seeking re-definition version.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
xuhanshu2.doc