Lunarpages Web Hosting Forum

Scripting Languages Hosting Help => C++ / PERL / CGI Support => Topic started by: android45 on October 30, 2012, 12:49:27 AM

Title: Encapsulation?
Post by: android45 on October 30, 2012, 12:49:27 AM
What is encapsulation? please explain. Thanks in advance.
Title: Re: Encapsulation?
Post by: MrPhil on October 30, 2012, 05:49:48 AM
In simplest terms, to encapsulate data is to isolate and cordon it off so that it can only be worked with via defined methods (as in a class). The idea is to not allow random access to the data, but only through the well-defined methods. This prevents damage to the system in case a programmer doesn't quite understand the proper usage of the (raw) data, and permits the implementation to be changed behind the scenes without affecting how the programmer uses it (through methods).
Title: Re: Encapsulation?
Post by: noahwilson on May 28, 2013, 11:31:21 PM
Nice topic, thanks for sharing this and reply on this. its really helpful for me.
<spam links removed>
Title: Re: Encapsulation?
Post by: annaharris on May 31, 2013, 03:17:24 AM
encapsulation is an attribute of object design. It means that all of the object's data is contained and hidden in the object and access to it is restricted to members of that class.
Title: Re: Encapsulation?
Post by: ivvyevents on July 02, 2013, 10:48:52 AM
Encapsulation is fundamental of oop(object-oriented programming) and it is used to hide the object's data inside the class. It is related to abstraction and information hiding.