You would use an interface if you needed a bunch of different classes to have some method (named the same but implemented differently in each) and you wanted to use them interchangeably. You would also use an interface if there was no data involved, only methods.
Read moreWhat is difference between interface and abstract class C++?
An “interface” embodies the concept of a contract between clients and an implementation. An “abstract class” contains code that you want to share between multiple implementations of an interface . While the interface is implied in an abstract classes methods, sometimes it is useful to specify the contract in isolation.12 Eki 2012
Read moreIs abstract class better than interface?
The short answer: An abstract class allows you to create functionality that subclasses can implement or override. An interface only allows you to define functionality, not implement it . And whereas a class can extend only one abstract class, it can take advantage of multiple interfaces.
Read moreWhat is the difference between an abstract class and interface?
The key technical differences between an abstract class and an interface are: Abstract classes can have constants, members, method stubs (methods without a body) and defined methods, whereas interfaces can only have constants and methods stubs .
Read moreWhich is better to use interface or abstract class?
Abstract classes should be used primarily for objects that are closely related, whereas interfaces are best suited for providing a common functionality to unrelated classes . Interfaces are a good choice when we think that the API will not change for a while.
Read more