Benefits of Using an Interface
The benefits of using an interface in your application are as follows.
-
The ability to define behavior that can be implemented by a group of unrelated classes without forcing them to share a common class hierarchy
-
By implementing an interface, a class can perform in a role that is different from that dictated by its class hierarchy
-
As a class is not limited to the number of interfaces that it can implement, it can therefore participate in a wide variety of roles
-
A class can be exposed through its interface, effectively hiding its implementation details by forcing all communication to be through its public interface methods
-
The class hierarchy can be simplified when developing with interfaces, which typically reduces overloading
-
You can easily modify existing systems to provide new functionality within their current class hierarchy