import objectdraw.*;
import java.awt.*;

public class WhileTest extends WindowController {

// Constants
   private static final int WINDOW_SIZE = 500;
   private static final int CIRCLE_SIZE = 20;
   private static final int NUMBER_OF_CIRCLES = 5;

   public void begin() {
      int count;
      int x;
      int y;
      RandomIntGenerator generator;
      
      generator = new RandomIntGenerator(0, WINDOW_SIZE - CIRCLE_SIZE);
      count = 0;
      while (count < NUMBER_OF_CIRCLES) {
         x = generator.nextValue();
         y = generator.nextValue();
         new FilledOval(x, y, CIRCLE_SIZE, CIRCLE_SIZE, 
                        canvas).setColor(Color.red);
         count++;
      } // end while
   
   } // end begin
 
} // end class WhileTest


1)  Describe what the above program does?











import objectdraw.*;
import java.awt.*;

public class WhileTest2 extends WindowController {

// Constants
   private static final int WINDOW_SIZE = 500;
   private static final int GRASS_TOP = 300;
   private static final int GRASS_WIDTH = 3;
   private static final int NUMBER_OF_BLADES = 2000;
   private static final int MIN_GRASS_HEIGHT = 5;
   private static final int MAX_GRASS_HEIGHT = 15;
   

   public void begin() {
      int count, x, y, grassHeight;
      RandomIntGenerator xCoordGenerator;
      RandomIntGenerator yCoordGenerator;
      RandomIntGenerator grassHeightGenerator;
      
      yCoordGenerator = new RandomIntGenerator(GRASS_TOP, WINDOW_SIZE - MIN_GRASS_HEIGHT);
      xCoordGenerator = new RandomIntGenerator(0, WINDOW_SIZE - GRASS_WIDTH);
      grassHeightGenerator = new RandomIntGenerator(MIN_GRASS_HEIGHT, MAX_GRASS_HEIGHT);


      count = 


      while (                                      ) {


























      } // end while
      FilledRect building = new FilledRect(WINDOW_SIZE/2 - 100, GRASS_TOP-200, 200, 300,  

                                           canvas).setColor(Color.red);      
   } // end begin 

} // end class WhileTest2
2)  Complete the above program so that it draws 2000 randomly placed blades of grass on the lower portion of the window.



3)  What code would you include to put 15 windows arranged in 5 rows of 3 windows each on the building?