Object Orgy - Forms

Forms

Encapsulation may be weakened by declaring internal members public or by providing free access to data via public getter/setter methods. The access need not be public: for details see e.g. Java access modifiers and the Accessibility Levels in C# (MSDN). In C++, encapsulation is also weakened by declaring friend-classes or -functions.

An object may also make its internal data accessible by passing references to them as arguments to methods or constructors of other classes, which may retain references.

On the other hand, objects holding references to one another, though sometimes described as a form of object orgy, does not in itself breach encapsulation.

Read more about this topic:  Object Orgy

Famous quotes containing the word forms:

    It is given to few to add the store of knowledge, to strike new springs of thought, or to shape new forms of beauty. But so sure as it is that men live not by bread, but by ideas, so sure is it that the future of the world lies in the hands of those who are able to carry the interpretation of nature a step further than their predecessors.
    Thomas Henry Huxley (1825–95)

    I have always thought that one man of tolerable abilities may work great changes, and accomplish great affairs among mankind, if he first forms a good plan, and, cutting off all amusements or other employments that would divert his attention, make the execution of that same plan his sole study and business.
    Benjamin Franklin (1706–1790)

    There is a continual exchange of ideas between all minds of a generation. Journalists, popular novelists, illustrators, and cartoonists adapt the truths discovered by the powerful intellects for the multitude. It is like a spiritual flood, like a gush that pours into multiple cascades until it forms the great moving sheet of water that stands for the mentality of a period.
    Auguste Rodin (1849–1917)