CS FundamentalsHardHCL · Tech Mahindra pattern

Assertion (A): A design pattern catalog entry typically names the pattern's intent, applicability, structure (class diagram), and consequences (trade-offs). Reason (R): Documenting consequences lets a team choose between two structurally similar patterns, like State and Strategy, based on which trade-offs actually matter for their use case.

  1. A. Both A and R are true and R is the correct explanation of A
  2. B. Both A and R are true but R is not the correct explanation of A
  3. C. A is true but R is false
  4. D. A is false but R is true

Correct answer: A. Both A and R are true and R is the correct explanation of A

Both are true: the Gang of Four catalog format includes intent, applicability, structure and consequences, and the consequences section is exactly what helps teams pick between structurally similar patterns based on real trade-offs rather than diagram shape alone.

More Software Engineering, Git and Cloud Basics questions

Exams that ask this topic