2009年2月5日 星期四

第23題

A company has a business application that provides its users with many different reports: receivables reports, payables reports, revenue projects, and so on. The company has just purchased some new, state-of-the-art, wireless printers, and a programmer has been assigned the task of enhancing all of the reports to use not only the company's old printers, but the new wireless printers as well. When the programmer starts looking into the application, the programmer discovers that because of the design of the application, it is necessary to make changes to each report to support the new printers. Which two design concepts most likely explain the situation? (Choose two.)
A. Inheritance
B. Low cohesion
C. Tight coupling
D. High cohesion
E. Loose coupling
F. Object immutablility




-----------------------------------------------------------------------------------------------
答案:BC
參考:第6 章物件導向基本觀念

有間公司有個商業應用系統這系統提供了各式各樣的報表功能.這間公司剛採購了新的無線印表機,並指派了一位工程師去看能否將報表功能支援原有的印表機及新的無線印表機.當這位工程師去看了程式碼後發現,如要支援新的無線印表機時,將要修改每一支報表的程式.
Low cohesion //低凝聚性 Tight coupling //高相依性

沒有留言:

張貼留言