Object Encapsulation
From CSSEMediaWiki
(Difference between revisions)
m (Reverted edits by Ebybymic (Talk); changed back to last version by Matthew Harward) |
|||
(One intermediate revision by one user not shown) | |||
Line 6: | Line 6: | ||
This technique is in contrast to other forms of [[Encapsulation]], the most well known and used being [[Class Encapsulation]]. | This technique is in contrast to other forms of [[Encapsulation]], the most well known and used being [[Class Encapsulation]]. | ||
− | + | ==Usage== | |
Object encapsulation is the encapsulation method in [[Smalltalk]]. | Object encapsulation is the encapsulation method in [[Smalltalk]]. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
==See Also== | ==See Also== |
Latest revision as of 03:22, 25 November 2010
Object Encapsulation is a form of Encapsulation where an object only has access to data stored within itself. This means that:
- Objects do not have access to data in other instances of the same class.
- Objects do have access to the data of any underlying superclass.
- Objects do not have access to data in any other object, unless provided through a method call.
This technique is in contrast to other forms of Encapsulation, the most well known and used being Class Encapsulation.
Usage
Object encapsulation is the encapsulation method in Smalltalk.