We have a GUI program we'd like to clean up. It's a simple simulation of XP's planning game, shown in Figure 16.1. The customer can create new cards, split existing cards, delete old cards, and get a simple analysis of the plan. The programmer can put a cost estimate on a card and update the velocity estimate. In addition, anyone can type on a card or move it around by dragging its border. Notice also that there is summary information on the bottom of the screen, updated after each action.
Figure 16.1. Simulation of XP's Planning Game
The code for this program is built around three classes: Table (the overall application, including the buttons ), Background (where cards are put), and Card (representing an index card).