Program to an interface and not to an implementation

Putting this more succinctly, you should define the top of any class
hierarchy with an abstract class or an interface, which implements no
methods but simply defines the methods that class will support. Then in all
of your derived classes you have more freedom to implement these
methods as most suits your purposes.

Leave a Reply

Your email address will not be published. Required fields are marked *