Changes between Initial Version and Version 1 of UC3001


Ignore:
Timestamp:
02/03/26 20:54:31 (3 weeks ago)
Author:
216009
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • UC3001

    v1 v1  
     1= UseCase3001 – Enroll in Subject
     2
     3**Initiating actor:** Student
     4**Other actors:** Professor
     5
     6**Description:**
     7A student wants to enroll in a subject offered by their faculty. The system checks prerequisites, enrollment limits, and records the enrollment in the database.
     8
     9**Scenario:**
     10
     111. Student logs into the system and selects “Enroll in Subject.”
     12
     132. System displays a list of subjects available for their faculty:
     14{{{
     15SELECT s.Id, s.Name, s.Semester, s.Credits
     16FROM Subject s
     17JOIN Faculty f ON s.Faculty_Id = f.Id
     18JOIN Student st ON st.Faculty_Id = f.Id
     19WHERE st.Id = :student_id;
     20}}}
     21
     223. Student chooses a subject and clicks “Enroll.”
     23
     244. System checks if the student is already enrolled:
     25{{{
     26SELECT * FROM Student_Subject
     27WHERE Student_Id = :student_id AND Subject_Id = :subject_id;
     28}}}
     29
     305. If not enrolled, system inserts enrollment record:
     31{{{
     32INSERT INTO Student_Subject(Student_Id, Subject_Id, Status, Enrollment_Date, Absences_Count)
     33VALUES (:student_id, :subject_id, 'ENROLLED', CURRENT_DATE, 0);
     34}}}
     35
     366. System confirms enrollment and updates student's schedule.