1
Your task
Define commands and receivers
Give requests a common execute and undo contract.
Create execute and undo on the command abstraction.
Give Light turn-on and turn-off operations.
Give Fan a speed that commands can change and restore.
command.py
Your draft · saved locally
1
Structural feedback only—your code stays in this browser and is not executed.