Quote:
|
Hiding code away within black box is exactly what object orientation is all about.
|
I disagree. Object orientation is about building things as objects. The encapsulation may be used to protect parts of the object from unintended use, if one wants to call that hiding. Don't attach a spring to the butterfly valve in my carburetor in order to make a gauge showing how much the accelerator is depressed. Find another way or ask me to expose something suitable. Similarly, enclosing a carburetor in a spherical rubber case is a silly, though perhaps interesting, way to make a basketball.