Lectures
CS2110 centers on the twice-weekly lectures. Attendence is required. We may sometimes 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
Last time Professor Birman taught cs2110, he had all his lectures taped. These lectures, from Fall 2010, aren't identical to what we'll do in Spring 2013 (roughly 1/3 of the lectures have changed entirely or been extensively revised), but you might still find them very helpful. We've made them available to watch on a streaming feed located on VideoNote. Log in with your net-id from a machine on the Cornell campus network and then select "group" cs2110. But please don't use the video notes instead of attending lecture: many things have evolved since 2010 and the video lectures are a little bit out of date by now. You might miss important topics if you don't attend class.
Recitations
It is important to attend the weekly recitation sections for cs2110, 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. Recitations start the first week of classes (and yes, that means that for people attending Monday recitations, we will see you in recitation sections before we see you in class on Tuesday!). 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. So please use add/drop if you switch sections.
The weekly recitation notes will be posted below as we finalize them.
CS2111
This is an optional enrichment class, offered as 1-credit S/U, for people who worry 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 in spring of 2013. 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 to the course page for CS2111
Lecture Notes and Readings
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 to own your own copy of the textbook; sharing is fine. You do not need to have access to the e-book; this is a feature Prentice is offering for 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 probably manage quite well with a used copy of the 2nd edition.
LECTURE | DATE | TOPICS | NOTES/EXAMPLES | READING | ||
---|---|---|---|---|---|---|
1 | Introduction. | 1/22 | Course policies and procedures 2110 versus cs111x or cs3110 The new 2111 enrichment course A first glimpse of Java and Eclipse Java data types, type casting The "static" annotation and the "main" method The void type A simple Java program |
Lecture Notes (pdf) Lecture Notes (pptx) Lecture Notes (6up) |
Chapter 1 Appendix A |
|
2 | Types and objects Very simple Java programs |
1/24 | The concept of an object. The idea of an object as an
abstraction Using pictures to help visualizing objects. How objects differ from value types Accessing methods and fields Why "hiding" things can be useful Getter and Setter methods Accessibility modifiers |
Lecture Notes Lecture Notes (pptx) Lecture Notes (6up) Software Article |
Chapter 1 Appendix A Eclipse: Part 1 Eclipse: Part 2 Eclipse: Part 3 |
|
Week one recitation notes | ||||||
3 | Leftover material from lecture 2 Fancier Java features Thinking abstractly and translating abstract ideas into Java code |
1/29 | Brief programming language history Abstract operations and programming as "problem solving." Visual ways of thinking about programs More about Java/OO concepts Tour of the Java API Java tips, tricks, and pitfalls Type hierarchy and subtyping Inheritance Method overriding Debugging |
Lecture Notes Lecture Notes (pptx) Lecture Notes (6up) 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 |
|
4 | Leftover material from lecture 3 Time permitting: Software Design |
1/31 | STop-Down, Bottom-Up Design Software Process (briefly) Modularity Information Hiding, Encapsulation Principles of Least Astonishment and “DRY” Refactoring |
Lecture Notes Lecture Notes (pptx) Lecture Notes (6up) |
Two videos: Debugging Software Engineering |
|
Week two recitation notes | ||||||
5 | Static versus dynamic type checking. Runtime type inference |
2/5 | Static vs dynamic types How Java type-checks expressions What happens when you do a cast |
Lecture Notes Lecture Notes (pptx) Lecture Notes (6up) |
Chapter 3 Video: ArrayLists Interfaces |
|
6 | Testing | 2/7 | JUnit testing The Software Life Cycle Quality Assurance in commercial software |
Lecture Notes Lecture Notes (pptx) Lecture Notes (6up) |
||
Week three recitation notes | ||||||
7 | Recursion | 2/12 | 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 | |
8 | Parsing Exception handlers |
2/14 | Grammars Parsing try/catch clause Biscuit: the animal with the best genes in our A1 data set.... |
Lecture Notes Lecture Notes (pptx) Lecture Notes (6up) SimpleExpression.java SimpleExpressionCodeGenerator.java Video: Exception Handling |
Appendix B | |
Week four recitation notes | ||||||
9 | Lists | 2/19 | Singly-linked lists Building and searching Insertion and deletion Lecture Notes Doubly-linked lists |
Chapters 4-7 | ||
10 | Trees | 2/21 | 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 | |
Week five recitation notes | ||||||
11 | Graphical User Interfaces: Static Ken out of town, lecture by David |
2/26 | Components Containers Layout managers |
Lecture Notes Lecture Notes (pptx) Lecture Notes (6up) guiDemos.zip (demos for lect 11, 12) |
Swing Tutorial | |
12 | Graphical User Interfaces: Dynamics Ken out of town, lecture by David |
2/28 | Event-driven programming Java event model Events Listeners Adapters |
Lecture Notes Lecture Notes (6up) guiDemos.zip (demos for lect 11, 12) |
Swing Tutorial | |
Week six recitation notes | ||||||
13 | Searching and Asymptotic Complexity | 3/5 | 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 | |
14 | Searching | 3/7 | 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 | |
Week seven recitation notes | ||||||
[Thursday, March 7,
2013, 7:30-9:30pm] Prelim I Statler Auditorium. |
||||||
15 | Generic Types and Java Collections | 3/12 | Generic types Java Collections Framework |
Lecture Notes Lecture Notes (pptx) Lecture Notes (6up) |
Chapter 3, 8, 14 | |
16 | Software Design Principles III | 3/14 | 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 |
||
Week eight recitation notes | ||||||
No lecture (Spring Break: March 16-March 24) | ||||||
17 | Standard ADTs | 3/26 | Stacks Queues Dictionaries Hashtables |
Lecture Notes Lecture Notes (pptx) Lecture Notes (6up) |
Chapters 17-22 | |
18 | Priority Queues and Heaps | 3/28 | Priority Queues Heaps |
Lecture Notes Lecture Notes (pptx) Lecture Notes (6up) |
Chapters 23, 24 | |
Week nine recitation (hashing) ppt (6-up) summary HashSetCode.zip | ||||||
19 | Graphs I | 4/2 | Graphs Topological sort Coloring, Planarity DFS BFS |
Lecture Notes Lecture Notes (pptx) Lecture Notes (6up) |
Chapters 28, 29 | |
20 | Inductive proofs Professor Kozen will be giving this lecture. Ken&David out of town. |
4/4 | 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) |
||
Week ten recitation notes | ||||||
21 | Graphs II Lecture by David |
4/9 | Dijkstra's algorithm Minimum spanning trees Prim's algorithm |
Lecture Notes Lecture Notes (pptx) Lecture Notes (6up) Digraph.java |
Chapters 28, 29 | |
22 | Threads and Concurrency I | 4/11 | Java threads, priorities The event dispatch thread Locking and synchronization |
Lecture Notes Lecture Notes (pptx) Lecture Notes (6up) |
Online manual pages at java.oracle.com | |
Week eleven recitation notes | ||||||
23 | Threads and Concurrency II | 4/16 | 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) |
Online manual pages at java.oracle.com | |
[Tuesday, April 16, 2013,
7:30-9:30pm] Prelim II Statler Auditorium |
||||||
24 | Proving correctness of concurrent programs using linearizability, induction | 4/18 | Safety, liveness Linearizability Inductive proofs of deadlock-freedom Bohrbugs, Heisenbugs |
Lecture Notes Lecture Notes (pptx) Lecture Notes (6up) |
||
Week twelve recitation notes and slides | ||||||
25 | The Java Query Language: JQL | 4/23 | A major use of modern OO languages is
to concisely express algorithms on collections Querying collections in Java Multi-collection queries with SelectAll Grouping and Aggregation |
Lecture Notes Lecture Notes (pptx) Lecture Notes (6up) |
||
26 | Using Java to Query databases and other persistent object repositories JPQL | 4/25 | One way to leverage the ideas we saw
in the JQL subset of Java is to link Java to a database. This leads to what people call the "Java Persistence" layer We'll look at one lecture from a series by James Brucker on this important topic. The widely used Java Beans library has extensive support for persistence, but we won't cover it due to a lack of time (it takes a few lectures to understand the ideas behind Java Beans) |
Lecture Notes Lecture notes (ppx) Lecture Notes (6up) |
The online materials maintained by James Brucker are very nicely done. | |
Week thirteen recitation notes | ||||||
27 | Distributed Computing | 4/30 | Ken's Isis2 system uses C# (a Java-like language) for secure, reliable cloud computing. The core idea uses some ideas that are shared with JQL and JPQL, but adapted for uses in a massively scaled cloud computing environment with failures. |
Lecture Notes Lecture Notes (pptx) Lecture Notes (6up) |
||
28 | Quantum Computing | 5/2 | Will quantum computers transform computer science? What could a "quantum object" do? |
Lecture Notes Lecture Notes (pptx) Lecture Notes (6up) |
Brian Green | |
[Fri, May 10, 2013, 2:00 PM - 4:30 PM] Final exam (room TBA) |