© Adam Singer 2022
A. B. SingerPractical C++ Designhttps://doi.org/10.1007/978-1-4842-7407-1_3

3. The Stack

Adam B. Singer1  
(1)
The Woodlands, TX, USA
 

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 ...

Get Practical C++ Design: From Programming to Architecture now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.