Question: import java.awt.Color; import java.util.Scanner; public class Question1 { public static void drawAxes(Turtle turtle) { // method to draw Axes // set the pen colour to
import java.awt.Color;
import java.util.Scanner;
public class Question1
{
public static void drawAxes(Turtle turtle) {
// method to draw Axes
// set the pen colour to gray, when done set it back to its initial colour
}
public static void drawTriangle(Turtle turtle, int sideLength) {
// statements to draw an equilateral triangle given a side length,
// and a turtle (assume the turtle is positioned as per the lab instructions (pdf)
// before being passed to this method
// good idea to turn pen on before drawing, and off after drawing
}
public static void drawSquare(Turtle turtle, int sideLength) {
// statements to draw a Square of given side length
// similar to drawTriangle
// no loops needed for this question 1 (again assume initial properties
// of the turtle are already set in the main method before this method is
// called
}
public static void main(String[] args)
{
// statements here for practicing with Turtle commands (comment out later)
// statements here for calling each of the three methods for the lab
}
}



uestion01 (turtle basics and drawing shapes In Question01.java, you will write several methods that will use turtle graphics to draw three simple vector graphics. a) Before beginning this task, please experiment with basic turtle commands by creating a turtle in themain() method and directing the turtle to move, draw and change colour (see Appendix). When done experimenting, comment out any practice statements you have created and begin this task. In this task you are asked to 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, and when invoked from the main method, should result in the following: Standard Draw File Fig. 1 uestion01 (turtle basics and drawing shapes In Question01.java, you will write several methods that will use turtle graphics to draw three simple vector graphics. a) Before beginning this task, please experiment with basic turtle commands by creating a turtle in themain() method and directing the turtle to move, draw and change colour (see Appendix). When done experimenting, comment out any practice statements you have created and begin this task. In this task you are asked to 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, and when invoked from the main method, should result in the following: Standard Draw File Fig. 1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
