Content deleted Content added
Fixing formatting defects |
moved a useful (but not defining) sentence from top of leader to end of leader |
||
Line 1:
'''Encapsulation''' is the concealment of implementation: the normal position of the barrier is closed
In programming languages, <!-- [[object-oriented programming language]]--> <!-- and related fields, like [[OODMBS]],--> encapsulation is used to refer to one of two related but distinct notions, and sometimes to the combination<ref>Michael Lee Scott, ''Programming language pragmatics'', Edition 2, Morgan Kaufmann, 2006, ISBN 0-12-633951-1, p. 481: "Encapsulation mechanisms enable the programme<sup></sup>r to group data and the subroutines that operate on them together in one place, and to hide irrelevant details from the users of an abstraction."</ref><ref name=Dale>Nell B. Dale, Chip Weems, ''Programming and problem solving with Java'', Edition 2, Jones & Bartlett Publishers, 2007, ISBN 0-7637-3402-0, p. 396</ref> thereof:
Line 9:
The second definition is motivated by the fact that in many OOP languages hiding of components is not automatic or can be overridden; thus, [[information hiding]] is defined as a separate notion by those who prefer the second definition.<!-- this is based on all the refs given above, so no inline cite here-->
The features of encapsulation are supported using classes in most object-oriented programming languages, although other alternatives also exist.
== As information hiding mechanism ==
|