© James E. McDonough 2017

James E. McDonough, Object-Oriented Design with ABAP, 10.1007/978-1-4842-2838-8_3

3. Encapsulation

James E. McDonough

(1)Pennington, New Jersey, USA

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

Get Object-Oriented Design with ABAP: A Practical Approach now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.