问题 单项选择题

若系统中的某子模块需要为其他模块提供访问不同数据库系统的功能,这些数据库系统提供的访问接口有一定的差异,但访问过程却都是相同的,例如,先连接数据库,再打开数据库,最后对数据进行查询。针对上述需求,可以采用()设计模式抽象出相同的数据库访问过程,该设计模式()。

先连接数据库,再打开数据库,最后对数据进行查询。针对上述需求,可以采用外观设计模式抽象出相同的数据库访问过程,该设计模式()。

A.可以动态、透明地给单个对象添加职责

B.为子系统定义了一个高层接口,这个接口使得这一子系统更加容易使用

C.通过运用共享技术,有效支持大量细粒度的对象

D.将抽象部分与它的实现部分分离,使它们都可以独立地变化

答案

参考答案:B

解析:

分析 外观(facade)模式是对象的结构模式,要求外部与一个子系统的通信必须通过一个统一的外观对象进行,为子系统中的一组接口提供一个一致的界面,外观模式定义了一个高层接口,这个接口使得这一子系统更加容易使用。

阅读理解

下面文章有5处需要添加小标题。请从以下选项(A、B、C、D、E和F)中选出符合各段意思的小标题。选项中有一项是多余选项。

A. Varieties of college dictionaries

B. Accessing electronic dictionaries

C. Elements under a dictionary entry

D. Complete editions of dictionaries

E. Using dictionaries for particular fields

F. Features (特点) of college dictionaries

小题1:______________              

You’re probably most familiar with college dictionaries, often called abridged dictionaries.Although abridged means “shortened” , these dictionaries contain more than 150,000 entries and provide detailed definitions that are sufficient for most college students and general users. College dictionaries also contain separate lists of abbreviations, biographical and geographical names, foreign words and phrases, and tables of measures. Webster’s II New Riverside University Dictionary and the American Heritage Dictionary of the English Language are college dictionaries.

小题2:______________              

Unabridged dictionaries contain as many as 500,000 entries and provide detailed definitions and extensive word histories (etymologies). These dictionaries, possibly in several volumes and mostly found in libraries, are excellent sources for scholarly inquiries. Unabridged dictionaries include the Oxford English Dictionary and the Random House Dictionary of the English Language.

小题3:______________              

A dictionary entry has many elements: multiple definitions, syllabication (音节划分), preferred spelling and pronunciation (some words have more than one acceptable spelling and pronunciation) , and part-of-speech labels. Some entries also include plurals, capitalized forms, synonyms, antonyms, and derivatives. Americanisms and etymologies may be provided along with usage notes, cross-references, and idioms.

小题4:______________              

If you prefer using the dictionary on a computer, you can obtain CD-ROM versions of many major dictionaries. In addition, you can access numerous electronic dictionaries, such as WW Webster’s Dictionary, on the Internet. Online dictionaries allow you to enter a search word (you even get help with spelling) to see a definition, and sometimes even an illustration. Online dictionaries also offer additional features, such as word games, language tips, and amusing facts about words. Some online dictionary services allow you to access numerous dictionaries, both general and specialized.

小题5:______________              

Specialized dictionaries provide in-depth information about a certain field. For example there are dictionaries for the specialized vocabularies of law, computer technology, and medicine. In addition, there are dictionaries of synonyms, clichés, slang, and even regional expressions, such as the Dictionary of American Regional English (DARE). There are also dictionaries of foreign languages, famous people’s names, literary characters’ names and place names.

单项选择题