Name the actor classes used in Memento pattern.

  • Caretaker, Originator, Memento
  • Memento, Caretaker, Originator
  • Originator, Caretaker, Memento
  • Originator, Memento, Caretaker
The actor classes used in the Memento pattern are: Originator, Memento, and Caretaker. The Originator class is responsible for creating the memento and restoring its state. The Memento class is responsible for storing the internal state of the Originator. The Caretaker class is responsible for maintaining a list of mementos and providing the Originator with the appropriate memento at the appropriate time.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *