问题 单项选择题

当不适合采用生成子类的方法对已有的类进行扩充时,可以采用 (76) 设计模式动态地给一个对象添加一些额外的职责;当应用程序由于使用大量的对象,造成很大的存储开销时,可以采用 (77) 设计模式运用共享技术来有效地支持大量细粒度的对象;当想使用一个已经存在的类,但其接口不符合需求时,可以采用 (78) 设计模式将该类的接口转换成我们希望的接口。

A.命令(Command)
B.适配器(Adapter)
C.装饰(Decorator)
D.享元(Flyweight)

答案

参考答案:D

阅读理解

阅读理解。

        Going to a friend's house is very exciting. You may spend time with a friend and get to see where he lives.

So remember to be polite.

        When to arrive

        The first thing to remember is that when a friend invites you over, you need to arrive on time. If your

friend tells you to come "around 3:00", that means you can turn up a little bit after 3:00. But usually it is a good

idea to arrive at the right time. 

        What to bring

        Often it is also nice to bring something to your friend's house. This could be a box of chocolates for you

two to share, or maybe a movie that you can watch together. You can also bring some flowers. A little gift is a

nice way to show your friend that you are excited to be at his house.

        How to greet (问候)

        When you visit your friend's house, you may also meet his parents. You should tell them who you are and

they may tell you their names. As a child, I went to visit my friend Paul. I called his parents by their first names

John and Mary. But now I know it is more polite to call them Mr. or Mrs. Smith. This will show them more

respect (尊重) and then they may tell you to call them by their first names. Another way to show respect is to

call them Madam or Sir.

        It is a cool thing to visit a friend's house. Be polite to your friend and your friend's parents, and you will

be invited again!

1. If you are told to get to your friend's house around 5:00 p.m., it is polite to arrive at_____[ ]

A. 5:02 p.m.

B. 4:50 p.m.

C. 4:30 p.m.

D. 5:30 p.m.

2. When the writer was a child, he called his friend's father _____.[ ]

A. Smith

B. John

C. Mary

D. Paul

3. The passage mainly (主要) tells us _____.[ ]

A. when to arrive at your friend's house

B. how to greet people

C. what to bring to your friend

D. how to be a good visitor

单项选择题 B型题