Skip to main content
4 events
when toggle format what by license comment
Sep 7, 2022 at 19:37 comment added Christophe @FilipMilovanović Thanks for these insights. Indeed, letting the derivates decide if IStrategy is to be used or prefer some specific subtype of IStrategy, is what I meant in the first bullet
Sep 7, 2022 at 11:38 comment added Filip Milovanović Oh, I didn't notice at first that CoffeeMachine references IStrategy (I left a comment under the question earlier). Looks like the OP is doing this for practice, but depending on the requirements in an real-world scenario, another option (as an alternative to your last paragraph) would be to actually remove that, and (if possible) let the derivatives decide if they are going to use IStrategy or not. BTW, I think the (second) diagram is auto-generated from code by an IDE, so I'm not sure that it follows UML conventions 100% (it's probably more of a visualization of what references what).
Sep 6, 2022 at 22:41 vote accept Gullit
Sep 6, 2022 at 22:39 history answered Christophe CC BY-SA 4.0