Encapsulation (computer programming): Difference between revisions

Content deleted Content added
Undid revision 1273872865 by 2.188.26.192 (talk) unattributed copying from https://doi.org/10.22037/afb.v10i2.41131
RussBot (talk | contribs)
m Robot: Editing intentional link to disambiguation page in hatnote per WP:INTDABLINK (explanation)
 
(3 intermediate revisions by 3 users not shown)
Line 1:
{{Short description|Bundling of data}}
{{Other uses|Encapsulation (disambiguation){{!}}Encapsulation}}
In software systems, '''encapsulation''' refers to the bundling of data with the mechanisms or methods that operate on the data. It may also refer to the limiting of direct access to some of that data, such as an object's components.<ref name="Rogers01" /> Essentially, encapsulation prevents external code from being concerned with the internal workings of an object.
 
Line 20 ⟶ 21:
The features of encapsulation are supported using [[class (computer programming)|class]]es in most object-oriented languages, although other alternatives also exist.
 
Encapsulation may also refer to containing a repetitive or complex process in a single unit to be invoked. Object-oriented programming facilitate this at both the method and class levels. This definition is also applicable to [[procedural programming]].<ref>{{Cite book |last=McDonough |first=James E. |title=Object-Oriented Design with ABAP: A Practical Approach |date=2017 |publisher=[[Apress]] |year=2017 |isbn=978-1-4842-2837-1 |___location= |chapter=Encapsulation |doi=10.1007/978-1-4842-2838-8 |via=[[O'Reilly Media|O'Reilly]]}}</ref>
 
=== Encapsulation and inheritance ===