The Law of Demeter

There are many ways to achieve better and more object oriented code. One way is to adhere to the law of Demeter. A method must only call other methods as in this example: