Command design pattern
Type : Behavioral Design Pattern Summary Command pattern separates the client which invokes a method from the object which contains the method. Important points Command pattern decouples requestor (Invoker) of the action from the object that perform the action (Receiver). Command pattern can be used to do undo operations. Command pattern is useful when a history of requests is needed. Command pattern is useful when \we need callback functionality Advantages it decouples the client from the actual class who performs the operation. We can create new commands to have new behaviour. Undo operations can be designed with command pattern. Disadvantages It increases the number of Classes. If the Receiver class changes we would need to change the Command Class. Details Different Objects participating in the pattern are, Command - declares an interface for executing an operation; ConcreteCommand - extends the Command interface, implementing the execute metho