I am using .Net and have a simple master- and sub-class design. My master class contains nearly all the functionality and the sub-class only needs to set a value from the master. I was considering making the master an abstract class but there is no methods that I must override, but I'd like to reinforce the idea that the master class cannot necessarily exist on its own. Also, I'd like to reinforce that the property from the master must be set by the sub-class. What is appropriate here? Thanks for any help!
If nobody should ever create an instance of the master class, it is definitely appropriate to make it abstract
.
As for the property, make it an abstract property. In the master, write something like:
public abstract int MyProperty { get; }
and then the subclass must override it.