Skip to main content

Encapsulation and Information Hiding


  • Data can be encapsulated such that it is invisible to the “outside world”.
  • Data can only be accessed via methods.


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


Comments

Post a Comment