Class StackE

java.lang.Object
  extended by StackE

public class StackE
extends java.lang.Object

Provides a Stack object for storing ints

Version:
Option D
Author:
Philip Howard

Constructor Summary
StackE()
          Creates a new, empty Stack object.
 
Method Summary
 boolean isEmpty()
          returns true if the stack is Empty
 boolean isFull()
          returns true if the stack is Full
 int pop()
          pop a value of the stack
 void push(int val)
          push an int onto the stack
 
Methods inherited from class
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StackE

public StackE()
Creates a new, empty Stack object. This stack can hold 4 numbers.

Method Detail

isEmpty

public boolean isEmpty()
returns true if the stack is Empty

Returns:
true if the stack is Empty

isFull

public boolean isFull()
returns true if the stack is Full

Returns:
true if the stack is Full

pop

public int pop()
pop a value of the stack

Returns:
the value popped off the stack

push

public void push(int val)
push an int onto the stack

Parameters:
val - value to be pushed onto the stack