SCJP 1.6版考題 024

出自 陳富國維基館
於 2013年3月30日 (六) 08:27 由 Ikk (對話 | 貢獻) 所做的修訂 (新頁面: A company that makes Computer Assisted Design(CAD) software has, within its application some utility classes that are used to perform 3D rendering tasks. 有一些工具類別...)
(差異) ←上個修訂 | 最新修訂 (差異) | 下個修訂→ (差異)
前往: 導覽搜尋
A company that makes Computer Assisted Design(CAD) software has, 
within its application some utility classes that are used to perform 3D rendering tasks. 
  有一些工具類別被使用來進行3D著色工作

The company's chief scientist has just improved the performance of one of 
the utility classes' key rendering  algorithms, and has assigned a programmer to replace the old algorithm 
with the new algorithm.

When the programmer begins researching the utility classes, 
she is happy to discover that the algorithm to be replaced exists in only one class.
The programmer reviews that class‘s API,
and replaces the old algorithm with the new algorithm, 
being careful that her changes adhere strictly to the class’s API.

Once testing has begun, 
the programmer discovers that other classes that use the class she changed are no longer working properly. 
  (她發現到…她做了一些改變之後,一些使用到她改變的類別的其他類別再也不能正常地運作…)
   

What design flaw is most likely the cause of there new bugs?
  A. Inheritance
  B. Tight coupling
  C. Low cohesion
  D. High cohesion
  E. Loose coupling
  F. Object immutablility

解答


Ans: B

解說: 無