问题 单项选择题

希赛公司欲实现一个数据处理软件,该软件需要从网络接收一组复杂的数据,然后分步进行解析和处理。在这种情况下,采用 (8) 的体系结构风格比较适合。

A.远程过程调用

B.层次化

C.管道/过滤器

D.共享数据

答案

参考答案:C

解析:

[分析]: 层次系统组织成一个层次结构,每一层为上层服务,并作为下层客户。例如,四层的分层式体系结构可以分为应用软件、业务软件、中间件和系统软件。这种风格支持基于可增加抽象层的设计。这样,允许将一个复杂问题分解成一个增量步骤序列的实现。由于每一层最多只影响两层,同时只要给相邻层提供相同的接口,允许每层用不同的方法实现,同样为软件复用提供了强大的支持。层次系统最广泛的应用是分层通信协议。在这一应用领域中,每一层提供一个抽象的功能,作为上层通信的基础。较低的层次定义低层的交互,最低层通常只定义硬件物理连接。
在管道/过滤器风格的软件体系结构中,每个构件都有一组输入和输出,构件读输入的数据流,经过内部处理,然后产生输出数据流。这个过程通常通过对输入流的变换及增量计算来完成,所以在输入被完全消费之前,输出便产生了。因此,这里的构件被称为过滤器,这种风格的连接件就像是数据流传输的管道,将一个过滤器的输出传到另一过滤器的输入。此风格特别重要的过滤器必须是独立的实体,它不能与其他的过滤器共享数据,而且一个过滤器不知道它上游和下游的标识。一个管道/过滤器网络输出的正确性并不依赖于过滤器进行增量计算过程的顺序。
根据以上介绍,在本题中,希赛公司欲实现一个数据处理软件,该软件需要从网络接收一组复杂的数据,然后分步进行解析和处理,适合采用的是管道/过滤器风格。

阅读理解

阅读短文,根据其内容回答问题。

         The idea of daylight (日光) saving time started with an American named Benjamin Franklin (1706-1790).

He explained how a lot of the money spent on candles used for light (This was before electricity电) could be

saved if everyone woke up earlier and went to bed earlier.

         Even though Franklin's idea had a clear meaning, most people didn't want to get up earlier than they had

to. Who would?

        An Englishman named William Willet didn't come up with a way to "make" the sun set (落下) later until

1907. His idea was to turn clocks forward (向前) by 20 minutes on each of the four Sundays in April, for a

total (总计) of 80 minutes.

        William's idea was laughed at, at first. But when World War I started in 1914, many countries decided

they had to save energy (能源) for the war.

        Daylight saving time has other uses. The more time you spend outside playing, the less time you are

spending in front of the computer or the TV. These things also use energy. 

        Also, daylight saving time sometimes causes problems. For example, China used it in 1986 —but stopped

it in 1991. That was because the temperatures are quite different from North to South and time from East to

West.

        If the people from northwest part of China use daylight saving time, sometimes they have to get up to

work when it is not very bright outside. That will cause some trouble for them.

       Still, most parts of the world do have daylight saving time, and most people look forward to the extra

(额外的) hour of evening light.

1. Did the idea of daylight saving time start with an American named Benjamin Franklin?

__________________________________________________________________

2. In which year was the idea of daylight saving time put in use?

__________________________________________________________________

3. According to this passage, what can you do when daylight saving time is used.

__________________________________________________________________

3. Why is daylight saving time not used in China now? The country

_______________________________________________________

4. Why did Franklin give the idea of daylight saving time?

_______________________________________________________

单项选择题