I am trying to design a restaurant ordering system in UML, which should also include the stock system.
One of the classes is a Dish
(i.e. a dish on the menu), and another is an Ingredient
.
My initial idea was to place an aggregation of Ingredient
s within Dish
, but I've also read that a many to many relationship is more appropriate.
My problem is that in this case, simply having a relationship isn't enough. For instance a Dish
could have 30g of Ingredient
A, while another Dish
could have 20g of Ingredient
A.
How can I model this kind of dependency in UML?