Schedule
This page is a schedule of topics and readings. Lecture notes will posted sometime following each lecture, but please remember that the notes are a supplement to, not a replacement for, attending class and taking your own notes.
Assignments and due dates are listed separately.
Introduction and Java review
September 6 Tue
Topics:
- course overview
- computers and memory
- variables and values
- primitive types
- arrays
- scope
- the (call) stack
Suggested reading:
- Sestoft, pages 1–8
- Downey and Mayfield, chapters 1, 2, 4
- Niemeyer and Leuck, chapters 1 and 4 (focus on subheadings related to the topics above)
- the A Closer Look at the “Hello World!” Application lesson
- the Language Basics lesson
September 8 Thu
Topics:
- expressions, statements, and blocks
- control flow constructs in Java
Suggested reading:
- Sestoft, chapters 11 and 12
- Downey and Mayfield, chapters 5 (first half), 6, 7
- Niemeyer and Leuck, chapter 4 (focus on subheadings related to the topics above)
- the Language Basics lesson
September 13 Tue
Topics:
- methods
- classes and objects
- aliasing
Suggested reading:
- Sestoft, chapter 9
- Downey and Mayfield, chapters 4, 6, 10, 11
- Niemeyer and Leuck, chapter 4 and 5
- the Classes and Objects lesson
September 15 Thu
Topics:
- namespaces
- packages
- the CLASSPATH / build path
Suggested reading:
- Sestoft, chapters 16 and 17
- Niemeyer and Leuck, chapter 6
- the Packages lesson
September 20 Tue, 22 Thu
Topics:
- containers: arrays and lists
Suggested reading:
- the Arrays trail
- the List interface
- Downey and Mayfield, chapters 8, 12
- Niemeyer and Leuck, chapter 4 (section on arrays), 8 (first few sections)
- Sestoft, chapter 22 section 2
Lists
September 27 Tue
Topics:
- generics and Java containers
- working with lists
Suggested Reading:
- the Generics lesson
- the List interface
- the List
docs - Java doc for wrapper types, such as
java.lang.Integer
- Niemeyer and Leuck, chapter 8 (first few sections)
- Sestoft, chapter 21
September 29 Thu
Topics:
- quiz review
- implementing important support methods (
toString
,equals
,compareTo
) - comparators
Suggested Reading:
- Java doc for
Object
,Comparable
,Comparator
- Sestoft, chapter 22.9, 22.10
- How to Write an Equality Method in Java (Only read this if you want to start going down the rabbit hole. Odersky is a developer of Scala, a language you’ll use in COMPSCI 220.)
Sets
October 04 Tue
Topics:
- introduction to sets
- the
Set
abstract data type HashSet
and hash tables
Suggested Reading:
- https://en.wikipedia.org/wiki/Set_(mathematics)
- https://en.wikipedia.org/wiki/Venn_diagram
- Sestoft, chapter 22.3
- http://docs.oracle.com/javase/8//docs/api/java/util/Set.html
- http://docs.oracle.com/javase/8//docs/api/java/util/HashSet.html
hashCode
October 06 Tue
Topics:
- more on
HashSet
s - trees (and an introduction to graphs)
- binary search trees
TreeSet
Suggested Reading:
- https://en.wikipedia.org/wiki/Binary_search_tree
- https://en.wikipedia.org/wiki/Tree_(graph_theory)
- https://en.wikipedia.org/wiki/Graph_(discrete_mathematics)
- https://docs.oracle.com/javase/8/docs/api/java/util/TreeSet.html
- Sestoft, chapter 22.9
Maps
October 13 Thu
Topics:
- Santa’s little helper
- the Map ADT
- Java’s
Map
interface (andHashMap
implementation)
Suggested Reading:
- https://en.wikipedia.org/wiki/Associative_array
- http://docs.oracle.com/javase/tutorial/collections/interfaces/map.html
- https://docs.oracle.com/javase/8/docs/api/java/util/Map.html
- https://docs.oracle.com/javase/8/docs/api/java/util/HashMap.html
- Sestoft, chapter 22.5
October 18 Tue
Topics:
- Another worked
Map
example: anagrams BufferedReader
for reading lines from a file
Suggested Reading:
- https://docs.oracle.com/javase/8/docs/api/java/io/BufferedReader.html
- Character encoding, how hard can it be?
- http://utf8everywhere.org/
October 20 Thu
(No meeting)
Algorithms
October 25 Tue
Topics:
- MAP review
- Project 7 Q+A
- Introduction to running time
October 27 Thu
Topics:
- linear vs quadratic
- early escape from loops
- binary search and log_2 time
Suggested Reading:
- https://en.wikipedia.org/wiki/Analysis_of_algorithms
- https://en.wikipedia.org/wiki/Time_complexity
- Downey and Mayfield, chapter 12.8–12.10
November 01 Tue
Topics:
- more on runtime
- sorting
- selection sort, bubble sort, insertion sort
Suggested Reading:
- https://en.wikipedia.org/wiki/Sorting_algorithm
- https://www.toptal.com/developers/sorting-algorithms
Graphs and Search
November 03 Thu
Topics:
- graphs and graph terminology
- introduction to graph search
Suggested Reading:
- https://en.wikipedia.org/wiki/Binary_search_tree
- https://en.wikipedia.org/wiki/Tree_(graph_theory)
- https://en.wikipedia.org/wiki/Graph_(discrete_mathematics)
November 08 Tue
Topics:
- graph implementations
- search in graphs
Suggested Reading:
- Open Data Structures, Java Edition, chapter 12
- https://en.wikipedia.org/wiki/Breadth-first_search
- https://en.wikipedia.org/wiki/Depth-first_search
- https://en.wikipedia.org/wiki/Adjacency_matrix
- https://en.wikipedia.org/wiki/Adjacency_list
November 10 Thu
Topics:
- finding paths in graphs
- BFS, DFS, and the search tree
- “greedy” search and priority queues
- A*
Suggested Reading:
- Grids and Graphs
- Introduction to A* (also includes information on BFS and greedy BFS)
- http://docs.oracle.com/javase/8/docs/api/java/util/Queue.html
- http://docs.oracle.com/javase/8/docs/api/java/util/Stack.html
- http://docs.oracle.com/javase/8/docs/api/java/util/PriorityQueue.html
Implementation notes
November 15 Tue
Topics:
- linear data structures, general and specialized (lists, stacks, queues, deques, priority queues)
November 17 Thu
Topics:
- implementing an array-based stack
- implementing a linked-list-based stack
Suggested Reading:
- http://docs.oracle.com/javase/8/docs/api/java/util/Stack.html
- https://en.wikipedia.org/wiki/Scotch_egg
- https://en.wikipedia.org/wiki/Rocky_Mountain_oysters
November 29 Tue
Topics:
- implementing a linked-list-based queue
- implementing an array-based queue
Tools and Testing
December 01 Thu
Topics:
- building Tic-Tac-Toe
- writing JUnit tests
- debugging in Eclipse
December 06 Tue
Topics:
- building War
- reasoning about test cases
- constructing programmatic test cases
Intro to Recursion
December 08 Thu
Topics:
- recursion, baby steps only!
Wrap-up
December 13 Tue
- course review
- wrap-up
- questions and answers
- enthusiastic applause is mandatory for passing
- as is filling out your SRTI
- just kidding about the SRTI thing
- I can’t believe you actually read all of this, you maniac!
Final Exam
Our exam is scheduled for:
12/22/2016
Thursday
3:30–5:30pm
Hasbrouck Lab Addition, room 126
A review is available.
Please note (from the Academic Rules and Regulations):
…it is University policy not to require students to take more than two final examinations in one day of the final examination period. If any student is scheduled to take three examinations on the same day, the faculty member running the chronologically middle examination is required to offer a make-up examination if the student notifies the instructor of the conflict at least two weeks prior to the time the examination is scheduled. The student must provide proof of the conflict. This may be obtained from the Registrar’s Office, 213 Whitmore.