Toys are us: presenting mathematical concepts in CS1/CS2

Presentation and use of formally-specified software components in CS1/CS2 presents interesting pedagogical challenges. Specifications may involve unfamiliar mathematical concepts and notation. We have found that the use of toys, such as stacking plastic cups and Lego(C) blocks, to be amazingly effective in helping students develop mental models for mathematical concepts. With the aid of these mental models, students are able to understand the behavior of software components through cover stories (their specifications), without knowing the implementations of the components.