Lectures
CS2110 centers on the twice-weekly lectures. Attendance is required. We may have in-class quizzes without prior notice. We often cover material in different ways than what is in the book, and sometimes the material we cover is not covered at all in the textbook..
*Classic* Video Notes
In Fall 2010, Professor Birman taught cs2110, and all his lectures taped. Those lecture, are certainly from the ones in this Fall 2013, but you might still find them helpful. Here they are: VideoNote. Log in with your net-id from a machine on the Cornell campus network and select "group" cs2110. Do not use the video notes instead of attending lecture; many things have evolved since 2010 and the video lectures are out of date. You might miss important topics if you don't attend class.
Recitations
It is important to attend a weekly recitation, which are considered to be part of the required classwork for the course. We often present material in recitation that is required and that won't be covered in the main class. You can switch from recitation to recitation but we like to know which one you are in, in case the University needs to contact you. We added some recitations at a late date; please switch to them if you can to balance out the number of students in each recitation. Use add/drop if you switch sections.
Lecture notes are usually posted the day before the lecture. Please download the lecture notes the evening before a lecture, peruse them to get a sense of what the lecture is about, and then have the lecture notes handy during the lecture (either on paper or on your laptop/tablet). During the lecture, we use not only the ppt slides but also Eclipse, and when we are using Eclipse, it will be useful for you to have the ppt slides to look at.
Weekly recitation notes will be posted below as we finalize them.
CS2111
This 1-credit S/U optional enrichment class is offered for people who are concerned that that CS2110 might move too quickly and would like a bit of additional help understanding the key ideas. David Gries will be teaching it. Students taking cs2111 must ALSO attend the main lectures and a recitation section. CS2111 is not open to students who aren't enrolled in cs2110.
Weekly PDF files for the materials covered in CS2111 are posted on the course CS2111 website.
Course text
Readings refer to the course text: Data Structures and Abstractions with Java, 3rd 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.
You do not need your own copy of the textbook; sharing is fine. You do not need to have access to the e-book; Prentice offers the ebook to people who purchase a new copy, but a used copy of the book is fine. There aren't very many differences between the 2nd and 3rd edition, so you can manage quite well with a used copy of the 2nd edition.
LECTURE | DAY | TOPICS | NOTES/ETc | READING | |
---|---|---|---|---|---|
1 | Introduction Types |
8/29 | Course policies and procedures About the instructors Strong typing in Java |
Lecture Notes (pptx) Lecture Notes (pdf) Lecture Notes (6up) Why software is so bad |
Chap 1 App A Eclipse: Part 1 Eclipse: Part 2 Eclipse: Part 3 |
First day handout | |||||
2 | Objects and classes |
9/3 | An object contains methods It is referenced indirectly Pictures to visualize objects. new-expression Class definition: defines what is in an object of the class Subclasses, superclasses, and inheritance Method (function and procedure) declarations |
Lecture Notes
(pptx) Lecture Notes (pdf) Lecture Notes (6up) Demo file C.java |
Chap 1 App A |
3 | Fields and conse-quences thereof JUnit testing |
9/5 | Field: variable that appears in objects of a class Class invariant: collection of meanings of and constraints on fields Getter and setter methods Purpose of a constructor: Initialize fields of a new object to make class invariant true JUnit testing |
Lecture
Notes (pptx) Lecture Notes (pdf) Lecture Notes (6up) L03Demo.zip (Time/TImeTester) Assignment A1 (pdf) |
Chap 2 App B |
Recitation 01: basicJavaEclipse.pdf ppt slides (6up) Eclipse: Part 1 Eclipse: Part 2 Eclipse: Part 3 | |||||
4 | Superclass Object and consequences thereof Class hierarchy static components |
9/10 | Superclass Object function toString and overriding a method static variables and methods Java application |
Lecture Notes (pptx) Lecture Notes (pdf) Lecture Notes (6up) W.java |
Two videos: Debugging Software Engineering |
5 | Local variables Inside-out rule Constructors |
9/12 | Local var: var declared in method body inside-out and bottom-up rules show how to determine what a name references Constructors in subclasses |
Lecture
Notes (pptx) Lecture Notes (pdf) Lecture Notes (6up) demo13sep12.zip Assignment 2 (pdf) DoublyLinkedList.java |
Chapter 3 |
Recitation 02: Packages, char and Character, Strings 6up, ppt | |||||
6 | Static/dynamic types and consequences thereof | 9/17 | static type of variable: type with which it is declared dynamic type: type of object currently in variable Operator instanceof function equals |
Lecture Notes (pptx) Lecture Notes (pdf) Lecture Notes (6up) |
|
7 | Recursion | 9/19 | Recursive programs Stack frames and recursive calls The induction principle |
Lecture Notes Lecture Notes (pptx) Lecture Notes (6up) Power.java HanoiRecursive.java HanoiIterative.java |
Chapter 10 |
Recitation 03: Abstract classes and interfaces 6up, pptx, shape classes, shape classes simplified | |||||
8 | Parsing Exception handlers |
9/24 | Grammars Parsing try/catch clause |
Lecture Notes Lecture Notes (pptx) Lecture Notes (6up) SimpleExpression.java SimpleExpression_ CodeGenerator.java RealExpParser (Brief explanation and code for a parser for arith exps that gives precedence to */ over +-) |
Appendix B |
9 | Lists | 9/26 | Singly-linked lists Building and searching Insertion and deletion Doubly-linked lists |
Lecture Notes Lecture Notes (pptx) Lecture Notes (6up) CS2110Stacks.zip |
Chapters 4-7 |
Recitation 4. 2-D arrays, Exception handling 6up pptx Video on exception handling | |||||
10 | Trees | 10/1 | Tree implementations Binary Search Trees (BSTs) Tree traversals |
Lecture Notes Lecture Notes (pptx) Lecture Notes (6up) BST.java BSTTest.java BSP.jar |
Chapters 25-27 |
11 | Graphical User Interfaces: Layout | 10/3 | Components Containers Layout managers |
Lecture Notes Lecture Notes (pptx) Lecture Notes (6up) GuiDemos.jar (demos for lect 11, 12) |
Swing Tutorial |
Recitation 5. Generics, Collection classes, parsing pdf pptx 6-up | |||||
12 | Graphical User Interfaces: Dynamics | 10/8 | Event-driven programming Java event model Events Listeners Adapters |
Lecture Notes Lecture Notes (ppt) Lecture Notes (6up) GuiDemos.jar (demos for lect 11, 12) |
Swing Tutorial |
13 | Searching and Asymptotic Complexity | 10/10 | Linear vs Binary Search Runtime analysis Big-O Worst-case and expected-case |
Lecture Notes Lecture Notes (pptx) Lecture Notes (6up) searchSortAlgorithms.zip |
Chapter 16 |
Recitation 6. Optional. Review for Prelim | |||||
[Thursday, October 10,
2013, 7:30-9:30pm] Prelim I Statler Auditorium. |
|||||
No Lecture October 15 (Fall break) | |||||
14 | Searching | 10/17 | Insertion Sort Selection Sort Merge Sort Quick Sort Stable sorting Lower bound for comparison sorts |
Lecture Notes Lecture Notes (pptx) Lecture Notes (6up) searchSortAlgorithms.zip |
Chapters 11, 12 |
No recitation in week 7 | |||||
15 | Generic Types and Java Collections | 10/22 | Generic types Java Collections Framework |
Lecture Notes Lecture Notes (pptx) Lecture Notes (6up) |
Chapter 3, 8, 14 |
16 | Software Design Principles III | 10/24 | 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 |
Lecture Notes
Lecture Notes (pptx) Lecture Notes (6up) Observable.java Observer.java ObserverTest.java TreeNode.java Visitor.java VisitorTest.java |
|
Recitation 8 Hashing zip file with program, ppt, summary | |||||
17 | Standard ADTs | 10/29 | Stacks Queues Dictionaries Hashtables |
Lecture Notes Lecture Notes (pptx) Lecture Notes (6up) |
Chapters 17-22 |
18 | Priority Queues and Heaps | 10/31 | Priority Queues Heaps |
Lecture Notes Lecture Notes (pptx) Lecture Notes (6up) |
Chapters 23, 24 |
Recitation 9 Iterators, Iterable, inner classes ppt (6-up) | |||||
19 | Graphs I Lecture by David |
11/5 | Graphs Topological sort Coloring, Planarity DFS BFS |
Lecture Notes Lecture Notes (pptx) Lecture Notes (6up) |
Chapters 28, 29 |
20 | Graphs II | 11/7 | Dijkstra's algorithm |
Lecture Notes Lecture Notes (pptx) Lecture Notes (6up) Digraph.java |
|
Recitation 10. Analysis of algorithms | |||||
21 | Inductive proofs | 11/12 | Induction as a proof technique How recursive algorithms on graphs give rise to inductive proofs Why is induction not just a synonym for recursion? |
Lecture Notes Lecture Notes (pptx) Lecture Notes (6up) |
Chapters 28, 29 |
22 | Graphs III Intro to Threads and Concurrency I |
11/14 | Part I: Minimum spanning trees Prim's algorithm Kruskal's algorithm Travelling Salesman Problem Introduction to threads Background: Why threads? Concept: What "is" a thread? |
Lecture Notes Lecture Notes (pptx) Lecture Notes (6up) |
Online manual pages at java.oracle.com |
Recitation 11. I/O pdf java demo | |||||
23 | Threads and Concurrency II | 11/19 | Java threads, priorities The event dispatch thread Race conditions and other worries Semaphore Objects Locking and synchronization |
Lecture Notes Lecture Notes (pptx) Lecture Notes (6up) |
Online manual pages at java.oracle.com |
24 | Threads and Concurrency III | 11/21 | Deadlock, Livelock, Priority
Inversion Producer/consumer and bounded buffer example Hardware update ordering concerns Dangers associated with the Java "Lock" objects |
Lecture Notes Lecture Notes (pptx) Lecture Notes (6up) |
|
[Thursday, November 21, 7:30-9:30pm] Prelim II | |||||
25 | Proving correctness of concurrent programs using linearizability, induction | 11/26 | Safety, liveness Linearizability Inductive proofs of deadlock-freedom Bohrbugs, Heisenbugs |
Lecture Notes Lecture Notes (pptx) Lecture Notes (6up) |
|
Thanksgiving Break (Nov 27-Dec 2) | |||||
26 | Cloud Computing | 12/3 | Modern computer systems, like the ones used at Facebook, run on what we call "cloud computing" infrastructures. We'll look at how Facebook manages to retrieve photos so rapidly and then discuss Isis2, Ken's new software library for high assurance cloud computing. |
Lecture Notes Lecture Notes (pptx) Lecture Notes (6up) |
Isis2.codeplex.com |
27 | Quantum Computing | 12/5 | Will quantum computers transform computer science? What could a "quantum object" do? |
Lecture Notes Lecture Notes (pptx) Lecture Notes (6up) |
Our Mathematical Universe: My Quest for the
Ultimate Nature of Reality [Max Tegmark] Brian Green A Blueprint for Building a Quantum Computer |
Week 14 recitation notes and slides | |||||
[TBD] Final exam (room TBA) |