I did this in class as well, mostly as a" dare" from a mate - could never resist a good "dare" - belt open, trousers unzipped, cock out - it was usually erect unready with anticipation - condom on -usually didn't wear underwear so everything was easy - had to minimize arm movements and control facial expressions as I had a full on orgasm. The condom was removed and handed to someone else as proof that I had done the deed!! Don't know what would have happened if I'd got caught but never did.