You can think of an interface as a special case of an abstract class. An interface defines properties and methods that a class must implement in order to be considered a member of a group identified with the interface name.
For example, in C#, the language that supports interfaces, we can create the
IAlien interface that specifies the following elements:
Once we define an interface, we can use them to specify the required type for an argument. This way, instead of using classes as types, we can use interfaces as types and an instance of any class that implements the specific interface as the argument. For ...