国家开放大学

Please hand () your homework in time .A.onB.outC.in

题目
Please hand () your homework in time .

A.on

B.out

C.in

如果没有搜索结果,请直接 联系老师 获取答案。
如果没有搜索结果,请直接 联系老师 获取答案。
相似问题和答案

第1题:

阅读下列函数说明和C++代码,回答问题

[说明]

任何一种程序都是为了解决问题而撰写的,解决问题时需要实现一些特定的运算法则。在策略(Strategy)模式下,可以更换实现算法的部分而不留痕迹,切换整个算法,简化改为采用其他方法来解决同样问题。

以下是一个“剪刀石头布”游戏。猜拳时的“策略”有2种方法:第一种是“猜赢后继续出同样的招式”(WinningStrategy),第二种是“从上一次出的招式中,以概率分配方式求出下一个招式的几率”(ProbStrategy)。程序中定义了Hand类表示猜拳时的“手势”,类内部以0(石头)、1(剪刀)、2(布)来表示。Hand类的实例只会产生3个。以下是C++语言实现,能够正确编译通过。

[C++代码]

class Hand{

private:

int handvalue;

static Hand *hand0;

static Hand *hand1;

static Hand *hand2;

(1) ;

Hand(int handvalue){

this->handvalue = handvalue;

}

public:

(2) Hand* getHand(int handvalue){

/*省略具体实现*/

}

};

Hand *Hand::hand0 = new Hand(0);

Hand *Hand::hand1 = new Hand(1);

Hand *Hand::hand2 = new Hand(2);

class Strategy{

public:

(3) Hand* nextHand() = 0;

};

class WinningStrategy : public Strategy{

private:

bool won;

Hand *prevHand;

public:

winningStrategy(){

won = false;

}

Hand* nextHand(){

if(!won){

prevHand = Hand::getHand(rand()%3);

}

return prevHand;

}

};

class probstrategy : public Strategy{

public:

Hand* nextHand(){

int handvalue = 0;

/*省略具体实现*/

return Hand::getHand(handvalue);

}

};

class Player{

private:

string name;

Strategy* strategy;

public:

Player(string name, (4) strategy){

this->name = name;

this->strategy = strategy;

}

Hand *nextHand()(//向战略请示手势

return (5) ;

}

};


正确答案:(1)private static virtual Strategy* strategy->nextHand()
(1)private static virtual Strategy* strategy->nextHand() 解析:Hand类要保证只产生3个实例,就要求不能随便生成Hand类,因此其构造方法需要是private型的,故空(1)应填private。
先看空(3),由后面的“=0”易判知nexthand()函数是纯虚函数,故空(3)应填virtual。
再来看空(2),由对getHand()方法的调用方式Hand::getHand(rand()%3)及Hand::getHand(handvalue),可知该方法是类Hand的静态方法,故空(2)应填static。
由语句this->strategy = strategy;可知:this->strategy与strategy是同数据类型,this表示自身指针,而this->strategy是Strategy*类型,故空(4)应填Strategy*,注意是指针。
方法nextHand()是“向战略请示手势”,取得手势是通过其所采用的“策略”实现的,故空(5)应填strategy->nextHand()。注意指针写法。

第2题:

Ours is finer than ( ).

A、yours or his

B、yours or him

C、your's or his

D、you or he


参考答案:A

第3题:

7. Hi! This is_______ new teacher.__________ name is Linda.

A. your; My

B. his; Your

C. your ; Her

D. her; His


正确答案:C
7.C【解析】只看第一个空四个选项在字面上都符合。根据句意,是介绍他人,所以第二个空就排除了A、B。又因为Linda是女名,所以排除D。

第4题:

48.

A. my

B. his

C. their

D. your


正确答案:C
48.C【解析】由本文及实际生活均可知很多中国学生高中期间不工作,而美国学生喜欢在他们空闲时间馓兼职工作。

第5题:

What's ( )job? Are ( ) British?

A. your, your

B. you, your

C. your, you


正确答案:C

第6题:

If you _____time, will you send the letter for me, please?

A. have

B. are having

C. have had


参考答案:A

第7题:

My opinions are similar to ___.

A.you

B.your

C.yours

D.your's


正确答案:C

第8题:

Nice to meet____(your).


正确答案:
37. you

第9题:

( ) – Is Miss White __________ English teacher, Maria?

– No, she teaches __________ geography.

A.your;my

B.you;mine

C.you;us

D.your;us


正确答案:D

第10题:

Your ______ working on my vessel has acknowledged the truth of and liability for the damage.

A.representative

B.DP

C.ship-owner

D.man


正确答案:A