I have a class diagram with the following two aggregations:
contentCategories
is a dynamic array of categories, currentCategory
is always an element of that array, but is maintained as a distinct member variable. I need to show the constraint that it is always an element of contentCategories
in OCL. Have I done this correctly? If not, what would be the correct way to do it?
Thank you all for your help in advance!