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:

    The man who would change the name of Arkansas is the original, iron-jawed, brass-mouthed, copper-bellied corpse-maker from the wilds of the Ozarks! He is the man they call Sudden Death and General Desolation! Sired by a hurricane, dam’d by an earthquake, half-brother to the cholera, nearly related to the smallpox on his mother’s side!
    —Administration in the State of Arka, U.S. public relief program (1935-1943)

    I’m beginning to think that the proper definition of “Man” is “an animal that writes letters.”
    Lewis Carroll [Charles Lutwidge Dodgson] (1832–1898)