- 論壇徽章:
- 0
|
本帖最后由 4006279 于 2012-09-14 15:06 編輯
基于上述信息, 下列哪個(gè)沒有增加耦合的傾向?
1 許多類屬性在一個(gè)類
2 許多實(shí)例屬性在一個(gè)類
3 一個(gè)或多個(gè)全局變量
4 以非常高(high message)的消息發(fā)送計(jì)數(shù)的方法
5 用get /set存取方法 封裝數(shù)據(jù)
原文:
Coupling refers to how often a change in one class requires a change in other classes.
Referring to the above information, which one of the following does NOT tend to increase coupling?
Choice 1
Many class attributes in a class
Choice 2
Many instance attributes in a class
Choice 3
One or more global variables
Choice 4
Methods with very high message send counts
Choice 5
Encapsulated data with accessor methods
|
|