I have a task where I am supposed to create a UML class diagram. Let me paraphrase:
There are two types of storage units (A and B). An item can only be placed in a storage unit of type A or B.
The book I'm using described the use of XOR relationship, as shown bellow on this site:
i.e. for my example, an item can only be associated with storage unit of type A or B. I quite like the tool GenMyModel. Is there way to represent this in that tool? I've searched like mad and can't find anything.
Cheers,
Delectable Tea
GenMyModel is a quite nice tool, but also quite limited in its UML support. The "relation" you are demanding here is called a constraint. Constraints are a quite informally handled and not really commonly used topic in UML. So there plenty of tools that have no proper support of it. Then you can draw - thought but not model - constraints, i.e., just use other model elements or free forms to get something that looks like this.