// stack.h -- new class declaration

// stack.h -- class declaration for the stack ADT
typedef unsigned long Item;

class Stack
{
private:
    enum {MAX = 10};      // constant specific to class
    Item  * pitems;       // holds stack items
    int size;             // number of elements in stack
    int top;              // index for top stack item
public:
    Stack(int n = 10);    // creates stack with n elements
    Stack(const Stack & st);
    ~Stack();
    bool isempty() const;
    bool isfull() const;
    // push() returns False if stack already is full, True otherwise
    bool push(const Item & item); // add item to stack
    // pop() returns False if stack already is empty, True otherwise
    bool pop(Item & item);  // pop top into item
    Stack operator=(const Stack & st);
};
