Question: Using turtle graphics and recursion, Write a method turtleSpiral(Turtle t, double size, double minSize) that draws squared spirals like the one in the figure. The

 Using turtle graphics and recursion, Write a method turtleSpiral(Turtle t, doublesize, double minSize) that draws squared spirals like the one in the

Using turtle graphics and recursion, Write a method turtleSpiral(Turtle t, double size, double minSize) that draws squared spirals like the one in the figure. The spiral starts from the outside (the longest side) and ends with the shortest side. The longest side has length equal to size, and each following side is 10% shorter than the previous one. The length of the shortest side is no shorter than minsize. Then write the same method again, but using iteration instead of recursion Ca this method turtleSpiralIter (Turtle t, double size, double minSize). Make sure the two methods draw exactly the same spirals in all the cases. Take this opportunity to reflect about similarities and differences between iteration and recursion

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!