Code from Head First Design Patterns for Command Pattern