Making your own applications : Creating subapplications : Example: Creating the subapplication DevelopStopwatch : Defining the subclass Stopwatch

Defining the subclass Stopwatch
To create the defined class Stopwatch, which will contain methods that create the interface and calculate elapsed time, you do the following:
1.
2.
From the Classes menu of the Application Browser, select Object.
3.
From the Classes menu, select Add > Subclass.
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.
6.
a.
Add the instance variables startTime timeElapsedDisplay widgetManager timeWidgets label timeDisplay buttons startButton stopButton shell.
b.
Add the pool dictionaries CwConstants CldtConstants.
7.
You have just defined a new class in DevelopStopwatch.