We start our journey to Objectropolis from the perspective of Encapsulation, largely because this is the object-oriented design concept with which most procedural programmers already are familiar. The word encapsulate means “to encase in or as if in a capsule.”1 Procedural programmers have been doing this for years via subroutines and locally-defined variables.
To illustrate this concept, let’s establish a familiar frame of reference for encapsulation. Suppose we write a procedural program like any one of thousands you might find in your own programming environment. It might ...