皮皮学,免费搜题
登录
logo - 刷刷题
搜题
【单选题】
定义描述矩形的类 Rectangle ,描述长方体高的类 High ,其数据成员为长方体高度 H 。再由矩形类与高类多重派生出长方体类 Cuboid 。主函数中定义长方体对象并修改数据显示数据。 #include class Rectangle { protected: float Length,Width; // 数据成员为长与宽,类外不可访问 public: float Area() // 计算矩形面积的函数 { return Length*Width; } Rectangle(float L,float W ) { Length=L; Width=W; } Rectangle() { Length=0; Width=0; } }; class High{ private: float Height; // 数据成员为高度, public: High(float x=0) // 构造函数 { Height =x; } float GetH() { return Height; } void SetH(float h) { Height =h; } }; _ ___ 1____ //派生类 定义 { private: float Volume; // 数据成员体积 public: Cuboid(float L,float W,float H):Rectangle(L,W),High(H){ Volume=Area()*GetH(); // 初始化Volume值 } float Vol(){ // 计算体积并返回值 Volume=Area()*GetH(); return Volume; } void show(){ // 显示长、宽、高与体积 cout<<" 矩形长: "< <
A.
Class Cuboid :Public Rectangle,Public High
B.
class Cuboid :public Rectangle,public High
C.
class Cuboid :public Rectangle,c High
D.
class Cuboid =public Rectangle,public High
手机使用
分享
复制链接
新浪微博
分享QQ
微信扫一扫
微信内点击右上角“…”即可分享
反馈
参考答案:
举一反三
【单选题】You would laugh if anyone ____ ask you whether you can tell an animal from a plant.
A.
will
B.
shall
C.
should
D.
would
【简答题】How can you find out whether two parsons are in agreement or not?
【多选题】借条、收条和欠条的差异有
A.
产生的原因不同
B.
性质不同
C.
结果不同
D.
诉讼时效不同
E.
证明力不同
【判断题】柱布置时的“转角”选项,需输入柱长度方向与x轴的夹角。
A.
正确
B.
错误
【单选题】. Whether you can get the job or not will largely depend on how you take ____ of the opportunity.
A.
interest
B.
benefit
C.
use
D.
advantage
【简答题】加载并注册数据库驱动的具体代码是【】。
【单选题】As a graduate from university this year, you can probably get a job as______.
A.
a cost accountant in THYSSEN
B.
a purchaser in THYSSEN
C.
a secretary in NESTLE
D.
an accountant in NESTLE
【简答题】______ is the most important factor that determines whether you can succeed in navigating your turning point.
【判断题】对于一个5V电压源,两端电压为5V,而电流为0A。
A.
正确
B.
错误
【简答题】You will learn to assess whether a business can pay back the money it owes.
相关题目:
参考解析:
知识点:
题目纠错 0
发布
创建自己的小题库 - 刷刷题