Making the student sit for another exam provides a second chance to demonstrate knowledge, which is fairer than punishment or public discussion. Repeating the entire class is disproportionate if the issue is with one exam. Discussing poor performance publicly would humiliate the student without addressing the learning need.