Contrary ________ public opinion, this area has long been a heaven for all forms of insect life.A.toB.withC.atD.for

题目
Contrary ________ public opinion, this area has long been a heaven for all forms of insect life.

A.to

B.with

C.at

D.for


相似考题
更多“Contrary ________ public opinion, this area has long been a heaven for all forms of insect life. ”相关问题
  • 第1题:

    She would____ to be busy with her homework whenever her father came into her room.

    A、battle

    B、pretend

    C、cream

    D、heaven


    正确答案:B

  • 第2题:

    阅读以下说明和C++程序,将应填入(n)处的字句写在对应栏内。

    【说明】

    以下程序的功能是计算正方体、球体和圆柱体的表面积和体积并输出。

    程序由4个类组成:类cube、sphere和cylinder分别表示正方体、球体和圆柱体;抽象类 container为抽象类,提供了两个纯虚拟函数surface_area()和volum(),作为通用接口。

    【C++程序】

    include<iostream.h>

    define pi 3.1416

    class container{

    protected:

    double radius;

    public:

    container(double radius) {container::radius=radius;}

    virtual double surface_area()=0;

    virtual double velum()=0;

    };

    class cube:(1){ //定义正方体类

    public:

    cube(double radius):container(radius){};

    double surface_area () {return 6 * radius * radius;}

    double volum() {return radius * radius * radius;}

    };

    class sphere:(2){ //定义球体类

    public:

    sphere(double radius): container(radius){};

    double surface_area() { return (3);}

    double volum() {return pi * radius * radius * radius * 4/3;}

    };

    class cylinder:(4){ //定义圆柱体类

    double height;

    public:

    cylinder(double radius,double height):container(radius)

    {

    container::height=height;

    }

    double surface_are a () { return 2 * pi * radius * (height+radius); }

    double volum () {return (5);}

    };

    void main()

    {

    container * p;

    cube obj1 (5);

    sphere obj2(5);

    cylinder obj3(5,5);

    p=&obj1;

    cout<<“正方体表面积”(<<p->surface_area()<<end1;

    cont<<“正方体体积”<<p->volume()<<end1;

    p=&obj2;

    cout<<“球体表面积”<<p->surface_area()<<end1;

    cout<<“球体体积”<<p->volume()<<end1;

    p=&obj3;

    cout<<“球体表面积”<<p->surface_area()<<end1;

    cout<<“球体体积”<<p->volume()<<end1;

    }


    正确答案:(1)public container (2)public container (3) 4 * pi * radius * radius (4) public container (5)pi * radius * radius * height
    (1)public container (2)public container (3) 4 * pi * radius * radius (4) public container (5)pi * radius * radius * height 解析:类cube、sphere和cylinder分别表示正方体、球体和圆柱体,它们都需要求各自的表面积和体积,而抽象类container提供纯虚拟函数 surface_area()和velum(),所以类cube、sphere和cylinder都以类contain为基类,公有继承,所以(1)、(2)和(4)空应填入“public container”。
    (3)空处为类sphere中求表面积函数的返回值,所以根据球体表面积公式应填入“4*pi*radius*radius”。
    (5)空处为类cylinder中求圆柱体体积函数的返回值,所以根据圆柱体体积公式应填入“pi*radius*radius*height”。

  • 第3题:

    __________

    A.from
    B.away
    C.against
    D.contrary

    答案:A
    解析:

  • 第4题:

    有以下程序:include using namespace std;class A{private: int x,y;public: void se

    有以下程序: #include <iostream> using namespace std; class A { private: int x,y; public: void set (int i,int j) { x=i; y=j; } int get_y() { return y; } }; class box { private: int length,width; A label; public: void set(int 1,int w, int s,int p) { length=1; width=w; label.set(s,p); } int get_area() { return length*width; } }; int main() { box small; small.set(2,4,1,35); cout<<small.get_area()<<end1; return 0; } 运行后的输出结果是( )。

    A.8

    B.4

    C.35

    D.70


    正确答案:A
    解析:本题考核成员对象的应用。类box的成员函数set()为设置对象的坐标值和对象的长、宽值。成员函数setarea返回该对象的面积。程序最后输出为8。

  • 第5题:

    Contrary ( ) the popular opinion, higher taxes end up benefiting the citizens more than lower ones.

    A.for
    B.in
    C.to
    D.with

    答案:C
    解析:
    本题考察词语搭配。题目意为“与普遍的观点相反的是,与较低税收相比,较高税收最终使民众受益更多。”这里是固定搭配 contrary to popular belief/opinion 与普遍的看法/观点相反。