| Name | Modified | Size | Downloads / Week |
|---|---|---|---|
| Parent folder | |||
| ConfigDialog.java | 2023-02-20 | 13.5 kB | |
| README.txt | 2023-02-20 | 610 Bytes | |
| Traffic.java | 2023-02-20 | 8.2 kB | |
| Vehicle.java | 2023-02-20 | 10.0 kB | |
| Makefile | 2023-02-20 | 8.1 kB | |
| manifest.txt | 2023-02-20 | 53 Bytes | |
| Stoplight.sm | 2023-02-20 | 3.4 kB | |
| Traffic.sh | 2023-02-20 | 950 Bytes | |
| TrafficCanvas.java | 2023-02-20 | 26.2 kB | |
| Vehicle.sm | 2023-02-20 | 2.3 kB | |
| Stoplight.java | 2023-02-20 | 20.1 kB | |
| Totals: 11 Items | 93.3 kB | 0 | |
Java Example 4
Simplistic, graphical simulation of a stoplight. Demonstrates
how to use state machines to handle external events (in this case
timeouts).
+ Building
----------
NOTE: Smc.jar must be built and installed.
Unix & Windows:
$ make Traffic
+ Executing
-----------
Unix & Windows:
$ java -jar Traffic.jar
Click on the "Configure..." button and modify the demo's
settings. Increase the vehicle speed and appearance
rate. Decrease the stoplight times.
Also, click on "Pause" and "Continue". "Stop" halts the
demonstration but does not terminate the demo.