Encapsulation and Information Hiding
• Data can be encapsulated such that it is invisible to the "outside
world".
• Data can only be accessed via methods.
Encapsulation and Information Hiding, cont.
• What the "outside world" cannot see it cannot depend on!
• The object is a "fire-wall" between the object and the "outside
world".
• The hidden data and methods can be changed without affecting
the "outside world".
0 Comments