Due date: See Oncourse Modules or Assignments
60 points
Revised 2013 Jan 31
while and for statements.while statement: Chapter 5.for statement: Chapter 6.Design, write, and test two programs, each of which draws one hundred random circles. One program should use a while statement; the other, a for statement.
The circles should be placed at random locations, with random diameters and colors. Each circle should use two random colors: one for the fill (interior), and one for the stroke (circumference).
Each circle must fit entirely within the drawing window; however, circles may overlap.
paintComponent method to draw on a panel, as in the Bullseye and Boxes examples (Lewis and Loftus, Listings 6.5–6.8).fillArc to color the interior of the circle, and drawArc to stroke the edge. See Lewis and Loftus, Figure 2.12. Remember that both of these methods describe the arc in terms of an enclosing rectangle. Fill before stroking — it looks better that way.for statement and the other uses a while statement.Through Oncourse Assignments, turn in the source code files for both versions (while and for) and two screenshots of the random circle drawings.
for loopwhile loop60 points total