Middle
Name the design patterns that belong to behavioral patterns.
sobes.tech AI
Answer from AI
Behavioral design patterns:
- Chain of Responsibility: Passes a request along a chain of objects until one of them handles it.
- Command: Encapsulates a request as an object, allowing parameterization of clients with different requests, queuing or logging requests, and supporting undo operations.
- Iterator: Provides a way to access elements of a collection sequentially without exposing its internal representation.
- Mediator: Defines an object that encapsulates how a set of objects interact. Mediator promotes loose coupling by keeping objects from referring to each other explicitly.
- Memento: Captures and externalizes an object's internal state so that the object can be restored to this state later.
- Observer: Defines a one-to-many dependency between objects so that when one object changes state, all its dependents are notified.
- State: Allows an object to alter its behavior when its internal state changes. The object appears to change its class.
- Strategy: Defines a family of algorithms, encapsulates each one, and makes them interchangeable. Strategy lets the algorithm vary independently from clients that use it.
- Template Method: Defines the skeleton of an algorithm in an operation, deferring some steps to subclasses. It lets subclasses redefine certain steps of an algorithm without changing its structure.
- Visitor: Represents an operation to be performed on elements of an object structure. Visitor lets you define a new operation without changing the classes of the elements.