Teaching polymorphism with elementary design patterns

Joseph Bergin
2003 Companion of the 18th annual ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications - OOPSLA '03  
Polymorphism is often treated as an advanced topic by educators. Many feel that if statements are in some sense more "fundamental" to computing. On the contrary, polymorphism is both fundamental to object programming and is an elementary topic that can be easily understood by students. Previous papers [1] have shown how role-play exercises can remind students that they already have a deep understanding of dynamic polymorphism. The question then becomes how do we find effective teaching
more » ... s to present this topic when we move from the level of metaphor to that of programming. A few elementary patterns [2] can be used to teach this topic even before the student is introduced to ad-hoc selection with if statements. Teaching these patterns early has the added benefit that they are pervasive in the Java libraries, so understanding them eases the student's later work.
doi:10.1145/949344.949393 dblp:conf/oopsla/Bergin03 fatcat:3g2ezovlzbg33g32mfgdnirpdi