What is the Law of Demeter attempting to achieve?


What is the Law of Demeter attempting to achieve?


Answer: Law of Demeter is a set of guiding rules that limits the span of control of an object by restricting the messaging structure among methods of a class. Through these restrictions it is conjectured that we can reduce coupling and enhance cohesion.