I have three classes:
-User class
-Role class
-UserRole class : to join both classes
Each user can have multiple roles.
So, I made this class diagram:
Is the composition relationship between classes and the cardinalities correct?
No. When the relationship goes away, you don't want the other things to get deleted. The pointy ends must also be 1's.