Flashcards in Law of Demeter Deck (1):
What is the Law of Demeter?
The Law of Demeter states that a method m in a class A should not send a message to another object unless that object is one of the following:
- an instance variable used in the method m
- a parameter to the method m
- an object created in the method m
- a global variable used in the method m