What is the purpose of the Command design pattern?
- To create objects that are interchangeable with their base classes.
- To encapsulate operations in an object and pass them as messages.
- To manage the flow of control between objects in a complex system.
- To provide a way to invoke operations without coupling the invoker object to the target object that performs the operation.
The Command design pattern decouples the invoker of an operation from the target object that performs the operation. This allows for greater flexibility and modularity in the design of a system.
Loading...