/************************************************************ * Name: * NetID: * Precept: * * Description: Client to create and animate an array of N * bouncing balls. ************************************************************/ public class BouncingBalls { public static void main(String[] args) { // number of bouncing balls from command-line argument int N = ________________________________________(args[0]); // 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); } } } /********************************************************************* Recommended Book Exercises: 3.2.5, 3.2.11 (Point.java code on Booksite) *********************************************************************/