A good answer might be:

With ten calls to drawOval(). Or, better yet, with a call to drawOval() inside of a loop body that is iterated 10 times.

Start with the Loop

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 = _________________;

    while ( _________________ )
    {


      _________________
    }

  }
}

Let us write the program by using a loop. Remember, it is often a good idea to think about what you are doing one piece at a time. When there is a loop in a program, it it often helpful to start with it. Here is a skeleton of the program:

This skeleton has most of what is needed. It has:

This is quite a bit to start with, and should not be ignored.


QUESTION 10:

Fill in the blanks so the loop is correct for a program that is to draw a row of ten circles.