This page is subject to change without notice -- please reload it
in your browser if an item that might affect you may have changed.

**
**

The organization of the course is described here. Please **review it at the beginning
of the course** and occasionally during the course. It includes
information about course goals, class time and location, contacting the
instructor
, the textbook, grading, and the **no cheating** policy. I also have
some suggestions for doing well in this course.

If you have any questions, please contact the instructor.

I usually post the presentation notes no later than the day before the lecture.

Chapter references are to the textbook, Data Structures: Abstraction and Design Using Java, 3rd edition.

- Tue, Jan 12. Course introductions, course summary.

Presentation- introductions
- course overview

- Java Tutorial, from Oracle
- William Albritton's Java Coding Standard,

- Thu, Jan 14. Java Basics Review. Appendix A in the book.

Presentation- basics
- exceptions
- variables
- arrays
- modulo operator
- if statements, booleans, comparisons
- loops: while and for

- the Hello World program.
- the Substring program.
- the Change Due program.
- the Equals program.
- the Mystery Program 1.

- Tue, Jan 19. Java Objects Review. Interfaces, super- and
sub-classing, object-oriented programming, Java classes and objects,
wrappers, exceptions. Sections 1.1-1.8, A6, A12 in the book.

Presentation- Abstract Data Types (ADTs)
- Java Interfaces
- Class hierarchy and inheritance

- ArbitraryPrecisionInterface.java, which may be implemented in several different ways
- ArbitraryPrecision.java, one of several possible implementations
- Calculate.java, which does not care how an arbitrary precision number is represented internally
- is a guide to the standard classes .
- See also this Intro to Programming using Java.
- Java coding standard, required for this class
- Eclipse IDE home page
- Netbeans IDE home page

- Thu, Jan 21. Algorithm efficiency and Big-O notation. Section 2.4 in the book.

Presentation- Class hierarchy and inheritance
- Method overriding or overloading, polymorphism
- Abstract classes
- Casting and instanceof/getClass
- Class Object
- Exception class hierarchy

- Abstract class Number

- Tue, Jan 26. Selection Sort. Bubble sort. Insertion Sort. Introduction to Algorithm Analysis. Section 2.4 and Sections 8-8.4 in the book.

Presentation- equality and comparisons in Java
- sorting
- selection sort
- bubble sort
- insertion sort
- introduction to algorithm analysis

- Java Comparator interface (method
`compare`) - Java Comparable interface (method
`compareTo`) - Arrays.sort methods for integer arrays.
- Collections sort methods.

- Thu, Jan 28. Algorithm Analysis and Big-O Notation. Sections 2.4 and 8.5 in the book.

Presentation- algorithm analysis
- Big-O notation
- figuring out big-O for sorting algorithms

- Tue, Feb 2. List interface. Array lists. Sections 2.1-2.3 in the book.

Presentation- Big-O analysis in practice
- List interface
- Array lists

- Interface List
- Abstract class AbstractList
- Class ArrayList
- Loops.java, with this output

- Thu, Feb 4. Analysis and implementation of array lists.

Presentation- Array list implementation
- Big-O Analysis of array list efficiency

homework 5 assigned, due February 12th, 11:55pm. - Tue, Feb 9. Linked lists, with analysis and implementation. Section 2.5 in the book.

Presentation- Linked List implementation
- Big-O Analysis of array list efficiency

- The standard LinkedList class in Java
- Partial implementation of the LinkedList.java, providing only the add methods

- Thu, Feb 11. Doubly-linked lists. Sections 2.6 and 2.8 in the book.
Iterators. Section 2.7 in the book.

Presentation- reminder of invariants and circular lists
- doubly-linked lists
- iterators
- the Java foreach statement
- iterator implementation
- the ListIterator interface

- The standard LinkedList class in Java

- Tue, Feb 16. Iterators. Section 2.7 in the book.

Presentation- iterators
- the Java foreach statement
- iterator implementation
- the ListIterator interface

- Implementation of LinkedListIterator.java
- The standard Iterator interface in Java
- The standard Iterable interface in Java

- Thu, Feb 18. Collection interface, testing. Sections 2.9-2.11 in the book.

Presentation- the Java Collection interface
- testing
- errors
- reasoning about programs

- Tue, Feb 23. Exam review.

Presentation- Java review
- Interfaces
- Class Hierarchy, Abstract Classes, Inheritance
- Selection sort, Bubble sort, Insertion sort
- Invariants
- Lists
- ArrayList
- LinkedList
- runtime analysis
- Iterators
- Java references

- Thu, Feb 25. Midterm exam 1.

homework 7 assigned, due March 5th, 11:55pm. - Tue, Mar 2. Stacks. Sections 3.1-3.3 in the book.

Presentation- errors
- reasoning about programs
- stacks
- stack ADT

- Tue, Mar 4. Stacks and stack applications. Sections 3.1-3.4 in the book.

Presentation- stack ADT
- method signatures
- array stack implementation
- linked stack implementation
- stack applications
- infix, prefix, and postfix expressions
- StringBuilder

- Tue, Mar 9. Queues. Sections 4.1-4.3 in the book.

Presentation- infix, prefix, and postfix expressions
- StringBuilder
- queues
- queue interface
- queue applications
- queue implementation: array queue

- Thu, Mar 11. Queue applications. Section 4.5 in the book.

Presentation- queue implementation: linked queue
- application of queues and stacks: data structure traversal
- application of queues: simulation of an airline counter
- random numbers
- recursion
- examples of recursion

- Math.random()
- Java Random

- Tue, Mar 23. Recursion. Sections 5-5.3 in the book.

Presentation- examples of recursion
- principles of recursion
- binary search

- Thu, Mar 25. Recursion. Sections 5.4-5.6 in the book.

Presentation- binary search
- recursive printing of integers.

- Tue, Mar 30. Exam review.

Presentation- exam review
- recursion
- binary search
- stacks
- queues
- infix, prefix, and postfix expressions
- random numbers
- runtime analysis

- Thu, Apr 1. Midterm exam 2, on Chapters 3, 4 and 5.
- Tue, Apr 6. Trees and implementation of trees. Sections 6.1 and 6.3 in the book.

Presentation- trees
- binary search trees
- tree traversal

- Thu, Apr 8. Tree traversals. Section 6.2 in the book. Binary Search Trees. Section 6.4 in the book.

Presentation- binary search tree algorithms: add, remove, traverse
- binary node class

- Tue, Apr 13. Huffman Trees.

Presentation- Huffman trees
- Huffman coding
- implementation of Huffman coding

- Thu, Apr 15. Heaps and priority queues. Section 6.5 in the book.

Presentation- review of lambda expressions (from ICS 111)
- heaps
- heap storage in arrays
- heap insertion and removal
- priority queues

- Tue, Apr 20. Hash tables. Sections 7-7.3 in the book.

Presentation- hash tables
- hash functions
- open addressing
- chained hashing

- Thu, Apr 22. Implementation of hash tables. Section 7.4 in the book. Reminder of sorting and quadratic sorting algorithms.

Presentation- open addressing
- chained hashing
- applications of hashing
- reminder: equality and comparisons in Java
- reminder: sorting
- reminder: selection sort
- reminder: bubble sort
- reminder: insertion sort

- Java Comparator interface (method
`compare`) - Java Comparable interface (method
`compareTo`) - Arrays.sort methods for integer arrays.
- sort methods for Collections.

- Tue, Apr 27. Shell Sort, Merge sort. Sections 8.6-8.7 in the book.

Presentation- reminder: equality and comparisons in Java
- reminder: sorting
- reminder: selection sort
- reminder: bubble sort
- reminder: insertion sort
- Shell sort
- merge sort

- an example of mergesort
- wikipedia page for Donald Shell

- Thu, Apr 29. Heap sort, Quick sort. Sections 8.8-8.10 in the book.

Presentation- merge sort
- heap sort
- quick sort

- an example of heapsort
- an example of quicksort
- dancing sort videos

- Tue, May 4. Course review.

Presentation- exam 1 material: Java, ADTs, linked lists, run-time big-O, objects, references and pointers, iterators, invariants
- exam 2 material: generic types and container classes, stacks, queues, recursion, binary search
- binary trees, binary search trees, tree traversal, heaps, huffman coding, priority queues, hashing,
- sorting: insertion, selection, bubble, mergesort, heapsort, quicksort

The final exam for this class is scheduled for Tuesday May 11th, from 9:45am to 11:45am. The exam is on the material in the entire course, with some emphasis on the material since exam 2.

Anyone wishing to take the final exam early please contact the instructor before May 5th.