| | 1 | = UseCase3001Implementation – Enroll in Subject |
| | 2 | |
| | 3 | **Initiating actor:** Student |
| | 4 | |
| | 5 | **Other actors:** None |
| | 6 | |
| | 7 | **Description:** Student enrolls in a subject offered by their faculty. |
| | 8 | |
| | 9 | **Scenario:** |
| | 10 | |
| | 11 | 1. System displays Student Menu. |
| | 12 | |
| | 13 | 2. Student selects Enroll in Subject. |
| | 14 | |
| | 15 | 3. System lists students → selects student ID. |
| | 16 | |
| | 17 | 4. System lists available subjects → selects subject. |
| | 18 | |
| | 19 | 5. System checks enrollment: |
| | 20 | {{{ |
| | 21 | SELECT * FROM Student_Subject WHERE Student_Id = ? AND Subject_Id = ?; |
| | 22 | }}} |
| | 23 | |
| | 24 | 6. If not enrolled, system inserts: |
| | 25 | {{{ |
| | 26 | INSERT INTO Student_Subject(Student_Id, Subject_Id, Status, Enrollment_Date) |
| | 27 | VALUES (?, ?, 'ENROLLED', CURRENT_DATE); |
| | 28 | }}} |
| | 29 | |
| | 30 | 7. System confirms enrollment. |
| | 31 | [[Image()]] |