The figures 1 and 2 illustrate code with the same functionality, however in figure 2, the dependency has been inverted using an interface. The direction of dependency can be chosen to maximise code reuse, and eliminate cyclic dependencies.