Good question the thing is the person who shouts very loudly in class will think that he knows this before only but the thing is he dont know so being more takative we cant acheive many wonders in life so to achieve many adventours we need to have first patience and listening skills and understanding skills
I would tell him/her the difficulties faced by others. I would suggest him, not to do so in the upcoming days. I would ask him, what he will do if he was not allowed to speak, when any other person does like this. In this way, I would make him to realize his mistake.

Thank you.
Hope this will help you.