The stack is the first module of the calculator that we will design and implement. While we defined the module’s public interface in Chapter 2, we said very little about its implementation. We now need to decompose the stack into the functions and classes that provide the module’s functionality. Hence, this is where we begin. If you’re a little rusty on the mechanics of the stack data structure, now would be a great time to consult your favorite data structures and algorithms book. My personal favorite is the one by Cormen et al. [10].
3.1 Decomposition of the Stack Module
The first question to ask ...