I have a class Tutor and there are some instances of that class can be course coordinators, can I represent the relationship using recursive association? this is how I represented the association at first, which I think is not correct
In your diagram you claim that all Tutors
are coordinating
exactly a single Course
. It's the consequence of 1
being the same as 1..1
. But this is not what your narrative says:
some instances of that class can be course coordinators.
You should therefore replace the multiplicity on the Course
side with 0..1
. It which would translate some Tutors
can be coordinating
a Course
(but not all).
The inconvenience is that the model does not define Course Coordinators
. Maybe it's just the wording and doesn't matter. But may be there is more about Course Coordinator
that would justify a separate class with additional properties and behaviors:
If it's a special kind of Tutor
, just make it a specialization thereof, and let this additional class have the coordinating
association.
If this is a special role that a Tutor
but also other classes (Professor
, Assitant
, ...) could take, you'd better prefer composition over inheritance (object composition in OOP corresponds to UML associations). The association between Tutor
and Course Coordinator
would read "have the role of".
A couple of additional questions for you (just to ensure that the multiplicities say what you meant):
Course
could be taught by several Tutors
?Tutor
could teach more than one Course
?Course
could have no Tutor for teaching (because *
means 0..*
)?Course
could be coordinated by several Tutors
?