Object-oriented programming: Difference between revisions

Content deleted Content added
m Removing link(s) Wikipedia:Articles for deletion/The Third Manifesto closed as soft delete (XFDcloser)
top: reworded slightly and fixed link
Tags: Mobile edit Mobile app edit Android app edit
Line 186:
Data Abstraction is a design pattern in which data are visible only to semantically related functions, so as to prevent misuse. The success of data abstraction leads to frequent incorporation of [[Information hiding|data hiding]] as a design principle in object oriented and pure functional programming.
 
If a class does not allow calling code to access internal object data and permits access through methods only, this is a strong form of abstraction or information hiding known as [[abstractionAbstraction (object-orientedcomputer programmingscience)|abstraction]]. Some languages (Java, for example) let classes enforce access restrictions explicitly, for example denoting internal data with the <code>private</code> keyword and designating methods intended for use by code outside the class with the <code>public</code> keyword. Methods may also be designed public, private, or intermediate levels such as <code>protected</code> (which allows access from the same class and its subclasses, but not objects of a different class). In other languages (like Python) this is enforced only by convention (for example, <code>private</code> methods may have names that start with an [[underscore]]).
 
===Encapsulation===