I am refining my Part-2 assignment's domain model to construct my class diagram, and I have a question about "association subsetting/generalising". I want to show associations, between superclasses (that I have introduced), which are a generalisation of the existing associations, between existing classes in the domain model.
The "generalised associations" will allow me to manage the superclass, instead of managing the individual subclasses.
To depict this problem, please see the arbitrary example below in the first attachment.
I want to "generalise" some of these associations and make my class diagram, somewhat as shown in the second attachment. The highlighted (Pet <--> PetInvoice) association is the generalisation of the existing many-to-many associations.
Alternatively, how should I show both the specialised and generalised associations?
Omitting the generalised (implicit) association, seems like the cleanest approach, but I was not sure if this is correct, as per UML, because usually I would, in a real-world problem, show the most relevant generalised associations, and leave out the specialised ones as an implementation detail, where as here, the specialised associations were part of the existing assignment domain model, and hence the perplexity.
Is a modification (or extension?) like this, within the scope of the minor changes permitted while making the class diagram for the assignment?
If this seems like too much modification of the original domain model, any suggestions on how to handle a situation, where I want to associate a SLSB manager, to the generalised entity, will be greatly appreciated.
Cade and Sheil do something like this in JustBuildIt Example (@AvailabilityItem) in their book, but that is only at one AssociationEnd; what I want to do is for both AssociationEnds.
Thanks for your time.
P.S. The example shown in the attachment is a totally fictitious and highly simplified one, as an aid to ask my question; it does not quite show the associations in my actual assignment model.
Joined: Sep 05, 2011
No takers? I thought this was a more common problem. Or am I totally off the mark?