Concurrent Programming with Java
Lab Manual, Version 1.0, F. Astha Ekadiyanto, 2002.

[Contents] [Next] [Previous]

Lab 4: Introduction to Threads


Challenges

Simple Challenge

By now, your VisualMobileSystem Applet should work similar as planned.
If you have been so successful so far, let us make a little difficult problem for you.

Try to Click and/or Drag your mouse over the shapes for a couple of time and see what happened.
As usual, if it does not work, try to download the JAR File and run from command line ( java -jar lab4C.jar )

ALT="Your browser understands the <APPLET> tag but isn't running the applet, for some reason." Your browser is ignoring the <APPLET> tag!

 

The responsive MobileStation ("Yes,....where should I go?")

Now, rather than creating many MobileStation and set their mobility Path, we will just play the only existing one. We can set its mobility Path and alter it as much as we want (while the Mobile Station is actually moving). Try to modify your code so that this could happened. Think of the solution as if you will later play with more than one MobileStation, and you can choose and change each MobileStation's mobility Path and all the MobileStations will response immediately.

Hint: There are many ways to solve the problem. Among them are:

Advanced Challenge

This Challenge may consume a lot of your time. If you have successfully solved the Simple Challenge, this may be your true Challenge.
Try to do it only in your spare time.

The MobileStation "Game"

Description

ALT="Your browser understands the <APPLET> tag but isn't running the applet, for some reason." Your browser is ignoring the <APPLET> tag!

 


[Contents] [Next] [Previous]