in reply to Object creation
Object-oriented modules keep all function and variable names close to the vest. They are not available directly, you access them through the module name.
According to Rumbaugh
Encapsulation can be violated when code associated with one class directly accesses the attributes of another class. Direct access makes assumptions about storage format and location of the data. These details must be hidden within the class....The proper way to access an attribute of another object is to "ask for it" by invoking an operation on the object, rather than simply "taking it."
|
|---|