Write an applet that bounces a ball inside its graphics area. The ball must start in a random location, move in a random direction, and must bounce when it reaches the edge of the graphics area. (This does not require threads.)
Write a second applet that bounces multiple balls; the number is specified by a parameter in the HTML file. Assign different colors to different balls (you can have 10 unique colors and re-use colours after that). The balls can move independently, passing through each other. Each should have its own thread.
Write a third applet, this time with code so that the balls bounce off each other. A collision will occur between two balls when the distance between their centres is less than the sum of their radii. (Note that this will require synchronization between threads.)