EX 7.6. Write a method called drawCircle that draws a circle based on the method’s
parameters: a Graphics object through which to draw the circle, two integer
values representing the (x, y) coordinates of the center of the circle, another
integer that represents the circle’s radius, and a Color object that defines the
EX 7.7. Overload the drawCircle method of Exercise 7.6 such that if the Color parameter
is not provided, the circle’s color will default to black.
public void drawCircle(Graphics page, int x, int y,
EX 7.8. Overload the drawCircle method of Exercise 7.6 such that if the radius is not
provided, a random radius in the range 10 to 100 (inclusive) will be used.
public void drawCircle(Graphics page, int x, int y,
EX 7.9. Overload the drawCircle method of Exercise 7.6 such that if both the color and
the radius of the circle are not provided, the color will default to red and the radius
will default to 40.
EX 7.10. Discuss the manner in which Java passes parameters to a method. Is this
technique consistent between primitive types and objects? Explain.