Topics for Midterm 2:

Exceptions – how to define your own exception classes and how to throw and catch them L

Linked lists/ Stacks/Queues/Vectors (candidate for coding questions, why have the different types?)

Iterators – what is the output of this code, why and how we define iterators using a inner class

Tree data structures and binary search trees

Design patterns (see the course notes)

Recursion – e.g. rewrite this iterative method using recursion

Analysis of algorithms

Focus on the following in the textbook:

Chapter 3:  3.1, 3.2, 3.3, 3.5, 3.6, 3.7

Chapter 4:  all sections

Chapter 5:  5.1, 5.3 and 5.5

Chapter 6:  all

Chapter  9.1

Review exercise:

See also the following programs (and tips in them of possible midterm questions):

SimpleTreeMap.java

TreeMap.java  (extended version of SimpleTreeMap.java)

NullParentException.java