Law of Demeter or principle of least knowledge is a design guideline, that is using to make code more simple and stable.
- Each unit should have only limited knowledge about other units: only units "closely" related to the current unit.
- Each unit should only talk to his friends; don't talk to strangers.
- Only talk to your immediate friends.