This page summarizes the lectures and mentions the suggested reading assignments.
This summary is quite brief, and its intention is to help the student and
instructor recollect what was covered. It is no substitute for participating
in the lectures.
- Lecture 1: An introduction to a program in Java, and how to create
a java application project in the netBeans IDE via the
hello world program.
A discussion of primitive types.
- Lecture 2: packages, classes, instance variables and methods, static methods, and
objects, and the syntactic structure of a program in Java via
- Lecture 3: Array declaration, creation, arrays are objects idea, syntax of for, while,
and if-else constructs, instantiation of inputs to method calls via
this program. Also a discussion of
reading input from the standard input, from Section 1.6 of the text,
and this program.
- Reading assignment for Week 1: First chapter of textbook.
- Lecture 1: Completion of discussion on previous example.
An introduction to inheritence and polymorphism via
- Lecture 2: Completing the discussion of above program.
- Reading: An overview of Section 2.1, followed by a thorough understanding of 2.2.
- Lecture 1: We continue on inheritence and polymorphism via an example that is basically from Section 2.2 of the text.
- Lecture 2: Finishing the example. The keywords this and
- Lecture 3: A class for storing a multi-set of words, implemented using arrays. (Please note that this class has not
yet been tested, nor has it been made robust to exceptional input.) Part of the purpose of this class
is to show how to work with arrays. This material corresponds to Section
3.1 of the text, although we use an example that is different.
- Reading: Section 3.1.
- Lecture 1: Finishing the above example.
- Lecture 2: An introduction to singly linked lists (Section 3.2). We will
look at stuff similar to
- Lecture 3: Completion of the above example.
- Reading: Section 3.1 and 3.2
- Lecture 1: A discussion of recursion, based mainly on Section 3.5
from the book.
- Lecture 2: More recursion examples.
- Lecture 3: Beginning Chapter 4 with the notion of primitive operations
from Section 4.2. Counting the number of primitive operations.
- Reading: Section 3.5
- Lecture 1: More on counting the number of primitive operations. We'll
mostly use our WordBag class to talk about this, but the material
corresponds in general to Section 4.2.
- Lecture 2: Midterm.
- Lecture 3: Big-Oh notation to express upper bounds on worst case running time. Examples demonstrating how to show one function is big-Oh of another. The use of limits from Calculus for this.
- Reading: Section 4.2, plus a quick read of Section 4.1.
- Lecture 1: Using our analysis tools to guide algorithm/data structure
design -- the prefix averages example.
- Lecture 2: Using our analysis tools to guide algorithm/data structure
design -- the example of determining if an array has unique entries.
- Lecture 3: Introducing the logarithm function. The Stack ADT, interface, and array based implementation -- from Chapter 5.
- Lecture 1: An array based stack implementation --
a first non-generic version
- Lecture 2: Casting. The use of generic interfaces and classes.
- Lecture 3: Making the stack class generic. Implementing the Queue ADT
using circular arrays and Homework 5.
- Reading: Sections 2.4 and 2.5 on interfaces, casting, and generics.
Section 5.1 on array-based stack implementation.
This week's material is based on Chapter 6. We will initially focus on material
from Section 6.1. For this initial part,
the unit "Some Course Notes" within the "content" section of our icon page contains some useful notes from another book. We will later cover the material from
Section 6.2 of the book, "Node Lists".
- Lecture 1: The Collection and List interfaces in Java. The classes
ArrayList and LinkedList that implement these interfaces.
- Lecture 2: Running time of ArrayList and LinkedList methods. Exploration of practical run time through this.
- Lecture 3: More of the same theme. The PositionList ADT from Section 6.2.
- Reading: Sections 5.2 and 6.1.
Please note: Week 9 actually did not follow the initial plan -- we did not
cover material from Sections 6.3 and 6.4 yet. We will do so this week after
wrapping up material from Section 6.2.
- Lecture 1: The NodePositionList class from Section 6.2. The code in
the textbook can be found here.
- Lecture 2: Iterators from Section 6.3. Matt's examples can be found
- Lecture 3: A quick review of iterators. The Iterator,
iterable, and ListIterator interfaces, and how
they are incorporated into the Collection and
List interfaces. How the NodePositionList class
in Section 6.2 implements its iterator method.
- Reading: Sections 6.2, 6.3, and 6.4.1.
- Lecture 1: Continued: How the NodePositionList class
in Section 6.2 implements its iterator method. Developing
a method for removing even numbers from a list of integers.
Information regarding Midterm 2. The Map interface from
- Midterm 2.
- Lecture 3: How to use a HashMap to solve the element uniqueness
problem. A study of how hash tables (used by HashMap) work to
make this efficient.
- Lecture 1: More on element uniqueness using HashMaps. The MAP ADT,
hash functions -- hashcode and compression functions. This is all
from Sections 9.1 and 9.2. You may find the textbook slides on
maps and hashtables to be a useful summary of the stuff we discuss.
These are posted within the content section of ICON.
- Lecture 2: hashcode and compression functions.
- Lecture 3: Trees from Chapter 7. Slides from textbook are within
the content section of ICON.
- Lecture 1: The tree interface from Section 7.1. Using methods of
this interface for tree
traversal -- algorithms for computing depth and height from Section
- Lecture 2: pre and post order traversals.
- Lecture 3: Representing (Storing) trees and binary trees using linked
structures. Representing binary trees using arrays. We use this idea
in the context of heaps. Slides from textbook used in Lectures 2 and 3
are in content section of ICON.
- Reading: Relevant portions of Chapter 7.
- Lecture 1: Priority Queue ADT, and ideas for a heap-based implementation.
- Lecture 2: Code, available as part of Homework 9. A discussion of
how we can any set of totally ordered keys.
- Lecture 3: Running times, and making the priority queue adaptable.
The ordered map ADT from Section 9.3.
- Reading: Chapter 8.
- Lecture 1: The ordered map ADT from Section 9.3, binary search trees
from Section 10.1.
- Lecture 2: AVL trees from Section 10.2.
- Lecture 3: Conclusions.
- Reading: Sectiona 10.1 and 10.2.