ConcreteCommand
ConcreteCommand is a specific implementation of the Command pattern, a behavioral design pattern that encapsulates a request as an object, thereby allowing parameterization of clients with queues, logs, and undoable operations. In the pattern hierarchy, the abstract Command interface declares a method to execute an operation. ConcreteCommand implements this interface, linking a particular Receiver object and the action to perform.
The Receiver holds the business logic that actually manipulates the system state. ConcreteCommand stores a reference
Typical use of ConcreteCommand appears in GUI toolkits: a menu item is a ConcreteCommand that, when executed,
Implementing ConcreteCommand usually involves three classes: an abstract Command with an execute() method, a Receiver that
ConcreteCommand provides modularity, extensibility, and testability: new commands can be added without altering existing code. However,