//Tina Ostrander
//CSCI 143 -- Singly Linked Lists


//Stack implementation:  LIFO

public class Stack
{
	private List stack;

	public Stack()
	{
		stack = new List();
	}

	//Add data to the stack
	public void push (int insertNum)
	{
		stack.insertAtFront (insertNum);
	}

	//Remove data from the stack
	public int pop()
	{
		return stack.removeFromFront();
	}

	//Determine whether stack is empty
	public boolean isEmpty()
	{
		return stack.isEmpty();
	}

	//Print the contents of the stack
	public void print()
	{
		stack.print();
	}
}

//See notes at the end of Queue.java