The local-view principle: Whenever related program elements are located close to one another on your screen, you can see at a glance how those program elements work together. Whenever related program elements cannot be made to appear on the same screen, you have extra difficulty understanding what is going on.
In the program shown in Segment 239, for example, the box
volume function definition appears within a few lines of the declarations
of the height
, width
, and length
member variables.