Using interfaces adds flexibility and power to your design. It solves the hard equation of how to make classes cohesive and loosely coupled. By creating interfaces, classes don’t need to know each other anymore. Interfaces define the services that will be provided by the class.
This applies the Dependency Inversion Principle.
You can see the following video for more information.
For more information about the Dependency Inversion Principle, visit the following links:
- Dependency Inversion Principle - Wikipedia
- Dependency Inversion Principle - oodesign.com
- Dependency Inversion Principle - PDF by Object Mentor
Thanks,
M. Radwan