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:
“Every man, in his own opinion, forms an exception to the ordinary rules of morality.”
—William Hazlitt (17781830)
“We can imagine a society in which no one could survive as a social being because it does not correspond to biologically determined perceptions and human social needs. For historical reasons, existing societies might have such properties, leading to various forms of pathology.”
—Noam Chomsky (b. 1928)
“[In government] the problem to be solved is, not what form of government is perfect, but which of the forms is least imperfect.”
—James Madison (17511836)