Question: Write a Java Program to Draw the nested Circles SAMPLE CODE public static String nestedCircle (double x, double y, double radius, double diff, Draw page,
Write a Java Program to Draw the nested Circles

SAMPLE CODE
public static String nestedCircle (double x, double y, double radius, double diff, Draw page, String radiusList) { // your code goes here. Task 1 return ""; }
Task 1: warm-up To start, you are required to implement the method called nestedCircle () recursively, which gets 6 input parameters and return a string. This method keeps drawing circles with the same center and different radius until the radius gets negative. The output of the method is a list of all the circles' radius from the most outer to the most inner one. Please see the javaDoc of this method for more information. Sample Call: PE1.nestedCircle (0.5, 0.5, 0.4, 0.05, blankCanvas, "") Corresponding Output: [0.4, 0.35, 0.3, 0.25, 0.2, 0.15, 0.1, 0.05, 0.0]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
