Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Using the above example for the \"turtle class\" game that allows you to move a

ID: 3855284 • Letter: U

Question

Using the above example for the "turtle class" game that allows you to move a turtle around by issuing commands like stated above,

Modify the Turtle class so that it has the methods drawRectangle, drawHexagon, and drawPentagon. These methods should each be parametized. In order words, drawRectangle should be passed the width and height, and drawHexagon and drawPentagon should be passed the length of the sides. Each method should perform the action that their name suggests.

The assignment also requires that there be another method that "does anything that is interesting," so be creative! Thank you!

Explanation / Answer

public class turtle{ public static void main(String[] args){ World mars = new World(200,300); Turtle joe = new Turtle(mars); joe.forward(); }//end main }//end class

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote