wiki:UseCase3001Implementation

Version 7 (modified by 216009, 13 hours ago) ( diff )

--

UC3001 – Enroll in Subject Implementation

Initiating actor: Student Other actors: None

Description: Student registers for an available course module matching their faculty division and selects an associated professor who oversees that course instance.

Scenario:

  1. System displays the Student Menu interface.
  2. Student selects the option to "Enroll in Subject".
  3. System outputs a full list of registered students, and the user selects their unique Student ID.
  4. System identifies the student's faculty association and filters all valid available subjects:
    SELECT s.Id, s.Name 
    FROM Subject s 
    JOIN Student st ON s.Faculty_Id = st.Faculty_Id 
    WHERE st.Id = ?;
    

Student selects a target Subject ID from the listing.

  1. System queries and displays all professors affiliated with the faculty offering that selected subject:
    SELECT p.Id, p.Name, p.Surname 
    FROM Professor p 
    JOIN Subject s ON p.Faculty_Id = s.Faculty_Id 
    WHERE s.Id = ?;
    

Student selects a specific Professor ID.

  1. System performs an validation check to ensure a duplicate active enrollment does not already exist:
    SELECT * FROM Student_Subject WHERE Student_Id = ? AND Subject_Id = ?;
    
  2. If no prior enrollment is found, the system saves the record using the baseline registration status:
    INSERT INTO Student_Subject (Student_Id, Subject_Id, Professor_Id, Status, Enrollment_Date, Absences_Count)
    VALUES (?, ?, ?, 'Enrolled', CURRENT_DATE, 0);
    
  3. System prints a terminal message confirming that course enrollment completed successfully.

Implementation Screenshots

Attachments (5)

Download all attachments as: .zip

Note: See TracWiki for help on using the wiki.