The following example is an older exam question I am trying to understand. The question is: Which design patterns are used in this ClassChart?
In my opinion there is the composite pattern:
- "Car" class as component
- e.g. "Sportscar" class as composite/leaf
and the decorator pattern:
- e.g. "Sportscar" class delegates via "base.speed()"
However, this ClassChart looks very strange to me and it's hard to actually understand, whether I am right with those two patterns and, whether there are more patterns I don't see.
Aucun commentaire:
Enregistrer un commentaire