I should portray the following connections between cinemas, movies and movie distributors in an UML class diagram:
Right now my UML diagram looks like this:
I derived the multiplicities from the following statements:
I struggle definitely with statement 4 and I'm not sure about my interpretations of the other statements too.
You may be on the right direction for the multiplicities. However, did you spot the challenge of several classes being involved in the same association?
To solve this you can:
In view of your diagram, let's first remind the principles of multiplicity in ternary associations, since it's far from being obvious:
The multiplicity says something about how many times an instance may be present in this associations for any given tuple of linked instances.
Let's apply it successively. THis will without suprise confirm your own analysis:
Distributor
and a given Cinema
, there can be 0..*
Movies
lent. That's (5).Cinema
and a given Movie
, there can be 0..1
Distributor
making the lend. That's (3)Movie
and a given Distributor
, the lend can be for 1..*
Cinema
. That's (1) and (2). (This also means that it make no sense to lend no movie)The item 4 is missing, but it's only a consequence of the others. (4) means that we take a given movie:
Movie
can have only one Distributor
. So we are allowed to imagine cases with several distributors for the same movie, isn't it ?Movie
is shown only in one Cinema
. So we are allowed to imagine the same movie in several cinemas.Movie
for a pair of Cinema
/Distributor
(otherwise the multiplicity of Movie would be 0..1
and not 0..*