Question: Create a method called drawAxes() that will position the turtle at (0,0) in the world coordinates, and will draw a set of axes in the

Create a method called drawAxes() that will position the turtle at (0,0) in the world coordinates, and will draw a set of axes in the colour gray, that extend from (-x,+x,-y,+y) = (-200,200,-200,200). The method should not return any output to the console

Then, create methods drawTriangle(Turtle turtle, int sideLength) and drawSquare(Turtle turtle, int sideLength) that use turtle graphics to draw "an equilateral triangle" and "a square" in the StdDraw window.

code:

public class Question1{

public static void drawAxes(Turtle turtle) {

}

public static void drawTriangle(Turtle turtle, int sideLength) {

}

public static void drawSquare(Turtle turtle, int sideLength) {

}

public static void main(String[] args)

{

}

}

Create a method called drawAxes() that will position the turtle at (0,0)

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!