/**
 * A Pile of int values
 *
 * This implementation uses linked memory
 *
 * @version 1.0
 * @author  Prof. David Bernstein, James Madison University
 */
    public class Pile
   {
      private IntNode last;
   
    /**
     * Construct a new (empty) Pile
     */
       public Pile()
      {
         last  = null;
      }
   
   
   
   
   
   
       public IntNode getLast()
      {
         return last;
      }
   	
   
   
   
    /**
     * Push an int onto this Pile
     *
     * @param anInt   The int to push
     */
       public void push(int anInt)
      {
         IntNode temp;
      
         temp = new IntNode();
      
         temp.value = anInt;
         temp.next  = last;
      
         last = temp;
      }
   }
