In the ZigZagTurtle class, defined in Section 7.2, change the type of the argument in the forward method from double to float. The start of the method should look like this:
public void forward(float distance){
Re-compile and run the main method and notice that the output has changed. Explain how it has changed and why
Change the ZigZagTurtle class to include two parameterized constructors. The first constructor should initialize only the size of the zigzag. The second constructor should initialize both the size and the drawing colour. Make sure both of the new constructors work by writing an appropriate main method.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here