next up previous contents index
Next: 8.2 Transformation Strategies Up: 8.1 Java Code Design Previous: 8.1.3 Members of Model   Contents   Index

8.1.4 Default Textual Interface

The main function of a model class provides a default textual interface. The user inputs events to the model from this interface, and every time the current states of the model are changed, the new states are displayed as a list between square brackets before the ``$>$'' prompt.

Figure 8.2: An example of the default textual interface of the Java code synthesized by SCC
Image textualjavainterface

Figure 8.2 shows this default textual interface. It is started by executing the class of the main model in the JVM (Java Virtual Machine). For each model or submodel, this textual interface is defined in a main function. By default, JVM starts the main function of the main model. The main functions of submodel classes, if necessary, can be invoked by user-defined classes.

The user may reuse the Java code of a model with a customized interface instead of the default textual interface. This is discussed in section 8.5.


next up previous contents index
Next: 8.2 Transformation Strategies Up: 8.1 Java Code Design Previous: 8.1.3 Members of Model   Contents   Index
Thomas Huining Feng 2004-04-28