## 19.1 Handling Exceptional Situations - Example

Consider a container class (chptr. 16), and programmers P1 and P2:

- P1 develops a stack that P2 will use
- P2 is ignorant of the implementation details, needs only the interface:

  >     Stack s;
  >     s.push(3.14);
  >     s.push(1.41);
  >     s.push(2.76);
  >     while (s.size() > 0)
  >     {
  >        cout << s.top() << "\n";
  >        s.pop();
  >     }

prev |top |next