== UC2001 – Assign Grade to Student Implementation == '''Initiating actor:''' Professor '''Other actors:''' None '''Description:''' Professor inputs and records final grades for students enrolled in specific subject course instances using the console interface. '''Scenario:''' 1. System displays the Professor Menu interface. 2. Professor selects the option to "Assign Grade to Student". 3. System prompts the professor to input their unique Professor ID. 4. System retrieves and lists all unique subjects where this professor has active student enrollments: {{{ SELECT DISTINCT s.Id, s.Name FROM Subject s JOIN Student_Subject ss ON s.Id = ss.Subject_Id WHERE ss.Professor_Id = ?; }}} Professor inputs a target Subject ID from the displayed list. 5. System lists all students currently enrolled in that chosen subject under this professor's instruction: {{{ SELECT st.Id, st.Name, st.Surname FROM Student st JOIN Student_Subject ss ON st.Id = ss.Student_Id WHERE ss.Subject_Id = ? AND ss.Professor_Id = ?; }}} Professor inputs the target Student ID. 6. System prompts the professor to provide a valid final grade value (constrained between 6 and 10). 7. System executes the parameterized SQL statement to persist the final grade and modify the completion status: {{{ UPDATE Student_Subject SET Final_Grade = ?, Status = 'PASSED' WHERE Student_Id = ? AND Subject_Id = ? AND Professor_Id = ?; }}} 8. System displays a confirmation text message indicating that the grade was successfully assigned. == Implementation Screenshots == [[Image(assignGrade1.png, 800px)]] [[Image(assignGrade2.png, 800px)]] [[Image(assignGrade3.png, 800px)]] [[Image(assignGrade4.png, 800px)]]