I want to limit the amount my classes know about each other, even two instances of the same class. How can I pass a whole object as a parameter to a method, at the end return that object, not be able to access its private fields, and being forced to use getters and setters?
The Stack Overflow Why do objects of the same class have access to each other's private data? Q&A talks about why you cannot have instantiated object prohibit each other from accessing private fields. However, it does not contain possible fixes to the problem.