I’m developing a reusable library and have been creating abstract classes, so the client can then extend from these.
QUESTION: Is there any reason in fact I should use an abstract class here as opposed to just a normal class?
Note – Have already decided I do not want to use interfaces as I want to include actual default methods in my library so the client using it doesn’t have to write the code.
EDIT: So I’m fishing for any advantages I can’t think of. For example when upgrading the library would use of an abstract class lessen impact on client code – I can’t see it would in this case no?
Unless you want to force the end users to inherit from your classes, there should be no reason to use abstract.
If you want to make your classes inheritable and easily extensible, use virtual on your methods and make sure you have usable protected constructors.