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.

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

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

LECTURE DAY TOPICS NOTES/ETc READING
1 Introduction
Types
1/23 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
1/28 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 files L03Demo.zip
Chap 1
App A



3 Fields and conse-quences thereof

JUnit testing
1/30 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)
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

2/4 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
mp4 video (Ken Birman, a year ago):
Software Engineering
5 Local variables
Inside-out rule
Constructors

2/6 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)
demo14feb07.zip
Chapter 3
Recitation 02: Packages, char and Character, Strings    6up,   pptx   demoJava
6 Static/dynamic types and consequences thereof
2/11 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
2/13 Recursive programs
Stack frames and recursive calls
Lecture Notes (pdf)
Lecture Notes (pptx)
Lecture Notes (6up)
Practice Recursion questions
Power.java
HanoiRecursive.java HanoiIterative.java
Chapter 10
Recitation 03: Abstract classes and interfaces    6up, pptx, shape classes, shape classes simplified
  February Break 2/18
8 Parsing


2/20 Grammars
Parsing
Lecture Notes (pdf)
Lecture Notes (pptx)
Lecture Notes (6-up)
SimpleExpression.java
SimpleExpression_
CodeGenerator.java

RealExpParser (Brief explanation and code for a parser for arith exps that gives precedence to */ over +-)
Appendix B
No recitation (February Break)
9 Lists
2/25 Abstract Data Types
Singly-linked lists
Building and searching
Insertion and deletion
Stacks
Lecture Notes
Lecture Notes (pptx)
Lecture Notes (6up)
Real-life examples
CS2110Stacks.zip
Chapters 4-7
10 Trees
2/27 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
Recitation 04. 2-D arrays, Exception handling   pdf   pptx   Video on exception handling
11 Searching and Asymptotic Complexity
3/4 Linear vs Binary Search
Runtime analysis
Big-O
Worst-case and expected-case
Lecture Notes
Lecture Notes (pptx)
Lecture Notes (6up)
searchSortAlgorithms.zip
Complexity Exercises
Chapter 16
12 Loop invariants,
Searching,
Sorting
3/6 Loop invariants
Insertion Sort
Selection Sort
Quick Sort
Lecture A: invariants (pdf)
Lecture A: invariants (6up)
Lecture A: invariants (pptx)
Lecture B: sorting (pdf)
Lecture B: sorting (6up)
Lecture B: sorting (pptx)
searchSortAlgorithms.zip
Chapters 11, 12
Recitation 05. Generics, Collection classes, parsing   pdf    pptx    6-up
13 Sorting and Asymptotic Complexity
3/11 Quick sort with log n space
Merge sort
lower bound on comparison sort algorithms
Lecture Notes (pdf)
Lecture Notes (ppt)
Lecture Notes (6up)
Chapters 11, 12
14 GUIS: Graphical User Interfaces --Layout 3/13 Components
Containers
Layout managers
Lecture Notes (pdf)
Lecture Notes (pptx)
Lecture Notes (6up)
GuiDemos.jar (demos for lect 14, 15)
Swing Tutorial
Recitation 06. Hashing zip file with program, ppt, summary
Prelim I. Kennedy, Call Auditorium
Tuesday, 11 March, 5:30-7:00 or 7:30-9:00pm
15 Graphical User Interfaces: Handling events 3/18 Event-driven programming
Java event model
Events
Listeners
Adapters
Lecture Notes (pdf)
Lecture Notes (ppt)
Lecture Notes (6up)
GuiDemos.jar (demos for lect 14, 15)
Swing Tutorial
16 1. Game Trees and Mini-Max
2. Generic Types and Java Collections
3/20 1. Game Trees and Mini-Max
2. Generic types and Java Collections Framework
Lecture Notes
Lecture Notes (ppt)
Lecture Notes (6up)
Chapter 3, 8, 14
Recitation 07. Iterators, Iterable, inner classes ppt   (6-up)     
17 Graphs I

3/25 Graphs
Topological sort
Coloring, Planarity
Lecture Notes
Lecture Notes (pptx)
Lecture Notes (6up)
Chapters 28, 29
18 Graphs II

3/27 Depth-first search (DFS)
Dijkstra's shortest-path algorithm
Lecture Notes (pdf)
Lecture Notes (ppt)
Lecture Notes (6up)
 
Recitation 08. Analysis of algorithms
19 Priority Queues and Heaps
4/8 Priority Queues
Heaps
Lecture Notes
Lecture Notes (pptx)
Lecture Notes (6up)
Chapter 26
20 Inductive proofs

4/10 Induction as a proof technique
How recursive algorithms on graphs give rise to inductive proofs
Lecture Notes (pdf)
Lecture Notes (ppt)
Lecture Notes (6up)
Chapters 28, 29
Recitation 09. I/O    ppt  pdf    pdf-6up    java demo
21 Graphs III
4/15 Review of DFS/BFS; Minimum spanning trees
Prim's algorithm
Kruskal's algorithm
Travelling Salesman Problem
Lecture Notes
Lecture Notes (ppt)
Lecture Notes (6up)
22 Graphs IV
with applications
4/17   Lecture Notes
Lecture Notes (pptx, 40 MB)
Lecture Notes (6up)
 
Recitation 10. Optional, Answer prelim questions, discuss A6
23 Threads I
4/22   Lecture Notes
Lecture Notes (ppt)
Lecture Notes(6up)
 
24 Threads and Concurrency II
4/24 Java threads, priorities
The event dispatch thread
Race conditions and other worries
Locking and synchronization
Lecture Notes
Lecture Notes (pptx)
Lecture Notes (6up)
A6 hints (pptx)
A6 hints (pdf)

 

Online manual pages at java.oracle.com
Recitation 11. Optional. Help with A6
Prelim II. Tuesday, 22 April
Mallot 528 at 5:30. Kennedy, Call Auditorium at 7:30
25 Quantum Computing

4/29 Lecture Notes (pdf)
Lecture Notes (6up)
Lecture Notes (ppt)
 
26 Quantum Computing (contd)
5/1   (see previous)  
Recitation 12. Optional. Help with A6
27 Conclusion: History, Correctness issues, summing up 5/6 A little bit of history can be enlightening! Come one come all to this last lecture. Lecture Notes (pdf)
Lecture Notes (6up)
Lecture Notes (ppt)
 
No recitation this week
Final: Friday, 12 May, 7:00-9:30PM, Barton Hall East and Center