Monday, August 9, 2010

Cohesion

Courtesy of SCJP Sun® Certified Programmer for Java™ 6 Study Guide Exam (310-065) (9780071591065)
Chapter 2, Question 5

Which statement(s) are true? (Choose all that apply.)
  1. Cohesion is the OO principle most closely associated with hiding implementation details

    This refers to encapsulation

  2. Cohesion is the OO principle most closely associated with making sure that classes know about other classes only through their APIs

    This refers to coupling

  3. Cohesion is the OO principle most closely associated with making sure that a class is designed with a single, well-focused purpose

    Correct.

  4. Cohesion is the OO principle most closely associated with allowing a single object to be seen as having many types

    This refers to polymorphism

No comments:

Post a Comment