wiki:UC3001

Version 2 (modified by 216009, 3 weeks ago) ( diff )

--

UseCase3001 – Enroll in Subject

Initiating actor: Student

Other actors: Professor

Description: A student wants to enroll in a subject offered by their faculty. The system checks prerequisites, enrollment limits, and records the enrollment in the database.

Scenario:

  1. Student logs into the system and selects “Enroll in Subject.”
  1. System displays a list of subjects available for their faculty:
    SELECT s.Id, s.Name, s.Semester, s.Credits 
    FROM Subject s 
    JOIN Faculty f ON s.Faculty_Id = f.Id
    JOIN Student st ON st.Faculty_Id = f.Id
    WHERE st.Id = :student_id;
    
  1. Student chooses a subject and clicks “Enroll.”
  1. System checks if the student is already enrolled:
    SELECT * FROM Student_Subject
    WHERE Student_Id = :student_id AND Subject_Id = :subject_id;
    
  1. If not enrolled, system inserts enrollment record:
    INSERT INTO Student_Subject(Student_Id, Subject_Id, Status, Enrollment_Date, Absences_Count) 
    VALUES (:student_id, :subject_id, 'ENROLLED', CURRENT_DATE, 0);
    
  1. System confirms enrollment and updates student's schedule.
Note: See TracWiki for help on using the wiki.