Hi,
Is that important to differentiate between Abstract class and interface class?
Abstract class is merely an interface class, with some concrete methods.
If the abstract class shares the same prefix "I" with Interface class, we can easily upgrade our interface class to abstract class, by introducing new logic etc.
UPDATE
The reason why I am asking this is, interface impose some limitation when the project grows. For instance,
If one interface has been "implemented" by thousand classes, and at some point we need to introduce a few new methods in the base class, we will have to fix all the sub classes.
Abstract class provides flexibility in terms of functional expansion, as it can provide default implementation without affecting sub classes.
That's why I got the idea of using interface and abstract class interchangebly.
ICar car = new Merz(); // ICar can be interface or abstract class
However, when i think about it again, we still have to change all the sub classes, due to the fact that the class declaration forces us to use "extends" or "implements" at the very beginning.
So I think there is no option for doing polymorphism on abstract/interface class.