COMP 1672, Spring 2012

Assignment 4 - Part 1

Create a new type of Turtle called a StackTurtle by creating a StackTurtle class. The StackTurtle class should extend the Turtle class. Each StackTurtle maintains a Stack of geometric point locations (each location is a x-coordinate and y-coordinate pair). In addition to appropriate instance variables and constructors, the StackTurtle class should contain the following methods: Now create a command method for StackTurtle (similar to the one in Turtle) with the following additions: Write a main method to test the StackTurtle class.