Changes between Version 4 and Version 5 of UseCase3001Implementation


Ignore:
Timestamp:
06/15/26 14:35:17 (38 hours ago)
Author:
216009
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • UseCase3001Implementation

    v4 v5  
    55**Other actors:** None
    66
    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.
    88
    99**Scenario:**
     
    13132. Student selects Enroll in Subject.
    1414
    15 3. System lists students → selects student ID.
     153. System lists all students → Student selects their Student ID.
    1616
    17 4. System lists available subjects → selects subject.
     174. System lists available subjects for the student's faculty:
     18{{{
     19SELECT s.Id, s.Name
     20FROM Subject s
     21JOIN Student st ON s.Faculty_Id = st.Faculty_Id
     22WHERE st.Id = ?;
     23}}}
     24Student selects a Subject ID.
    1825
    19 5. System checks enrollment:
     265. System lists all available professors for the chosen subject:
     27{{{
     28SELECT p.Id, p.Name, p.Surname
     29FROM Professor p
     30JOIN Subject s ON p.Faculty_Id = s.Faculty_Id
     31WHERE s.Id = ?;
     32}}}
     33Student selects a Professor ID.
     34
     356. System checks if the student is already enrolled in this subject:
    2036{{{
    2137SELECT * FROM Student_Subject WHERE Student_Id = ? AND Subject_Id = ?;
    2238}}}
    2339
    24 6. If not enrolled, system inserts:
     407. If not enrolled, system inserts the new enrollment record into the database:
    2541{{{
    26 INSERT INTO Student_Subject(ssId, Student_Id, Subject_Id, Status, Enrollment_Date)
    27 VALUES (?, ?, ?, 'ENROLLED', CURRENT_DATE);
     42INSERT INTO Student_Subject(Student_Id, Subject_Id, Professor_Id, Status, Enrollment_Date, Absences_Count)
     43VALUES (?, ?, ?, 'PASSED', CURRENT_DATE, 0);
    2844}}}
    2945
    30 7. System confirms enrollment.
    31 [[Image(enrollSubject1.jpg, 800px)]]
     468. System confirms successful enrollment.
    3247
     48[[Image(enrollSubject1.png, 800px)]]