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.


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 but not covered in the main lectures. 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. Lectures that have not been changed from last semester yet are marked "old".

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 belowas we finalize them.


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 are notenrolled 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.

1 8/26 Course policies/procedures.
Java strong typing
Lecture Notes (pptx)    (pdf)   (pdf 6-up)
Why software is so bad

First day handout
Chap 1
App A
Eclipse: Part 1
Eclipse: Part 2
Eclipse: Part 3
Recitation 01: basicJavaEclipse.pdf     ppt slides (6up)    Eclipse: Part 1   Eclipse: Part 2   Eclipse: Part 3
2 8/28
OO: Objects and classes
Lecture Notes (pptx)   (pdf)   (pdf 6-up) Chap 1
App A
3 9/2
OO: Fields and consequences thereof. JUnit testing
Lecture Notes (pptx)    (pdf)   (pdf 6-up)
demoFields.zip (Time/TimeTester)
Chap 2
App B
Recitation 02: Packages, char and Character, Strings   6up,   pptx   demoJava
4 9/4
OO: The class hierarchy

Static components
Lecture Notes (pptx)    (pdf)   (pdf 6-up)

Object hierarchy example: Minecraft code (javadoc)(src) from Minecraft Coder Pack (MCP).
mp4 video (Ken Birman, a year ago):
Software Engineering
5 9/9

OO: Inside-out and bottom-up rules, local vars, constructors
Lecture Notes (pptx)    (pdf)   (pdf 6-up)
Chapter 3
Recitation 03. 2-D arrays, Exception handling    (pptx)    (pdf-6up)
6 9/11
OO: Type of variable and consequences thereof. instanceof
Lecture Notes (pptx)   (pdf)   (pdf 6-up)

7 9/16
Lecture Notes (pptx)    (pdf)   (pdf 6-up)
Practice Recursion questions
D.java (demo during class)
Power.java (See the difference between the linear and logarithmic versions)
Chapter 10
Recitation 04: Abstract classes and interfaces   (pptx)   (pdf-6up)    shape classes     shape classes simplified
8 9/18
Loop invariants
Lecture Notes (pptx)    (pdf)   (pdf 6-up)
Appendix B
9 9/23
Asymptotic complexity
Lecture Notes (pptx)    (pdf)   (pdf 6-up)
Chapters 4-7
Recitation 05. Generics, Collection classes    (pptx)        (pdf 6-up)
10 9/25
Abstract Data Types:
Lists, trees
Lecture Notes (pptx)    (pdf)   (pdf 6-up)
BSP.jar CS2110Stacks.zip
Chapters 25-27
11 9/30
Asymptotic complexity
Completion of sorting
Lecture Notes (pptx)    (pdf)   (pdf 6-up)
searchSortAlgorithms.zip   Complexity exercises (we will revise this soon)
Chapter 16
Recitation 06. Loop invariants, the four loopy questions  
12 10/2
Cancelled Because of CS dept 50th anniversary celebrations
Chapter 16
Prelim 1. 2 October, 5:30-7:00 or 7:30-9:00
13 10/7
Generic types
Java Collections Framework
Lecture Notes (ppt)    (pdf)  (pdf 6-up)
Chapters 11, 12
Recitation 07. Discussion of assignment A4
14 10/9 GUIs: Laying out components Lecture Notes (pptx)    (pdf)   (pdf 6-up)
GuiDemos.zip (demos for GUIs)
Swing Tutorial
Fall Break No lecture or recitation on Tuesday/Wednesday Chapters 11, 12
15 10/16 GUIs: handling events Lecture Notes (ppt)    (pdf)    (pdf 6-up)
GuiDemos.zip (demos for GUIs)
Swing Tutorial
16 10/21 Priority Queues
Lecture Notes (pptx)    (pdf)   (pdf 6-up)  
Recitation 08. Hashing    (ppt)    (pdf)    (summary)    (HashSet.java)    (HashSetTester.java)
17 10/23 Graphs I:
Topological sort, Coloring, Planar graphs, Bipartite graphs
Lecture Notes (ppt)    (pdf)   (pdf 6-up) Chapters 28 & 29
18 10/28
Graphs II:
Lecture Notes (pptx)    (pdf)   (pdf 6-up)
Notes on A4 and programming: (pptx)    (pdf)    (pdf 6-up)

Recitation 09. Nested casses, inner classes, Iterator, and Iterable    (pptx)    (HashSet.java)    (HashSetTester.java)
19 11/30

Graphs III: Dijkstra's shortest-path algorithm
Lecture Notes (pptx)    (pdf)   (pdf 6-up)  
20 11/4

Graphs IV: Spanning trees, etc. Lecture Notes (ppt)    (pdf)   (pdf 6-up)  
Recitation 10. IO (input/output)    (pptx)    (demo zip)
21 11/6
Grammars, trees, parsing Lecture Notes (ppt)    (pdf)   (pdf 6-up)
java for expression trees (zip)
22 11/11
Mathematical Induction Lecture Notes (pptx)    (pdf)   (pdf 6-up)  
Recitation. Analysis of algorithms (pptx)   (pdf 6-up)
23 11/13
Techniques for Solving Recurrences
Fibonacci Recurrence
Strassen's Algorithm
Lecture Notes (pdf) "Master method"
24 11/18 A6 and Intro to Threads Lecture notes (pptx)   (pdf)    (pdf 6-up)
Recitation 12. Review Q&A for prelim 2
25 11/20
Prelim 2. 20 November, 5:30-7:00 or 7:30-9:00
26 11/25
Race Conditions and Synchronization
Lecture Notes (ppt)  (pdf)  (pdf 6-up)  (SummationJob.java)
Java Lesson: Concurrency (up to wait/notify in Guarded Blocks)
No recitation this week
Thanksgiving Break  
27 12/2 Research Research  
Recitation 13.
28 12/4 Conclusion Lecture Notes (ppt)    (pdf)   (pdf 6-up)  
Final ?