Multiple choice technology architecture

Key Concept for applying a State Pattern:

  1. Modifying a persistent object results in the instance update of the database

  2. Only one persistent object can refer to an instance of a class at any given time

  3. The transactional state of an object decides the response to an operation

  4. None of the above

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

The State Pattern allows an object to alter its behavior when its internal state changes, appearing as if the object changes its class. The object delegates state-specific behavior to different state objects, and the current state determines how the object responds to operations. Option C correctly identifies that an object's state determines its response to operations, which is the essence of the State Pattern. Options A and B discuss persistence concerns unrelated to the State Pattern.