皮皮学,免费搜题
登录
logo - 刷刷题
搜题
【简答题】
/*点类派生出圆类 请以点类Point为基类派生出一个圆类Circle。 圆类Circle的数据成员为r(私有属性,存储圆的半径, 圆心的点坐标通过继承点类Point加以实现), 成员函数有构造函数Circle、计算圆的面积函数Area、 计算圆的周长函数Perimeter和输出函数Display, 其中构造函数实现基类和圆类的数据成员的初始化, Display函数实现圆心坐标(利用基类Point的Display实现)、 圆的半径、圆的面积(利用Area函数实现)和 圆的周长(利用Perimeter函数实现)的输出。 请编写圆类的定义及成员函数实现,并在主函数中定义圆类对象, 验证各个函数的正确性。 说明:圆周率PI的取值为3.14 int main() { double x,y,r; cin>>x>>y>>r; //圆心的点坐标及圆的半径 Circle C(x,y,r); C.Display(); //输出圆心点坐标,圆的半径,圆的面积,圆的周长 return 0; } 输入: 1.5 2.6 1.8 输出: Center:Point(1.5,2.6) Radius:1.8 Area:10.1736 Perimeter:11.304*/
手机使用
分享
复制链接
新浪微博
分享QQ
微信扫一扫
微信内点击右上角“…”即可分享
反馈
参考答案:
举一反三
【单选题】Which evidence from the selection supports Gregory's statement that, after the school incident, he felt shame everywhere? ______
A.
Gregory stuffed the plaid mackinaw into a garbage can.
B.
Gregory was always chosen to wash the blackboards on Fridays.
C.
Helene Tucker's eyes were full of tears.
D.
Gregory wanted to pay for the wino's dinner.
【简答题】According to Gregory Rodriguez,which of the following statements is true? [A] Mainstream America discriminates against immigrants of certain ethnicities. [B] America's assimilating machine is still wo...
【单选题】According to Gregory Rodriguez, which of the following statements is true?
A.
Mainstream America discriminates against immigrants of certain ethnicities.
B.
America’s assimilating machine is still working.
C.
Immigrants find it difficult to abandon their cultural identities.
D.
Immigrants should abandon their own cultures.
【判断题】演示文稿就是幻灯片,是使用PowerPoint制作出来的文件。
A.
正确
B.
错误
【单选题】l "To SAVE OR NOT TO SAVE" uses rhetoric device of ____
A.
parody
B.
rhyme
C.
alliteration
D.
pun
【简答题】Gregory Co is a listed company and, until 1 October 20X5, it had no subsidiaries. On that date, it acquired 75% of Tamsin Co’s equity shares by means of a share exchange of two new shares in Gregory C...
【单选题】“当排练您的演示文稿时,PowerPoint将记录在每张幻灯片上所用的时间,一旦计时就绪,您就可以使用它们自动运行放映。”以上描述指的是PPT的哪一项功能【 】
A.
循环放映
B.
排练计时
C.
动画窗格
D.
幻灯片切换
【单选题】钢材脆性破坏的特点是( )
A.
无变形
B.
变形很小
C.
变形较大
D.
变形很大
【简答题】The author seems to be in favor of [A] the nativists. [B] the multiculturalists. [C] Gregory Rodriguez. [D] mainstream America.
【单选题】当排练您的演示文稿时,PowerPoint将记录在每张幻灯片上所用的时间,一旦计时就绪,您就可以使用它们自动运行放映。以上描述指的是PPT里哪一项功能?( )
A.
循环放映
B.
排练计时
C.
动画窗格
D.
幻灯片切换
相关题目:
参考解析:
知识点:
题目纠错 0
发布
创建自己的小题库 - 刷刷题