问题 判断题

社会分裂为阶级的根本原因是剩余产品和私有制的出现。( )

答案

参考答案:

单项选择题

下面给出了四种设计模式的作用。

外观(Fagade):为子系统中的一组功能调用提供一个一致的接口,这个接口使得这一子系统更加容易使用;

装饰(Decorate):当不能采用生成子类的方法进行扩充时,动态地给一个对象添加一些额外的功能;

单件(Singleton):保证一个类仅有一个实例,并提供一个访问它的全局访问点;

模板方法(Template Method):在方法中定义算法的框架,而将算法中的一些操作步骤延迟到子类中实现。

请根据下面叙述的场景选用适当的设计模式。若某面向对象系统中的某些类有且只有一个实例,那么采用 (65) 设计模式能够有效达到该目的:该系统中的某子模块需要为其他模块捉供访问不同数据库系统(如 Oracle、SQL Server和DB2 UDB等)的功能,这些数据库系统提供的访问接口有一定的差异,但访问过程却都是相同的,例如,先连接数据库、再打开数据库、最后对数据进行查询, (66) 设计模式可抽象出相同的数据库访问过程;系统中的文本显示类(TextView)和图片显示类(Picture View)都继承了组件类(Component),分别显示文本和图片内容,现需要构造带有滚动条、或者带有黑色边框、或者既有滚动条又有黑色边框的文本显示控件和图片显示控件,但希望最多只增加三个类, (67) 计模式可以实现该目的。

(66)应选入()。

A.外观

B.装饰

C.单件

D.模板方法

单项选择题

The "standard of living" of any country means the average person’s share of the goods and services which the country produces. A country’s standard of living, (1) , depends first and (2) on its capacity to produce wealth." Wealth" in this sense is not money, for we do not live on money (3) on things that money can buy. "Goods" such as food and clothing, and "services" such as transport and " (4) ". A country’s capacity to produce wealth depends upon many factors, most of (5) have an effect on one another. Wealth depends (6) a great extent upon a country’s natural resources. Some regions of the world are well supplied with coal and minerals, and have a fertile soil and a (7) climate; other regions possess none of them.

Next to natural resources (8) the ability to turn them to use. China is perhaps as well (9) as the USA in natural resources, but suffered for many years from civil and (10) wars, and (11) this and other reasons was (12) to develop her resources. (13) and stable political conditions, and (14) from foreign invasion, enable a country to develop its natural resources peacefully and steadily, and to produce more wealth than another country equally well (15) by nature but less well ordered.

A country’s standard of living does not only depend upon the wealth that is produced and consumed (16) its own borders, but also upon what is indirectly produced through international trade. (17) , Britain’s wealth in foodstuffs and other agricultural products would be much less if she had to depend only on (18) grown at home. Trade makes it possible for her surplus manufactured goods to be traded abroad for the agricultural products that would (19) be lacking. A country’s wealth is, therefore, much influenced by its manufacturing capacity, (20) that other countries can be found ready to accept its manufactures.

3()

A.or

B.nor

C.but

D.except