SOLID OOP - Learning Objectives

The Three Pillars of Object Oriented Programming

The SOLID Principles

(see SOLID)

How to Apply the Law of Demeter

A method of an object can only invoke the methods (or use the properties) of the following kinds of objects:

NOTE: This is certainly a good general principle - however there are situations where it is appropriately violated egregiously, most particularly when one uses an ORM (Object-Relational Mapper) like SQL Alchemy or the Django ORM to express complex queries in procedural language. In those situations, you may legitimately be asking questions about the player.medication related to the player.team.physician.specialty.