Answer to Exercises - Animation
  1. Write a stopwatch program. You should provide the possibility of starting, stopping, suspending, and resuming.

    E1.java

  2. Write an applet that races four objects in a straight line from a start line to a finish line. In the applet below click on "Reset" then on "Start".

    E2.java    Race1.java

  3. Write an applet that simulates the motion of gas particles in two adjacent chambers, separated by a slit, where the temperature of each is different. In the applet below click a few times in different locations to lay down some particles. Then click "Start". Set the temperatures in the textfields.

    E3.java