
#include "tllist.h"

template <class itemStackType>
class Stack : protected LinkedList <itemStackType> {

 public:
  Stack () { }
  Stack (const Stack& S) { }
  ~Stack () { }

  bool Push (itemStackType newItem)
    {
      return Insert (newItem, 1);
    }

  bool Pop (itemStackType& item)
    {
      return Delete (item, 1);
    }

  bool Top (itemStackType& item)
    {
      return Retrieve (item, 1);
    }

  bool isEmpty ()
    {
      return Length () == 0 ? true : false;
    }

};


