Bernard is the class hamster at Dewey's school. The students take turns, taking care of it at their homes every week. Dewey took care of it in the episode Health Scare. Although this was the only episode where he actually took care of him, Bernard would make several cameo appearance in later episodes of season three.
Bernard first appeared in the episode Health Scare, where Dewey was taking care of him at his house for the week. He tried to convince Hal and Lois that because he was taking such good care of Bernard, then he could have the responsibility to have a pet dog. Being concerned with bigger problems, Hal and Lois completely ignored him. Later, Lance, a bully at Dewey's school confronted him on the sidewalk, saying that next week, he would be the one taking care of Bernard, and made it obvious that he was going to abuse him when he did. Wanting to save him, Dewey decided to set Bernard free to live on his own, instead of being abused by a bully. So, Dewey put Bernard in a hamster ball and filled it to the brim with a bunch of hamster food and tearfully set him outside, to roll away and live on his own.
Bernard was seen again in the episode Poker. While Reese was filming Malcolm dancing with his mom. Outside the window, Bernard's food filled ball was seen in the background, rolling across the street.
In the episode Reese Drives, after Reese was arrested and his face was pressed against the ground, Bernard was again, seen rolling past him.
Bernard was seen in the background again in Hal's Birthday, rolling among the sidewalk, at the end of the scene where Hal and Francis were in the car.
Bernard's final appearance was in the episode Monkey, where he had apparently made it all the way to Alaska. He was seen rolling past Eric, just after being abandoned by Francis and Piama. This was the last that was ever seen of Bernard.