posted 19 years ago
I use the term "information hiding" in an OOP context to refer to the fact that many details of a class are "hidden", namely:
- private attributes
- private methods
- and, even for public methods, the implement of HOW the method works is, in a sense, private
Think of the term "information hiding" as meaning "hiding details about the inner workings of a class (of objects)".
I use the term "encapsulation" in an OOP context to refer to the fact that everything an object needs in order to fulfill its mission in an application is, in theory, encapsulated within the object, as either a piece of data (attribute), reference to another object that it can turn to for collaborative help (attribute), or as a method. However, we also know that by linking together objects at run time, we can empower them to do much more than any one object can do on its own, just like the employees in a corporation, or the cells in your body, or ants in an anthill, can accomplish more collectively than on their own.
I hope this helps!
Jacquie