/************************************************************ * Name: * NetID: * Precept: * * Description: Client to create and animate an array of N * bouncing balls. * * Example: * $ java-introcs BouncingBalls 10 ************************************************************/ public class BouncingBalls { public static void main(String[] args) { // read number of bouncing balls from command-line int N = ___________________________ // Set window coordinates between -1 and +1 StdDraw.setXscale(-1.0, 1.0); StdDraw.setYscale(-1.0, 1.0); // create an array of N random balls Ball[] balls = _____________________ for (int i = 0; i < N; i++) balls[i] = ______________________ // do the animation loop while(true) { // gray background StdDraw.setPenColor(StdDraw.GRAY); StdDraw.filledSquare(0.0, 0.0, 1.0); // draw and move N black balls StdDraw.setPenColor(StdDraw.BLACK); for (int i = 0; i < ____; i++) { _____________________________________ _____________________________________ } StdDraw.show(20); } } }