View RSS Feed

Recent Blogs Posts

  1. Using Inheritance - Substitution vs. Extension

    by , 11-30-2011 at 02:51 AM
    We are going to look at inheritance hierarchy. If we take a classic approach, as shown below we would see the methods that have been defined in the base class overridden in the derived classes. Inheritance guarantees that any derived class will have the interface of the base class. If you follow this diagram below, derived classes will also have no more than the base-class interface.

    Name:  Inheritance-Example.jpg
Views: 958
Size:  16.7 KB

    This can be thought of as pure substitution, because ...