SCJP 1.6版考題 087

出自 陳富國維基館
於 2013年3月30日 (六) 06:03 由 Ikk (對話 | 貢獻) 所做的修訂 (新頁面: 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...)
(差異) ←上個修訂 | 最新修訂 (差異) | 下個修訂→ (差異)
前往: 導覽搜尋
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

解答


Ans: E

解說: 這題是在講說程式設計師了解到目前的設計允許其他的類別存取一些只能由utility類別存取的方法,意思是這些方法沒有被封裝,設為私有的。