问题 单项选择题

耦合性和内聚性是对模块独立性度量的两个标准。下列叙述中正确的是______。

A.提高耦合性降低内聚性有利于提高模块的独立性
B.降低耦合性提高内聚性有利于提高模块的独立性
C.耦合性是指一个模块内部各个元素间彼此结合的紧密程度
D.内聚性是指模块间互相连接的紧密程度

答案

参考答案:B

解析: 模块独立性是指每个模块只完成系统要求的独立的子功能,并且与其他模块的联系最少且接口简单。一般较优秀的软件设计应尽量做到高内聚、低耦合,即减弱模块之间的耦合性和提高模块内的内聚性,有利于提高模块的独立性,因此A错误,B正确。耦合性是模块间互相连接的紧密程度的度量,内聚性是指一个模块内部各个元素间彼此结合的紧密程度,因此C与D错误。

阅读理解

There was one shop in the town of Mufulira which was widely known for its racial discrimination. It was a drugstore. While Europeans were served at the counter, a long line of Africans queued at the window and often not only were kept waiting but were treated rudely by the shop assistants. One day I was determined to make a public protest (抗议) against this kind of thing, and many of the schoolboys in my class followed me to the store,

I simply went into the shop and asked the manager politely for some medicine. As soon as he saw me standing in the place where only European customers were allowed to stand he shouted at me in a bastard (怪声怪气的) language which is only used by a boss when speaking to his servants. I stood at the counter and politely requested in proper English that I should be served. The manager became angry and said, “Even if you stand there till Christmas, I will never serve you.”

I went to the District Commissioner’s office. Fortunately, he was out, for he was one of the old school; however, I saw a young District officer who was a friend of mine. He was very concerned to hear my story and told me that all I had to do was come to him personally and he wou1d buy my medicine for me. I protested that that was not good enough. I asked him to accompany me back to the store and to make a protest to the manager. This he did, and I well remember him saying to the manager,“Here is Mr. Kaunda who is a responsible member of the Urban Advisory Council, and you treat him like a common servant.” The manager of the drugstore apologized and said, “If only he had introduced himself and explained who he was, then, of course I should have given him proper service.”

I had to explain once again that he had missed my point. Why should I have to introduce myself every time I went into a store … any more than I should have to buy my medicine by going to a European friend? I want to prove that any man of any color, whatever his position, should have the right to go into any shop and buy what he wanted, After all, the money which I paid across the counter was exactly the same money as was paid by a European customer.

72. The writer was, at the time of the story, _________.

A. a European officer

B. an African servant

C. a drugstore assistant

D. a black school teacher

73. The manager of the drugstore shouted at the writer in dirty words because     .

A. he could not speak English in a polite way

B. he thought the writer wouldn’t understand English

C. that was the language he used when speaking to Africans

D. that was the only language he could speak when he was angry

74. In paragraph 3, the underlined sentence “he was one of the old school” means    .

A. he stuck to those old racial ideas

B. he graduated from an old white school

C. he was in charge of an old black school

D. he was an old official in the government

75. Why didn’t the writer wait at the window of the drugstore like other Africans?

A. He believed his white friends would help him out.

B. He wanted to fight for equal rights of all black people.

C. He thought he was educated and should he treated differently.

D. He thought, being an important person. he should not be kept waiting.

多项选择题 案例分析题