Class Plotter

java.lang.Object
  extended byTurtle
      extended byPlotter

public class Plotter
extends Turtle


Constructor Summary
Plotter()
           
 
Method Summary
 void done()
          Most of the Turtle routines count as a single step of the program.
 void lt(double angle)
          Make a left turn.
 void move(double distance)
          Ask the turtle to move forward the specified distance along its current heading.
 void plot(double x, double y)
           
 void rt(double angle)
          Make a right turn.
 
Methods inherited from class Turtle
die, getColor, isAlive, isPenDown, lt, move, penDown, penUp, rt, setColor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Plotter

public Plotter()
Method Detail

done

public void done()
Description copied from class: Turtle
Most of the Turtle routines count as a single step of the program. So, after they run, they stop the controller; the timer running in Turtles will restart the controller when it's time for the next step. The method done() is called whenever you want to end a step of the turtle's motion. By default, it is called after any method that changes the state of the turtle (color, pen, location, heading).

Overrides:
done in class Turtle

lt

public void lt(double angle)
Description copied from class: Turtle
Make a left turn. See the warning on @see{rt(double angle)}.

Overrides:
lt in class Turtle
Parameters:
angle - How far to turn, in degrees.

move

public void move(double distance)
Description copied from class: Turtle
Ask the turtle to move forward the specified distance along its current heading. This will draw a trail if the pen is down.

Overrides:
move in class Turtle
Parameters:
distance - How long a line to draw.

plot

public void plot(double x,
                 double y)

rt

public void rt(double angle)
Description copied from class: Turtle
Make a right turn. Note that the turn angle is a double, a decimal number. Be careful of integer vs. double errors when using this: rt(360 / 16) will turn 22°, not 22.5. So, you should instead say rt(360. / 16.).

Overrides:
rt in class Turtle
Parameters:
angle - How far to turn, in degrees.