an example from Head-First Design Pattern