Incrementing the Radius

Classic programmed-learning exercises, refreshed for modern Java and presented in the current MrStyner.com portfolio style.

Modern Java noteThis archive has been refreshed for Java 25 LTS. Core language concepts remain useful, while outdated setup instructions and browser-era Java are labeled or replaced. Java 26 is the current feature release; Java 25 is used here as the stable teaching baseline.
Historical topic: Java appletsModern web browsers do not run Java applets. The Applet API was deprecated for removal before Java 25 and was removed in Java 26. Treat applet examples on this page as historical object-oriented/GUI examples; for new desktop interfaces use Swing where appropriate or JavaFX/OpenJFX.

Answer:

Sounds like a counting loop to me.

Incrementing the Radius

Here is (yet another) test applet:

// assume that the drawing area is 200 by 200
public class TestCircle10 extends JApplet
{
  Circle circ = new Circle();
  
  public void paint ( Graphics gr )
  { 
    circ.setPosition( 100, 100 );

    int count = 1;
    while ( count <= 10 )
    {
      circ.setRadius(   );
      circ.draw( gr );
      count = count + 1;
    }
  }
}

The loop will execute the loop body ten times. The setRadius() method will be used to change to a new radius each time.

QUESTION 11:

Fill in the blank with something reasonable.