问题 单项选择题

绑定是将 (45) (46) 所需要执行的代码加以结合的过程 (47) 是和类的继承以及多态相联系的。

(47)处填()。

A.响应绑定

B.动态绑定

C.静态绑定

D.过程绑定

答案

参考答案:B

解析:

绑定是一个把过程调用和响应调用所需要执行的代码加以结合的过程。在一般的程序设计语言中,绑定是在编译时进行的,叫做静态绑定。动态绑定则是在运行时进行的,因此,一个给定的过程调用和代码的结合是到调用发生时才进行的。

动态绑定是和类的继承以及多态相联系的。在继承关系中子类是父类的一个特例,所以父类对象可以出现的地方,子类对象也可以出现。因此在运行过程中,当一个对象发送消息请求服务时,要根据接收对象的具体情况将请求的操作与实现的方法进行连接,即动态绑定。

阅读理解

In China, there’re many different kinds of food. Some of them are very popular. The real Chinese food is dumplings. Now let’s talk about them, OK?

Everyone in China likes dumplings very much, and there are many different kinds of dumplings. Some have meat and vegetables in them, others have sugar, eggs and so on. I like dumplings with vegetables and pork better than any other kind.

Usually people make dumplings at home. If you have no time to make them, you can buy them from any supermarket. Then you take them home and eat them with vinegar.

The Spring Festival is very important in China. When it comes, we make dumplings, usually we put a coin(硬币) in a dumpling. If one eats the dumpling with the coin in it, he or she will be lucky in the year.

In the old days, people couldn’t often eat dumplings, because they were very poor. Now our country is becoming stronger and stronger, and our people are richer and richer. We can eat them very often.

Now tell me, do you like dumplings?

Welcome to China, and we’ll invite you to eat the real Chinese food —dumplings.

小题1:—What does the writer like dumplings with best? —     

A.Meat.

B.Seafood.

C.Vegetables and pork.

D.Vegetables.小题2:You can buy dumplings from the supermarket when        .

A.you have time

B.you are tired

C.you are busy

D.you are happy小题3:The word “vinegar” in the passage means       .

A.糖

B.醋

C.辣椒

D.酱油小题4:Which of the following is NOT true ?

A.The Chinese like dumplings very much.

B.If someone eats the dumpling with the coin in it, he or she will be lucky in the year.

C.In the old days, people could only eat dumplings because they were poor.

D.Now people are rich and they often eat dumplings.

问答题