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.
Loading...