Activity Diagram
An activity diagram shows a workflow. Actions use rounded rectangles; a diamond branches on a condition. The filled circle starts the workflow and the bullseye ends it.
This is the implemented Student.enroll operation. It rejects a duplicate before changing either collection. Otherwise it creates one Enrollment, records it on both sides and returns it.
Trace it: follow the diagram for a first enrollment and a repeated request. Capacity and prerequisite checks would need additional decisions and tests.
The activity view explains the decisions within enrollment; a sequence diagram will show the objects that carry out those steps.