If Joe wants to do well in his studies, then he shouldn't allow himself to be distracted by his peers. It's not difficult. If he lacks motivation then that's his own fault; he doesn't want to do well at all.
In my experience, in Year 12 at least, the students who had no motivation to study certainly didn't waltz around in sombreros, waving maracas and distracting everyone else with song and dance. They simply sat at the back of the classroom and did [whatever] in silence. It's not a matter of 'studying', but rather common courtesy. Nearly everyone is or are approaching the age of 18. If they can't sit still in a class for 75 minutes whilst respecting the rights of others, they are simply a poor excuse of a human being.