Code /* TestStack1.cpp CIS 250 David Klick Test program for stack class. */ #include "stack.h" #include using std::cout; using std::endl; int main(void) { int i=0, n; stack s(5); cout << "Filling stack with 0, 5, 10, ...\n"; while (!s.isFull()) { if (!s.push(i*5)) cout << "Failed to push " << (i*5) << '\n'; else cout << "Pushed " << (i*5) << " onto stack\n"; i++; } cout << "Displaying stack\n"; while (!s.isEmpty()) { s.pop(n); cout << n << '\n'; } return 0; }