Changes between Version 4 and Version 5 of UseCase3001Implementation
- Timestamp:
- 06/15/26 14:35:17 (38 hours ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
UseCase3001Implementation
v4 v5 5 5 **Other actors:** None 6 6 7 **Description:** Student enrolls in a subject offered by their faculty .7 **Description:** Student enrolls in a subject offered by their faculty and selects a specific professor teaching that course instance. 8 8 9 9 **Scenario:** … … 13 13 2. Student selects Enroll in Subject. 14 14 15 3. System lists students → selects student ID.15 3. System lists all students → Student selects their Student ID. 16 16 17 4. System lists available subjects → selects subject. 17 4. System lists available subjects for the student's faculty: 18 {{{ 19 SELECT s.Id, s.Name 20 FROM Subject s 21 JOIN Student st ON s.Faculty_Id = st.Faculty_Id 22 WHERE st.Id = ?; 23 }}} 24 Student selects a Subject ID. 18 25 19 5. System checks enrollment: 26 5. System lists all available professors for the chosen subject: 27 {{{ 28 SELECT p.Id, p.Name, p.Surname 29 FROM Professor p 30 JOIN Subject s ON p.Faculty_Id = s.Faculty_Id 31 WHERE s.Id = ?; 32 }}} 33 Student selects a Professor ID. 34 35 6. System checks if the student is already enrolled in this subject: 20 36 {{{ 21 37 SELECT * FROM Student_Subject WHERE Student_Id = ? AND Subject_Id = ?; 22 38 }}} 23 39 24 6. If not enrolled, system inserts:40 7. If not enrolled, system inserts the new enrollment record into the database: 25 41 {{{ 26 INSERT INTO Student_Subject( ssId, Student_Id, Subject_Id, Status, Enrollment_Date)27 VALUES (?, ?, ?, ' ENROLLED', CURRENT_DATE);42 INSERT INTO Student_Subject(Student_Id, Subject_Id, Professor_Id, Status, Enrollment_Date, Absences_Count) 43 VALUES (?, ?, ?, 'PASSED', CURRENT_DATE, 0); 28 44 }}} 29 45 30 7. System confirms enrollment. 31 [[Image(enrollSubject1.jpg, 800px)]] 46 8. System confirms successful enrollment. 32 47 48 [[Image(enrollSubject1.png, 800px)]]
