Research shows that examples play an important role for cognitive skill acquisition, and students as well as teachers rank examples as important resources for learning to program. Students use examples as templates for their work. Examples must therefore be consistent with the principles and rules of the topics we are teaching.
Despite many generally accepted object oriented principles, guidelines and rules, textbook examples are not always consistent with those characteristics. How can we convey the idea of object orientation, using examples showing "‘anti"’-object oriented properties?
Based on key concepts and design principles, we present a number of heuristics for the design of object oriented examples for novices. We argue that examples adhering to these heuristics are of higher object oriented quality than examples that contradict them.