Bake 2 batches of cookies or other simple treat. Make one batch 1/2 the size individually to the other.
Before you start the lesson give each class member a small cookie (ideally on a napkin) and tell them not to eat it yet. The other batch is kept well hidden. Tell the class that they are not to eat that cookie until the end of class (I gave them a code word to avoid confusion). Tell them that they must not eat the cookie no matter what is said. The trick is that they must hold the cookie in their lap (or in reachable view).
Throughout the lesson, throw in the odd "Why don't you eat that cookie?" "That cookie smells nice!" "Man, I'm hungry! Are you?" "Go on, eat the cookie, you get to eat it eventually anyway, why not now?" etc.
At the end of the lesson, when the class is finally permitted to eat the cookie, reward those who have passed the test with a second, bigger cookie.
Explain that their are two lessons to be learned here. Ask your class if they think it would have been easier if they were able to put the cookies out of sight? Explain that when we keep temptation out of sight that it's much easier to avoid wrongdoing. Secondly, if we can avoid temptations, Heavenly Father has a much bigger reward to give us than anything we may feel will satisfy us in this life.