文件名称:5-VC
介绍说明--下载内容来自于网络,使用问题请自行百度
设计名为Circle的类,表示圆。这个类包含:
一个名为radius的double型数据成员,表示圆的半径.
数据成员的设置器setr和获取器getr函数。
一个名为area()的函数,返回圆的面积。
一个名为perimeter()的函数,返回圆的周长
编写测试主函数:创建2个Circle类对象,将第1个圆的半径设置为2.5,第2个圆的半径设置为3.5,并输出两个圆对象的半径、面积和周长。-Design class named Circle, expressed circle. This class includes: a double-type data member named radius, the radius of the circle indicates setr data setter and getter getr member function. A function named area () returns the area of a circle. A function called perimeter () returns circumference of a circle to write test main function: to create two Circle class object, the first one radius of the circle is set to 2.5, the first two radius of the circle is set to 3.5, and the output of two radius of the circle object, area and perimeter.
一个名为radius的double型数据成员,表示圆的半径.
数据成员的设置器setr和获取器getr函数。
一个名为area()的函数,返回圆的面积。
一个名为perimeter()的函数,返回圆的周长
编写测试主函数:创建2个Circle类对象,将第1个圆的半径设置为2.5,第2个圆的半径设置为3.5,并输出两个圆对象的半径、面积和周长。-Design class named Circle, expressed circle. This class includes: a double-type data member named radius, the radius of the circle indicates setr data setter and getter getr member function. A function named area () returns the area of a circle. A function called perimeter () returns circumference of a circle to write test main function: to create two Circle class object, the first one radius of the circle is set to 2.5, the first two radius of the circle is set to 3.5, and the output of two radius of the circle object, area and perimeter.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
作业5 VC.doc
1999-2046 搜珍网 All Rights Reserved.
本站作为网络服务提供者,仅为网络服务对象提供信息存储空间,仅对用户上载内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。
