Inheritence

A relationship may exist between classes where one class shares the structure and possible behavior or one or more classes. This relationship is called inheritance. Inheritance is also called a "kind-of" or "is-a" relationship. A superclass is defined with attributes and operations. A subclass will inherit all of the attributes and operations defined by any of its superclasses. The subclass can then further define its own attributes and operations. A subclass can also redefine an operation defined by its superclass. Inheritance provides reuse within a system. A superclass can be defined with generic functionality. A subclass can then refine or specialize the behavior of a superclass. In UML inheritance is shown by a line from the subclass to the superclass with an open arrow drawn at the superclass.