As is the case with the polar answer - but perhaps a little more explanation:
In textual UML terms, the relationship can be this:
Course ------*-> Student
Read: The course has from 0 to many students.
You can add and remove students from the association as you wish.
However, you are interested in learning more about the association, that is, when the student was added or removed from the course. This "additional" association information reveals the need to use another class, aka "Class Association".
So, now you must insert this class between your existing classes in such a way as to allow yourself to call it "Registration":
Course ------*->Registration------1->Student
Read: The course has from 0 to many registrations. Each registration must have exactly 1 student.
The registration class may look like this:
+--------------+ | Registration | +--------------| | student | | time_added | | time_dropped | +--------------+
This way, you can easily get a list of current students for the course (where time_dropped is zero). Or a list of students who left (where time_dropped is not zero).
source share