An algorithm processes student examination marks to validate input ranges, accumulate class totals, and count passing students. The pseudocode is shown as numbered lines: 01 PassCount ← 0 ⏎ 02 FailCount ← 0 ⏎ 03 TotalMarks ← 0 ⏎ 04 FOR Student ← 1 TO 4 ⏎ 05 REPEAT ⏎ 06 INPUT Mark ⏎ 07 IF Mark < 0 OR Mark > 100 THEN ⏎ 08 OUTPUT "Invalid Mark. Re-enter: " ⏎ 09 ENDIF ⏎ 10 UNTIL Mark >= 0 AND Mark <= 100 ⏎ 11 TotalMarks ← TotalMarks + Mark ⏎ 12 IF Mark >= 50 THEN ⏎ 13 PassCount ← PassCount + 1 ⏎ 14 ELSE ⏎ 15 FailCount ← FailCount + 1 ⏎ 16 ENDIF ⏎ 17 NEXT Student ⏎ 18 ClassAverage ← TotalMarks / 4 ⏎ 19 OUTPUT "Passes: ", PassCount ⏎ 20 OUTPUT "Fails: ", FailCount ⏎ 21 OUTPUT "Average: ", ClassAverage.
State the name of the validation check implemented in lines 05 to 10 and explain how it prevents invalid data from being processed.
Complete the trace table for the algorithm using the following sequence of test inputs: 72, -15, 48, 105, 84, 56. Show all variable updates, condition evaluations (TRUE / FALSE), and final outputs.
Provide four specific test values for Mark that thoroughly test the validation check in lines 07 to 10, categorised as:
One normal test value.
Two boundary test values.
One abnormal test value.
A junior programmer amends line 18 to: ClassAverage ← TotalMarks / PassCount. Explain why this modification introduces a potential runtime error, and state the exact condition under which the program will crash.