Schedule
This page is a schedule of topics and readings (including lecture notes) and will be updated as the semester progresses.
Java review, testing and debugging
22 Jan
Topics:
- course overview
- computers and memory
- variables and values
- primitive types
- arrays
- scope
- the (call) stack
Suggested reading (This is a lot of reading that I expect you to skim as you need to, and/or to read over several days, not all at once before the first lecture! Later I’ll give less reading but expect you to read it more closely.):
- OpenDSA http://lti.cs.vt.edu/LTI_ruby/Books/COMPSCI186/html/, chapters 1 and 2
- 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
24 Jan
Topics:
- expressions, statements, and blocks
- control flow constructs in Java (
if
/else
;while
;for
)
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
29 Jan
Topics:
- finishing up
for
- developing with Eclipse
- unit tests
Suggested reading:
- Burnette, chapters 1 – 5
- Niemeyer and Leuck, appendix A
- http://tutorials.jenkov.com/java-unit-testing/simple-test.html
31 Jan
04: Developing, continued, and classes, objects, and methods
Code from last class
Topics:
- more on developing with Eclipse
- introduction to the debugger
Suggested reading:
- OpenDSA, chapter 3
- Sestoft, chapter 9
- Downey and Mayfield, chapters 4, 6, 10, 11
- Niemeyer and Leuck, chapter 4 and 5
- the Classes and Objects lesson
04 Feb
Discussion! You’re going to do a POGIL lab to further explore the idea of testing. The code you need to download is here: [Anagrams.zip]; the worksheet will be linked to from Piazza.
05 Feb
05: Aliasing, Namespaces, Packages and the CLASSPATH; Intro to Lists
Topics:
- more on classes/objects
- aliasing
- namespaces
- packages
- the CLASSPATH / build path
- very brief intro to lists
Suggested reading:
- OpenDSA, chapter 4
- Sestoft, chapters 16 and 17
- Niemeyer and Leuck, chapter 6
- the Packages lesson
- 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
The List Abstract Data Type (ADT)
07 Feb
Topics:
- more on list usage
- implementing array-based lists, part 1
Suggested reading (in addition to last class’s):
- OpenDSA, chapter 5
12 Feb
☃️ Snow day! ☃️
14 Feb
Topics:
- implementing array-based lists, part 2
- implementing linked lists
Suggested reading:
- OpenDSA, chapter 6
19 Feb
Discussion! You’re going to do a POGIL lab to further explore the idea of linked structures. The code you may want to download is here: [linked.zip]
21 Feb
08: More linked lists; Generics
Topics:
- finishing up linked lists
- generic lists
- using 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
26 Feb
09: More on using lists; Comparators
Topics:
- another worked example of using lists
- methods that objects must implement to participate in the Collections framework
Comparable
andComparator
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 that’s been used in COMPSCI 220.)
The Set ADT
28 Feb
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
04 Mar
Discussion! The code you need to download is here: [lets-talk-about-sets-baby.zip]; the worksheet will be linked to from Piazza.
05 Mar
Topics:
- more on
HashSet
s - trees (and an introduction to graphs)
- binary search trees
TreeSet
Suggested Reading:
- OpenDSA, chapter 13
- 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
The Map ADT
07 Mar
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
19 Mar
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
- https://docs.oracle.com/javase/tutorial/collections/interfaces/map.html (Multimaps are described about 2/3 down this page)
Introduction to algorithms
25 Mar
Discussion! You’re going to do a POGIL lab to introduce the idea of graphs, search, and their application. We’ll see these next week more formally in lecture, but you’ll get a hands-on introduction today.
Please download and familiarize yourself with: [hex.zip]
26 Mar
14: Introduction to Running Times
Topics:
- Introduction to running time and related concepts
- constant vs linear time
- linear vs quadratic time
- early escape from loops
- binary search and log_2 time
Suggested Reading:
- OpenDSA, Chapter 7
- Downey and Mayfield, chapter 12.8–12.10
- https://en.wikipedia.org/wiki/Analysis_of_algorithms
- https://en.wikipedia.org/wiki/Time_complexity
28 March
Topics:
- more on runtime
- binary search
- sorting
- selection sort, bubble sort
Suggested Reading:
- OpenDSA, Chapter 11
- https://en.wikipedia.org/wiki/Binary_search_algorithm
- https://en.wikipedia.org/wiki/Sorting_algorithm
- https://www.toptal.com/developers/sorting-algorithms
02 April
16: More Sorting; Graphs and Search
Topics:
- insertion sort
- graphs and graph terminology
- introduction to graph search
- finding paths in graphs
Suggested Reading:
- OpenDSA, Chapter 12
- https://en.wikipedia.org/wiki/Binary_search_tree
- https://en.wikipedia.org/wiki/Tree_(graph_theory)
- https://en.wikipedia.org/wiki/Graph_(discrete_mathematics)
- Open Data Structures, Java Edition, chapter 12
- https://en.wikipedia.org/wiki/Breadth-first_search
- http://docs.oracle.com/javase/8/docs/api/java/util/Queue.html
Graphs and search
04 April
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
09 April
Topics:
- graph implementations
Suggested Reading:
Implementing ADTs (Stacks and Queues)
11 April
19: Introducing Stacks and Queues
- linear (and not-so-linear) data structures, general and specialized (lists, stacks, queues, dequeues, priority queues)
- implementing an array-based stack
- implementing a linked-list-based stack
Suggested Reading:
- OpenDSA, Chapter 9
- http://docs.oracle.com/javase/8/docs/api/java/util/Stack.html
16 April
Topics:
- implementing a linked-list-based queue
- implementing an array-based queue
Suggested Reading:
- OpenDSA, Chapter 10
- https://docs.oracle.com/javase/8/docs/api/java/util/Queue.html
Introduction to recursion
18 April
Topics:
- hints for Assignment 12 (War)
- recursion, baby steps only!
Suggested Reading:
- OpenDSA, Chapter 8
- Downey and Mayfield, Chapter 5.8, 6.8–6.10
23 April
Topics:
- more recursion
- binary search trees, again
- tower of hanoi
- bad recursion jokes
- dad recursion jokes
- to make it stop
- if it’s stopped, then stop
- otherwise, make it stop
Course wrap-up
25 April
23: Variety is the spice of life
- Markov Models for random text generation
- Python
- OCaml
30 April
Topics:
- 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
- Final Exam May 03 Fri 3:30pm–5:30pm in Morrill 2 Room 222 (our classroom)
Our exam is scheduled for:
05/03/2019
Friday
3:30–5:30pm
Morrill 2 Room 222