Multiple choice technology web technology

Which statement(s) are true? (Choose all that apply.)

  1. Cohesion is the OO principle most closely associated with hiding implementation details

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

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

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

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

Cohesion refers to how focused a class is on a single responsibility. High cohesion means a class has one well-defined purpose, making it easier to maintain and understand. Options A and B describe encapsulation and loose coupling, which are different OO principles. Option D describes polymorphism.