急!!!请求高手帮忙翻译下面一段话,最好是懂程序的

C++是在C语言基础上进行扩展而来的一门面向对象的程序设计语言,它既可以用于结构化程序设计,又可用于面向对象的程序设计,因此它是一个功能强大的混合型的程序设计语言。本文论... C++是在C语言基础上进行扩展而来的一门面向对象的程序设计语言,它既可以用于结构化程序设计,又可用于面向对象的程序设计,因此它是一个功能强大的混合型的程序设计语言。
本文论述了用VC6.0设计一个计算几何体的表面积和体积的系统。首先使用C++中的类设计了shape作为基类,其中包括输入信息函数input()、显示信息函数disp()、计算表面积的函数area()及计算体积的函数volume(),均为纯虚函数。然后,通过shape公有派生出QT(球体)、ZFT(正方体)、CFT(长方体)、YZT(圆柱体)等类,在每个派生类中根据要求分别对shape类中的所有成员函数进行定义,实现不同功能。最后,定义fun()普通函数,在其中声明shape的类型指针ptr,指向抽象类数据,通过在主函数中调用fun()函数实现多态性操作,完成相应功能。
关键词:抽象类 纯虚函数 派生 多态性 指针
展开
瑞福雨L
2011-06-26 · TA获得超过422个赞
知道小有建树答主
回答量:512
采纳率:0%
帮助的人:196万
展开全部
C + + is based on the C language extended from the one object-oriented programming language, both can be used for structured programming, but also for object-oriented programming, so it is a powerful hybrid programming language.
This article discusses the design of a computational geometry with VC6.0 body surface area and volume of the system. First, using C + + classes designed shape as the base class, including the input function input (), display information function disp (), calculate the surface area of the function area () and calculate the volume function volume (), are pure virtual function . Then, shape the public derived QT (sphere), ZFT (cube), CFT (rectangular), YZT (cylinder), and the like, each derived class of shape were required all members of the class defined functions, different functions. Finally, define fun () general function, in which the shape of the type of pointer declaration ptr, data pointing to an abstract class, called by the main function fun () functions to achieve polymorphism in operation, the completion of the appropriate functions.
我改名字还不行吗Fk
2011-06-26 · 超过17用户采纳过TA的回答
知道答主
回答量:35
采纳率:0%
帮助的人:34.6万
展开全部
++ are carries on a facade which in the C language foundation the expansion comes to the object programming language, it both may use in the structurization programming, and may use in the object-oriented programming, therefore it is a function formidable mixed type programming language. this article elaborated has designed a computation geometric solid with VC6.0 the surface area and the volume system. First used in C++ the kind to design shape to take the base class, including infed information function input(), displayed information function disp(), computation surface area function area() and computation volume function volume(), was the pure empty function. Then, public derives QT through shape (spheroid), ZFT (cube), CFT (cuboid), YZT (circular cylinder) of the same kind, acts according to the request in each derived class to carry on the definition separately to the shape kind of all member function, realizes the different function. Finally, defines the fun() ordinary function, in stated that shape type indicator ptr, the directional abstract class data, through transfers the fun() function in the main function to realize the polymorphism operation, completes the corresponding function.
key words: Abstract class, pure empty function, derivation, polymorphism, indicator
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式