//Header File:    stack.h
#ifndef    STACK_H
#define    STACK_H


//        INTERFACE
template <class T> class stack
{
private:
    int top;
    T s[100];

public:
    stack ();
    void push(const T);
    T pop();
    bool empty() const;
    bool full() const;
};

//	IMPLEMENTATION
template <class T> stack<T>::stack()
{
    top=-1;
}

template <class T> void stack<T>::push(const T item)
{
    top++;
    s[top] = item;
}

template <class T> T stack<T>::pop()
{
    return (s[top--]);
}

template <class T> bool stack<T>::empty() const
{
    return (top==-1);
}

template <class T> bool stack<T>::full() const
{
    return (top==99);
}
#endif
