A high school student convicted of vomiting on his Spanish teacher has been ordered to spend the next four months cleaning up anytime someone throws up in a police car.

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." He also said he hoped to receive a "full confession.

"The teen, now 17, was charged with a misdemeanor count of battery in June in the juvenile division of Johnson Country District Court.

During the last day of classes at Olathe Northwest High School, the teen vomited on Spanish teacher David Young as he turned in his textbook.The boy's attorney, Brian Costello, said the teen 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 the teen had told her in advance that he planned to throw up on Young on the last day of school.