command
We have a client/invoker and a receiver With command pattern we want to encapsulate the request.
⇒ so our command object is a group of actions
Inderstanding the process

Diagram


Example of implementation
Command Interface

Concrete Command
light= receiver
on() = action

The invoker

Test

Check page 220 : implementation with execute() and Undo()