#include "stack.h" template Stack::Stack(int n) { array = new T[size = n]; top = -1; } template Stack::~Stack() { delete [] array; } template void Stack::push(T item) { array[++top] = item; } template void Stack::pop() { if (!is_empty()) top--; } template T Stack::peek() { if (!is_empty()) return array[top]; else return Person(); } template bool Stack::is_empty() { return top == -1; }