Q3-3) Draw the interaction diagram for the following contract:
If a collaboration diagram is used, be sure that all messages' sequence numbers are shown.
Contract: Register a Student in a course
Operation: registerStudent (studentID, courseID)
Responsibilities: Register a students in a course
Cross References: Use Cases: Student-course registration
Preconditions: There is a Registrar controller
There is a CourseCatalog and Course collection.
There is Enrollment and RegisteredStudent collection
Postconditions:
• CourseCatalog was checked and the Course was retrieved
• The Course was checked and subtracted its capacity by 1
• RegisteredStudent was created and added to the collection.