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:
- introduce a fourth object that models the Rental, in addition to the Movie, Distributor and Cinema.
- use a ternary association between the already identified classes.
- use an association class to represent pne of the three clasdes. But this does not seem suitable here, as it would not aknowledge that movies, cinemas and disributors exist independently of their relationships.
- use an association class to tepresent the rental
Edit
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:
- For a given
Distributor
and a given Cinema
, there can be 0..*
Movies
lent. That's (5).
- For a given
Cinema
and a given Movie
, there can be 0..1
Distributor
making the lend. That's (3)
- For a given
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:
- Nothing says that a given
Movie
can have only one Distributor
. So we are allowed to imagine cases with several distributors for the same movie, isn't it ?
- Nothing says that a given
Movie
is shown only in one Cinema
. So we are allowed to imagine the same movie in several cinemas.
- Taking both together, we have a movie with several distributors and several cinemas.
- Now nothing requires that there should be only one
Movie
for a pair of Cinema
/Distributor
(otherwise the multiplicity of Movie would be 0..1
and not 0..*
- By deduction, a movie can be combined with several cinemas and distributors, with different distributors involved.