Field Reports tell how instructors have used AVs in their teaching.

Data structures lab on singly-linked lists

No replies
White BeltYellow BeltGreen Belt
Joined: 2009-08-14
Points: 20
David Furcy
University of Wisconsin - Oshkosh
CS 271 - Data Structures

This one-hour lab activity takes place after students have attended lectures on linked lists and how to build them using C++ pointers. Students are responsible for designing and implementing a couple of algorithms to manipulate singly-linked lists. For this lab, I use an AV tool called JHAVEPOP that allows students to step through a graphical representation of the state of memory as their program executes. JHAVEPOP is really a program visualization tool. Students are directed to the JHAVEPOP homepage, which contains 20+ exercises at varying levels of difficulty. In my lab, students must solve two "hard" problems. They should read the JHAVEPOP and exercise write-ups carefully. When it comes to typing their program, they use their favorite editor. They then paste their code into JHAVEPOP's input window, step through the automatically-generated visual snapshot sequence, detect and correct mistakes, visualize again, etc. When a student thinks s/he is done, I come around and test their program (using JHAVEPOP also) with a variety of test cases. According to my students, viewing pictures of their program in execution speeds up debugging, reduces the frustration of deciphering cryptic error messages (from the C++ compiler), and hopefully helps them understand pointer manipulations. JHAVEPOP contains an interpreter for a common subset of Java and C++ in which syntactical differences are minor. While we use C++ in our course (which constitutes the first contact with C++ for our students after two semesters of Java), other instructors have also used JHAVEPOP for Java.