DEV Community

Discussion on: The Four Pillars of Object Oriented Programming

Collapse
 
stereobooster profile image
stereobooster

Encapsulation binds together the data and functions that manipulate the data,

this is definition of object (from OOP)

Object-oriented programming (OOP) is a programming paradigm based on the concept of "objects", which can contain data and code: data in the form of fields (often known as attributes or properties), and code, in the form of procedures (often known as methods).

Encapsulation

Encapsulation is a technique for minimizing interdependencies among separately-written modules by defining strict external interfaces. The external interface of a module serves as a contract between the module and its clients, and thus between the designer of the module and other designers. If clients depend only on the external interface, the module can be reimplemented without affecting any clients, so long as the new implementation supports the same (or an upward compatible) external interface. Thus, the effects of compatible changes can be confined.

-- cs.tufts.edu/comp/150CBD/readings/...

as well

encapsulate - to enclose in or as if in a capsule

-- merriam-webster.com/dictionary/enc...

Some comments have been hidden by the post's author - find out more