文件名称: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
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.