Modify a text file: $/Ball.pde
$/Ball.pde
class Ball { //// A ball, displayed on screen if x>0. int x,y,r; // Position and size of this ball. int dx=3; int dy=2; color c= color(255,0,0);; boolean visible=false; //// METHODS() //// void create() { //// Create a ball. visble= true; x= 0; y= (int) random(height); } void destroy() { //// Make the ball vanish. visble= false; } void show() { //// Show the ball, only if it is visible. if (visible) { //++++ ADD YOUR CODE HERE ++++ } } void move() { //// Move the ball. Bounce off walls. //++++ ADD YOUR CODE HERE ++++ }