Class Diagram at Example


I’ve got a question about my class diagram which I use to model a cookbook. For that I need the class “recipe” and the class “ingredients” with m:n multiplicity right? But what should I do with the amount of ingridents? This I think must have it’s position as attribute of the aggregation, but how to model it in the class diagram?

I hope you’ll understand my question :slight_smile:


Hi Erik,

Thanks for your post. You can add an Association class to the association between the class “recipe” and the class “ingredients”. Association Class is used for describing association by holding additional attributes which do not actually belong to the objects involved in the association.

You can get details of Association Class from

If there is any further inquiry, please do not hesitate to contact me.

Best regards,
Lilian Wong