import javax.swing.JComponent;
import java.awt.Color; 
import java.awt.Graphics; 

class Two extends JComponent {
  Shape[] shapes; 
  Two(int number) {
    this.shapes = new Shape[number];
    for (int i = 0; i < number; i = i + 1) {
      shapes[i] = new Circle(new Point( (int) (Math.random() * 400) , 
                                        (int) (Math.random() * 500)), 
                             (int) (Math.random() * 40 + 10), 
                             new Color( (float) Math.random(),
                                        (float) Math.random(),
                                        (float) Math.random() )); 
    }
  }
  public void paintComponent(Graphics g) {
    for (int i = 0; i < shapes.length; i = i + 1) {
      (shapes[i]).draw(g);  
    }
  }
}