A good answer might be:

An answer is given below.

Loop Options

import java.applet.Applet;
import java.awt.*;

// assume that the drawing area is 300 by 150
public class tenCircles extends Applet
{
  final int width = 300, height = 150;

  public void paint ( Graphics gr )
  { 
    int count = 0;

    while ( count < 10 )
    {


      count = count + 1;
    }

  }
}

All that you need is for the loop to iterate 10 times. Each iteration will (when we get to that part) draw one red circle. There are many ways you could have filled in the blanks so that the loop iterated 10 times, but usually it is best to have a counter that goes from 1 to 10, or from 0 to 9.

Sometimes the aritmetic is easier if the loop goes from 0 to 9, so that is what I chose here.

Now that the "infrastructure" is in place, let us focus on drawing the circles. The idea is to draw 10 circles in a row, nicely spaced out across the screen.

QUESTION 11:

The applet's drawing area is 300 pixels wide. If there are to be 10 circles, how wide is the area which will be used for each circle?