O'Reilly logo

Scala Functional Programming Patterns by Atul S. Khot

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 5. Taming Multiple Inheritance with Traits

When it is summer time in India and the heat is just unbearable, our hands instinctively reach out for either the AC remote or the regulator knob. And in a matter of minutes, we get bliss! An AC remote is pretty simple to operate and so is a ceiling fan regulator. A handful of push buttons that are easily understood by anyone. However, a remote is an interface. It is the system's way of allowing the external world to interact with it. A regulator knob is another, and so is a TV remote and the numeric keypad on your phone. As the air conditioner is a complex system, it needs to expose a simple way in which the consumer can use it. A motorbike too is a complex machine. You just need to know how ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required