A team of programmers is involved in reviewing a proposed design for a new utility class, After some
discussion, they realize that the current design allows other classes to access methods in the utility class that
should be accessible only to methods within the utility class itself. What design issue has the team
discovered?
A. Tight coupling
B. Low cohesion
C. High cohesion
D. Loose coupling
E. Weak encapsulation
F. Strong encapsulation
答案:E
參考:7-4 封裝
---------------------------------
一隊程式員發現他們的utility class裡面有些功能目前是能讓其他class作存取的. 但是那些應該只能在utility class裡面存取. 這樣代表了什麼樣的設計問題?
E. Weak encapsulation (低的封裝).
沒有留言:
張貼留言