Class ShapeStack

java.lang.Object
  |
  +--ShapeList
        |
        +--ShapeStack

public class ShapeStack
extends ShapeList


Constructor Summary
ShapeStack()
          ShapeStack contructor
 
Method Summary
 boolean isEmpty()
          Is the stack empty?
 boolean isFull()
          Is the stack full?
 Shape pop()
          Remove a shape at back
 void printStack(java.awt.Frame f)
          Print the list
 void push(Shape o)
          Insert a shape at back
 
Methods inherited from class ShapeList
getHead, insertBack, insertFront, printList, removeBack, removeFront
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ShapeStack

public ShapeStack()
ShapeStack contructor

Method Detail

push

public void push(Shape o)
Insert a shape at back

Parameters:
o - shape to insert

pop

public Shape pop()
Remove a shape at back

Returns:
shape to remove

isEmpty

public boolean isEmpty()
Is the stack empty?

Overrides:
isEmpty in class ShapeList
Returns:
true if stack is empty false in other case

isFull

public boolean isFull()
Is the stack full?

Overrides:
isFull in class ShapeList
Returns:
true if stack is full false in other case

printStack

public void printStack(java.awt.Frame f)
Print the list