Introduction
The previous chapter discussed classes and objects. You learned that classes define objects and their functionality. Classes are the blueprint followed while constructing these objects. Now, we will go up one level of abstraction. We are now going to construct interfaces. Interfaces are descriptors and allow you to define the structure of your object. Interfaces allow you to define contracts, which are rules that govern how your data is shaped.
Interfaces are important because they enable your objects to be strongly typed, which gives you the ability to write cleaner code. Defining the shape of your objects may not be much of an issue with smaller applications, but when working with large applications, interfaces will prove their worth as they will make it possible for your application to scale without your code becoming confusing and hard to support.
Inheritance allows new objects to take the properties of existing objects, enabling you to extend your code functionality...