// StackInheritance.java
// Derived from class List.
package chapter35;

public class StackInheritance extends List
{
   // no-argument constructor
   public StackInheritance()
   {
      super( "stack" );
   } // end StackInheritance no-argument constructor

   // Method push calls inherited method insertAtFront to add object to stack
   public void push( Object object )
   {
      insertAtFront( object );
   } // end method push

   // Method pop calls inherited method removeFromFront to remove object from stack
   public Object pop()
   {
      return removeFromFront();
   } // end method pop
} // end class StackInheritance
