//stackt.inl //methods for class Stack template implemented using array #include #define BOS -1 template Stack::Stack() { top = BOS; } template void Stack::push(Type x) { if (isfull()) throw "overflow"; val[++top] = x; } template Type Stack::pop() { if (isempty()) throw "underflow"; return val[top--]; } template Type Stack::topval() { if (isempty()) throw "underflow"; return val[top]; } template int Stack::isempty() { return top == BOS; } template int Stack::isfull() { return top == TOS-1; } template void Stack::print() { int i; for (i = top; i >= 0; i--) cout<