Encapsulation (object-oriented Programming) - General Definition

General Definition

In general, encapsulation is one of the 4 fundamentals of OOP (object-oriented programming). Encapsulation is to hide the variables or something inside a class, preventing unauthorized parties to use. So the public methods like getter and setter access it and the other classes call these methods for accessing.

This mechanism is not unique to object-oriented programming. Implementations of abstract data types, e.g. modules, offer a similar form of encapsulation. This similarity stems from the fact that both notions rely on the same mathematical fundament of an existential type.

Read more about this topic:  Encapsulation (object-oriented Programming)

Famous quotes containing the words general and/or definition:

    Each victim of suicide gives his act a personal stamp which expresses his temperament, the special conditions in which he is involved, and which, consequently, cannot be explained by the social and general causes of the phenomenon.
    Emile Durkheim (1858–1917)

    Beauty, like all other qualities presented to human experience, is relative; and the definition of it becomes unmeaning and useless in proportion to its abstractness. To define beauty not in the most abstract, but in the most concrete terms possible, not to find a universal formula for it, but the formula which expresses most adequately this or that special manifestation of it, is the aim of the true student of aesthetics.
    Walter Pater (1839–1894)