Hey Guys,
I'm currently in the process of learning C++, and I'm attempting to get my head around encapsulation. I understand that it means combining the code and data in a self contained 'box' which can be made private or public, and can therefore be used by other parts of the program. However, the books I have and all the sites I have checked seem to give a rather haphazard explanation of what an 'object' and 'class' is in relation to this encapsulation.
I'd appreciate it if someone could quickly explain the basic theory of what they are etc. Small words and analogies would be appreciated.![]()


LinkBack URL
About LinkBacks
Reply With Quote
Yeah, basically you want to design classes/modules in a way that will support reuse and improve the maintainability of the software system as a whole i.e. you should be able to replace a module without having to change other modules as long as the interfaces to the module are implemented correctly.
