Inheritance, Polymorphism, and the McDonald’s Chicken Sandwich

Explaining the Four Pillars of Object-Oriented Programming using Fast Food (pt. 2)

By now, we’ve covered how the principles of Encapsulation and Abstraction operate within a programming language like Ruby to make methods and data-management more efficient and versatile (if you haven’t read part 1 yet, catch up here).

We used simple analogies like the McDonald’s corporation to show how these mental models can improve real-world processes. Now…