Class Encapsulation
From CSSEMediaWiki
(Difference between revisions)
(New page: Class Encapsulation is the most commonly used form of Encapsulation in modern programming languages. Objects are encapsulated by their underlying objects. This means that: * Objects ca...) |
m (Reverted edits by Ebybymic (Talk); changed back to last version by Aidan Bebbington) |
||
(3 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
Class Encapsulation is the most commonly used form of [[Encapsulation]] in modern programming languages. Objects are encapsulated by their underlying objects. This means that: | Class Encapsulation is the most commonly used form of [[Encapsulation]] in modern programming languages. Objects are encapsulated by their underlying objects. This means that: | ||
* Objects can see/modify the contents of any other objects that are instances of the same class. | * Objects can see/modify the contents of any other objects that are instances of the same class. | ||
− | * Objects | + | * Objects cannot necessarily see/modify the contents of their superclass (this is language specific; for example it can be allowed in Java by using protected access) |
* Objects cannot see/modify the contents of any other objects. | * Objects cannot see/modify the contents of any other objects. | ||
Line 13: | Line 13: | ||
* [[Encapsulation boundary]] | * [[Encapsulation boundary]] | ||
* [[Object Encapsulation]] | * [[Object Encapsulation]] | ||
+ | |||
+ | |||
+ | [[Category: Nomenclature]] |
Latest revision as of 03:23, 25 November 2010
Class Encapsulation is the most commonly used form of Encapsulation in modern programming languages. Objects are encapsulated by their underlying objects. This means that:
- Objects can see/modify the contents of any other objects that are instances of the same class.
- Objects cannot necessarily see/modify the contents of their superclass (this is language specific; for example it can be allowed in Java by using protected access)
- Objects cannot see/modify the contents of any other objects.
This type of Encapsulation exists in contrast to Object Encapsulation.
Usage
This, or a modified form of, is the encapsulation technique of languages such as C++, C#, Java and Python.