We'll look at how you can move between command, interpreter, and visitor.
Many interactive programs allow a user to perform one of a number of actions.
The code for this tends to begins its life scattered around the system. This usually shows up in one of two forms. This is bad form because the handler routine becomes a bottleneck for changes. The second form has the code attached to widgets. This code is better in that it keeps separate functions apart, but it's still flawed because GUI code tends to be intermingled with Model code.