Sample Code for Data Structures

Lecture 1:

Classes and subclasses

Objects and references

Parameter passing


Objects that reference other objects

Homework 1

Lecture 2. Abstract Methods and Interfaces. 9/8

Programming Assignment 1

Lecture 4. Generics. 9/15

Lecture 5. Lists. 9/20

Lecture 6. More lists

Java library list classes

Ordered Arrays

Ordered Lists

Generic Ordered Arrays


FIFO Queues: List implementation

FIFO Queues: Circular array implementation

Lecture 7

Lecture 8

Lecture 9: Trees

Lecture 10: More trees

Lecture 14:

Lecture 20: Exception Handling

A tester for the stack:

A program for evaluating postfix expressions that uses this stack:

Reading from input with a handler for IOException.

Complex structure of catchers:

Intersection points of triangles