Object-Oriented Programming · Netflix · Medium
Problem: Implement a Command Executor with execute and undo Create a CommandExecutor capable of running commands sequentially and reversing the latest command that remains undoable. Every Command must provide: apply(): carries out the operation and changes the system state. revert(): reverses that operation and returns the state to its condition immediately before apply() ran. Your implementation must include: execute(command): run the command, then add it to the undo…
Checking your access…