Active Visual Scaffolding by Charles Kelemen and Eugene Turk

Another interesting animation is:


The student does not have to work too hard to generate it:

public class StudentArray { static int size = 8; static int[] testArray = {9, 53, 3, 8, 15, 13, 24, 17}; public static void main(String args[]) { int lowval, lowpoint, left, temp; ArrayGUI window = new ArrayGUI(); window.inAnApplet = false; window.setArraySize(size); window.setArray(testArray); window.initArray(); window.pack(); window.setVisible(true); for (left=0; left<size; left++) { lowpoint = left; lowval = testArray[left]; for (int i = left + 1; i < size; i++) { if (window.lessthan(i, lowpoint)) { lowval = testArray[i]; lowpoint = i; } } temp = testArray[left]; testArray[left] = testArray[lowpoint]; testArray[lowpoint] = temp; window.redraw(); } } }

To pvwtalkrest