That teacher is a manipulative pos. He needs to be fired and blacklisted from ever teaching again. I'm worried he may have done more than just used harsh words.
I had a teacher once said to me directly during class, something like "it seems my first impression of you was wrong..." when I didn't hand in, or finish my homework (cause I was freaking lazy ).. I guess her 'impression' of me were constructed from my previous exam marks and me being the top student, were betrayed by the reality of 'me' at that time.