To create the defined class Stopwatch, which will contain methods that create the interface and calculate elapsed time, you do the following:
1. Open a standard Application Browser on DevelopStopwatch.
2.
3.
4. In the displayed prompter, type Stopwatch; then select OK. A window is displayed, prompting you to select among subclass and variableSubclass.
5. Select subclass; then select OK. Stopwatch is displayed, indented, under Object in the list of classes. Its class definition is displayed in the description pane.
a. Add the instance variables startTime timeElapsedDisplay widgetManager timeWidgets label timeDisplay buttons startButton stopButton shell.
b. Add the pool dictionaries CwConstants CldtConstants.You have just defined a new class in DevelopStopwatch.
|