Using Memory Diagrams When Teaching a Java-Based CS1

Understanding the execution of an object-oriented program can be a challenge for a student starting a CS1 course. Diagrams are a key technique to help students understand object abstraction through visualization, as well as a useful metric for student understanding of object-oriented concepts. We believe that a type of diagram that we call a memory diagram can be an effective visualization tool for the beginning object-oriented programmer. Memory diagrams differ from more well-known object diagrams in that they focus on how, in an abstract sense, the memory of the machine changes as the program executes. Though memory diagrams are a simple idea, by careful use of shape and placement, a number of key points about the meaning of a program fragment can be conveyed visually. We illustrate how memory diagrams help students understand programming by showing how they cover some of the key concepts in an objectoriented CS1 course. We have also found a correlation between a student's ability to construct these diagrams and that student's comprehension of object-oriented concepts. We are proposing to investigate this correlation further, which may lead to a practical metric for determining a student's future successes in CS1 and CS2, as well as pinpointing where certain students may require further assistance. Versions of memory diagrams have been used by other authors. However, we appear to have developed this approach further than others have. Categor ies and Subject Descr iptors D.1.5 [Programming Techniques]: Object-Oriented Programming D.3.3 [Programming Languages]: Language Constructs and Features Classes and Objects K.3.2 [Computers and Education]: Computer and Information Science Education Computer Science Education