< Day Day Up > |
Because interfaces are a special type of inheritance, the notations are similar and can cause some confusion. Earlier we said that inheritance is represented by a line with an arrowhead. An interface is also represented by a line with an arrowhead ”but the arrowhead is connected to a dashed line. This notation indicates the relationship between inheritance and interfaces, but also differentiates them. Take a look at Figure 10.5, which is an abbreviated version of an example in Chapter 8, "Frameworks and Reuse: Designing with Interfaces and Abstract Classes." The Dog class inherits from the class Mammal and implements the interface Nameable . Figure 10.5. UML diagram of an interface relationship.
|
< Day Day Up > |