Lecture Notes

Readings refer to the course text: Data Structures and Abstractions with Java, 2nd edition by Frank M. Carrano, Prentice Hall, 2007. ISBN 0-13-237045-X. See also the Prentice Hall website for additional material.  Readings are intended to be complementary to the lecture: you can do the reading before class, or after class, but should certainly read the chapter at some point to make sure you fully understand the material.  Exams tend to focus on things we covered in class.

LECTURE DATE TOPICS NOTES/EXAMPLES READING
1 Introduction 1/25 Course policies and procedures.
A motivating application.
Why this course is important!
Slides
Article on Software
15-Puzzle Info
15-Puzzle Proof
15-Puzzle Code
Chapter 1
Appendix A
2 Java Review 1/27 A brief history of PL concepts.
Overview of OOP concepts (objects, instances, inheritance, overloading, overriding, static vs. dynamic binding).
Common Java pitfalls.
Debugging.
Slides
CommandLineArgs.java
Enum.java
Equals.java
FileIO.java
Generics.java
MultiArray.java
Widget.java
ShadowTest.java
ConstructorSuper.java
ConstructorThis.java
SuperMethod.java
Chapter 2
Appendix B
Appendix C
3 Modularity 2/1 Classes and Objects
Information Hiding
Encapsulation
Slides
4 Interfaces and Types 2/3 Interfaces and abstract classes
Types and casting
Dynamic vs. static types
Method dispatch
Slides Chapter 3
5 Recursion 2/8 Recursive functions
Problem solving as search
Stack frame
Stack
Slides
Power.java
Chapter 10
6 Parsing 2/10 Grammars
Parsing
Slides
SimpleExpression.java
SimpleExpressionCodeGenerator.java
7 Software Design 2/15 Top-down vs. bottom-up design
Test-driven Design
Refactoring
JUnit
Debugging
Slides
SmallSet.java
SmallSetTest.java
SmallSetFullException.java
8 Lists 2/17 Singly-linked lists
Building and searching
Insertion and deletion
Doubly-linked lists
Slides
List.java
LinkedListRecursive.java
LinkedListIterative.java
ArrayList.java
ListTest.java
Chapters 4-7
Chapter 15
9 Trees 2/22 General and binary trees
Binary search trees
Tree traversals
Decision trees
Slides
BST.java
BSTTest.java
BSP.jar
Chapters 25-27
10 Asymptotic Complexity 2/24 Linear vs Binary Search
Runtime analysis
Big-O
Worst-case and expected case
Slides
Search.java
SearchTest.java
Chapter 16
11 Sorting 3/1 Insertion Sort
Selection Sort
Merge Sort
Quick Sort
Stable sorting
Lower bound for comparison sorts
Slides
InsertionSort.java
SelectionSort.java
MergeSort.java
QuickSort.java
Sorter.java
SortTest.java
Chapters 11, 12
12 Generic Types and Java Collections 3/8 Formal type parameters
Wildcards
Bounded wildcards
Collections framework
Slides Generic Types Tutorial
Collections Intro and API
13 Designing, Coding, and Documenting 3/10 Contracts (pre- and postconditions)
Pair programming
Duplication of state
Sanity checks and the Java assert statement
The design/code/debug cycle
Javadoc
Error handling
Design Patterns
Slides
Observable.java
Observer.java
ObserverTest.java
TreeNode.java
Visitor.java
VisitorTest.java
14 Graphical User Interfaces (Statics) 3/15 Components
Containers
Layout managers
Slides
Intro.java
Basic1.java
Basic2.java
Calculator.java
ComponentExamples.java
LayoutDemo.java
Statics1.java
Statics2.java
Statics3.java
Swing Tutorial
15 Graphical User Interfaces (Dynamics) 3/17 Event-driven programming
Events
Listeners
Adapters
Slides
Example1.java
ListenerExample1.java
ListenerExample2.java
ListenerExample3.java
AdapterExample.java
Scribble.java
Swing Tutorial
16 Standard ADTs 3/29 Stacks
Queues
Dictionaries
Hashtables
Slides Chapters 17-22
17 Heaps and Priority Queues 3/31 Priority Queues
Heaps
Slides Chapters 23, 24, 28
18 Graphs I 4/5 Graphs
Topological sort
Coloring
DFS
Bipartite Matching
Slides Chapters 30, 31
19 Graphs II 4/7 BFS
Shortest Path
Slides
20 Graphs III 4/12 Spanning Trees
Other graph algorithms
Slides
21 Concurrency 4/14 Java Threads
Locking
Race Conditions
Deadlocks
wait/notify
Slides
22 Induction 4/19 The Induction Principle
Induction and Recursion
Slides
23 Recurrences 4/26 Recurrences
Techniques for Solving Recurrences
Mergesort
Fibonacci Recurrence
Strassen's Algorithm
Slides
24 Java Virtual Machine 4/28 Class file format
Bytecode
Class loading
Object initialization
Method dispatch
Exception handling
Stack inspection
Slides The JVM Specification
25 Wrap-up 5/5 Review
Further directions
Open questions
Slides