I have a question about the Bridge pattern. I can follow the pattern, for instance, if you have two shapes and two colors than you can create a red Triangle or a green Pentagon (https://www.journaldev.com/1491/bridge-design-pattern-java). But what if you want to create a red-green Pentagon with the same structure (assume that the color is then automatically divided in half).
The underlying question is: how can I use multiple implementations in a Bridge pattern.
Aucun commentaire:
Enregistrer un commentaire