Part 2

In this part of the lab, will will make the game a little more interesting. The applet below will demonstrate what's required. You should experiment with the demonstration to make sure you understand exactly what we have in mind Here's a description:
  1. Instead of two ball, there should be three balls.
  2. The dragged ball can bump into both of the two other balls at the same time.
  3. It is possible to have a "chain reaction" among the balls. That is, the dragged ball can bump into the second ball, which in turn can bump into the third ball, creaing a "chain reaction".

We will let you figure out most of the details of how to add the features for the more advanced versions.




Grading guidelines

You only need to turn in the three ball version of your program. However, if you fail to complete the three ball version, hand in the two ball version for partial credit.

As with last week's lab, your grade will have components based on style and on correctness. Please note that each week we will likely be adding new style guidelines that we will be looking for in your programs.

Grading Point Allocations

Value

Feature
Style, Design, and Efficiency (10 pts total)
2 pts. appropriate comments
2 pts. good variable names
2 pts. named constants
2 pts. appropriate formatting
2 pts. creates only one random number generator
Correctness (10 pts)
2 pts. draw the balls correctly
2 pts. assign random colors to the balls
2 pts. can drag a ball and bump it into another ball
4 pts. have the correct interaction among three balls