Encapsulation is the mechanism that binds together the code and data manipulates, and keeps both safe from outside interference and misuse . The advantage of encapsulated code is that outside world knows how to access it and thus can use it regardless of the implementation details and without fear of unexpected side effects
the purpose of a class is to encapsulate complexity and c++ provides mechanisms for hiding the complixity of implementation inside the class
.

0 comments:
Post a Comment