#ifndef STACK
#define STACK

#include <iostream>
using std::ostream;

class StackNode {
  friend class Stack;
  
  public:
    StackNode(char);
    
  private:
    char data;
    StackNode* next;
};

class Stack {
  friend ostream& operator <<(ostream &os, Stack &obj);
  
  public:
    Stack();
    Stack(const Stack&);
    ~Stack();
    void push(char c);
    char pop();
    char top();
    bool isEmpty();
    const Stack &operator=(const Stack &rhs);
    
  private:
    StackNode* head;
};

#endif

