Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Encapulation

Status
Not open for further replies.

teser

Technical User
Mar 6, 2001
194
US
Please tell what what encapulation (spelling??) involves in C++.

Does it focus on Inheritance with public, protected and private data members and functions?

Am I close on the definition??? Please tell me what it is?
 
I can't really improve on this definition I found at
The ability to provide users with a well-defined interface to a set of functions in a way which hides their internal workings. In object-oriented programming, the technique of keeping together data structures and the methods (procedures) which act on them.

In other words, the act of designing and building classes that provide public accessor methods and keeps private what should not be externally accessed means that encapsulation has been accomplished.

This is not specific to C++. It is a concept that goes back to the beginning of object oriented programming.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top