Part 1:

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.)

Part 2:

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.

Part 3:

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.)

Academic Honesty!
It is not our intention to break the school's academic policy. Projects posted are only used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly fill out the form. Please provide a valid email address and we'll get back to you in less than 24 hours. We will be sending an invoice through PayPal upon confirmation. We are a non profit organization however we need an amount to keep this organization running, and to be able to complete our research and development.