wiki:UseCase3001Implementation

UseCase3001Implementation – Enroll in Subject

Initiating actor: Student

Other actors: None

Description: Student enrolls in a subject offered by their faculty and selects a specific professor teaching that course instance.

Scenario:

  1. System displays Student Menu.
  1. Student selects Enroll in Subject.
  1. System lists all students → Student selects their Student ID.
  1. System lists available subjects for the student's faculty:
    SELECT s.Id, s.Name 
    FROM Subject s 
    JOIN Student st ON s.Faculty_Id = st.Faculty_Id 
    WHERE st.Id = ?;
    

Student selects a Subject ID.

  1. System lists all available professors for the chosen 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 Professor ID.

  1. System checks if the student is already enrolled in this subject:
    SELECT * FROM Student_Subject WHERE Student_Id = ? AND Subject_Id = ?;
    
  1. If not enrolled, system inserts the new enrollment record into the database:
    INSERT INTO Student_Subject(Student_Id, Subject_Id, Professor_Id, Status, Enrollment_Date, Absences_Count)
    VALUES (?, ?, ?, 'PASSED', CURRENT_DATE, 0);
    
  1. System confirms successful enrollment.

Last modified 2 days ago Last modified on 06/15/26 14:35:42

Attachments (5)

Download all attachments as: .zip

Note: See TracWiki for help on using the wiki.