next up previous contents
Next: Inheritance Up: Essential features of object Previous: Essential features of object   Contents


Encapsulation

Encapsulation in OOP-terminology means that an object has something like a shell around it protecting the attributes or status variables from being accessed from outside of the object. The belong to the object and to nobody else. Only the methods of the object have access to them, can read and modify their values. The methods, providing the services of the object, are the interface to the outside world.

In A++ this is not quite true however, because even the methods can be accessed only indirectly through the dispatcher, which was returned by the constructor when the object was created.



Georg P. Loczewski 2004-03-05


Impressum und Datenschutz