Week 9: Iterators

Lecture 21 html pdf: Through the Looking Glass (3/9)

Goals: learn to abstract traversals through iterators

Lecture 22 html pdf: It's a Long and Dusty Road, It's a Hard and Heavy Load, ... (3/10)

Goals: learn to use ArrayList and to abstract traversals through a functional iterator

Lecture 23 html pdf: There are places I rememeber, some have changed and some remain, ... (3/14)

Goals: learn to mutate ArrayList --- when necessary

SelectionSort.java A standalone implementation of a selection sort for an ArrayList of Strings.

InsertionSort.java A standalone implementation of an insertion sort for an ArrayList of Strings.


Drawing the World How to use the World in java 1.4 with Eclipse

draw.jar The 'draw' teachpack resource file.

DrawingWorld.java The sample code for simple drawings.

KeyEventWorld.java The sample code for using key events only.

TimerWorld.java The sample code for using timer with key events.


Lecture 21 - John: Using iterators (3/9)

Lecture 22 - John: A variety of iterators (3/10)

while Notes on Designing while-loops (John Clements)