... [image goes here] ....
When the mouse is clicked INSIDE the button, re-start all three balls at the left side, EACH one with a random height and random velocities (dx and dy). Also, respond as follows when a key is pressed:
Display a (rectangular) button. The first time this button is clicked, change the table to another color; if it is clicked again, change table back to original color. (Original color, if clicked an even number of times; otherwise, use the new color.)
Each instance of a Ball should be named with the color (red, green, blue) followed by your own Last name. (You may shorten your name to four or more letters, if you wish.) If your Last name is "Smith" (or "Smithinghamsky.) then the instances should be named:
// Button coordinates: x,y // Button shape: 1 for circle, 2 for rectangle, 3 for triangle, etc. // Button dimensions: width & height for rectangle, etc. // Button color. // Button text. // Other properties, as necessary.
. . .
Also, create an array of 5 (or more) Button objects, each with different properties.
// If you name is "John Smith" they your declarations might look something like this: Ball[] smith= new Ball[10]; Button[] john= new Button[5];