Some Code examples
- wombat.ss, a definition by parts
- employee.ss, another definition by parts
- animal.ss, a definition by choices from
structs defined by parts
- shapes-lab.ss, a series of exercises
combining definition by choices with definition by parts
- employees.ss, a list of structs defined
by parts
- animals.ss, a list of a data type defined
by choices
- ftree.ss, a bottom-up family tree data
type
- Java Examples.zip, a folder
containing a Shape project and several successive versions of an IntList
project to see how to make the transition from recursion to loops:
-
addUp by structural recursion;
-
addUp by accumulative recursion;
-
addUp moved outside the IntList class into a recursive static method;
-
addUp written with a foreach loop using
IterableAdapters; and
-
addUpwhile loop using standard
Java Iterators
Last modified:
Stephen Bloch / sbloch@adelphi.edu