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 to kick start it into life, change gears, and off you go. The bike also comes equipped with useful stuff, such as a fuel gauge and a speedometer. An AC remote, a bike fuel gauge, and a fan regulator are all interfaces. Think of a system...