23.07.2012 Views

Design Patterns Explained

Design Patterns Explained

Design Patterns Explained

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

214 Part IV • Putting It All Together: Thinking in <strong>Patterns</strong><br />

A comparable solution will exist for the V2 implementations. In this<br />

case, the V2Imp objects will contain a reference to the OOGFeature<br />

in question.<br />

Comparison with the Previous Solution<br />

Comparing solutions Compare this new solution, shown in Figure 12-11, with the earlier<br />

solution, which is shown again in Figure 12-12.<br />

A different way to<br />

compare solutions<br />

Figure 12 -12 This was the first solution.<br />

Another way to compare two solutions is to read them. In other<br />

words, the diagrams visually show inheritance (the is-a relationship)<br />

and composition (the has-a relationship). Read these diagrams using<br />

those words where the relationships are present.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!