Johnson County Magistrate Judge Michael Farley said during the sentencing Tuesday that he considered the boy’s actions “an assault upon the dignity of all teachers.”

The teen, now 17, vomited on teacher David Young as he turned in his textbook on the last day of classes at Olathe Northwest High School. His attorney, Brian Costello, said the student vomited because he was nervous about his final exams.

But two other students testified that the teen said he threw up intentionally. One girl said he told her in advance that he planned to throw up on Young on the last day of school. The girl wasn’t in class when the teen threw up, but she testified that the boy later told her, “You missed it. I did it.”

Young said the student, who was failing his class, made no effort to avoid throwing up on him. “I was just sort of stunned,” he said.