CS 261: Computer Science II  (Fall 2019)

Instructor: David Chiu
Meeting Time: MWF 11:00-11:50 in TH 399 and Tue 10:00-11:50 in TH 409
Office: Thompson Hall 390 B
Office Hours: Open door, or by appointment
Tutoring: TBD
Canvas: canvas.pugetsound.edu

Syllabus

The course syllabus contains general information on course topics, grading procedures, and classroom policies.

Textbook

  • Koffman and Wolfgang. Data Structures: Abstraction and Design Using Java. 2nd edition or higher. (Required)

Homework Assignments

Labs

Course Schedule (Tentative)


Week 1 (Reading: Chap 10 in BlueJ [Link])

Mon 09/02Tue 09/03
Lab 1 due
Wed 09/04Fri 09/06 Resources

Labor Day (No Class)


Introductions and Review Lab


Inheritance: motivation, abstraction
[Notes]


Inheritance (cont.): this(), super(), adding Goats
[Notes]


Code: Better Farm

Week 2 (Reading: Chap 11 in BlueJ [Link])

Mon 09/09Tue 09/10
Lab 2 due
Wed 09/11Fri 09/13
Hwk 1 due
Resources

Polymorphism: variables as boxes; the Object class
[Notes]


(Inheritance Lab)


Lab review; the Object class, instanceof, down-casting, method overriding
[Notes]


Polymorphism: dynamic method dispatch
[Notes]


Code: Method Dispatch

Week 3 (Reading: Chap 12 in BlueJ [Link])

Mon 09/16Tue 09/17
Lab 3 due
Wed 09/18Fri 09/20 Resources

Abstract classes
[Notes]


(Abstract Class Lab)


Interfaces and implements; ternary operator
[Notes]


Multiple implementation, Comparable<T>
[Notes]


Code: ShapesManager
Code: Controllable Interface

Week 4 (Reading: Chap 2.1 in K&W)

Mon 09/23Tue 09/24
Lab 4 due
Wed 09/25
Hwk 2 due
Fri 09/27 Resources

Finish Comparable LibraryBook; Start exceptions
[Notes]


(Interface Lab)


Exceptions: throwing, catching
[Notes]


Exceptions: checked vs. unchecked, customization
[Notes]


Code: Exception

Week 5 (Reading: Chap 2.2-2.4)

Mon 09/30Tue 10/01
Lab 5 due
Wed 10/02Fri 10/04 Resources

Algorithm analysis
[Notes]


(Exception Lab)


Big-O (cont.)
[Notes]


Big-O (cont.)
[Notes]



Week 6 (Reading: Chap 2.5-end)

Mon 10/07Tue 10/08Wed 10/09
Hwk 3 due
Fri 10/11 Resources

Review


Midterm Exam I


Binary search; finish Big-O


Lists: List interface, ArrayList: add(), rellocation
[Notes]


Review Guide 1
Code: Pair (Generics)
Code: MyArrayList

Week 7 (Reading: Chap 4.1-4.4)

Mon 10/14Tue 10/15
Lab 6 due
Wed 10/16Fri 10/18 Resources

ArrayList (cont.): remove(), indexOf(), supporting generics
[Notes]


(ArrayList and Generics lab)


Linked list: Inner classes; get(), set()
[Notes]


Linked list: set(), indexOf(), add()
[Notes]


Code: SinglyLinkedList

Week 8 (Reading: Chap 4.5-4.7. Start Chap 5.1-5.2)

Mon 10/21Tue 10/22Wed 10/23Fri 10/25
Hwk 4 due
Resources

Fall Break


Fall Break


Linked list optimizations (tail, iterator)


Stack
[Notes]


Code: MyStack
Code: Stack Examples

Week 9 (Reading: Chap 5.3-5.5; Start Chap 6.1-6.3)

Mon 10/28Tue 10/29
Lab 7 due
Wed 10/30Fri 11/01 Resources

Stack (cont.): Dijkstra's 2-Stack Algo; Start Queues
[Notes]


(Queue/Stack Lab)


Start PriorityQueue; Dijkstra's SSSP
[Notes]


Finish PriorityQueue; Start Recursion: setup and tracing


Code: MyQueue
Code: PriorityQueue (Naive)

Week 10 (Reading: Chap 6.2, 6.4)

Mon 11/04Tue 11/05
Lab 8 due
Wed 11/06Fri 11/08
Hwk 5 due
Resources

Recursion (cont.): code reading, common pitfalls
[Notes]


(Recursion Lab)


Recursion (cont.): start analysis (telescoping method)
[Notes]


Finish recursion: recursive
[Notes]


Code: Recursion Examples
Code: Recursive List

Week 11 (Chap 7.2)

Mon 11/11Tue 11/12Wed 11/13Fri 11/15 Resources

Review
[Notes]


Midterm Exam II


Start trees and binary trees
[Notes]


Tree traversal, start Binary search trees (BST)
[Notes]


Review Guide 2 (Sol, Code)
Code: BST

Week 12 (Chap 7.2-7.6)

Mon 11/18Tue 11/19
Lab 9 due
Wed 11/20Fri 11/22 Resources

BST (cont.): contains(), add(), remove()
[Notes]


(ExpressionTree Lab)


Finish BST: performance, size(), smallest()
[Notes]


Heaps: percolate up/down
[Notes]


Code: Min-Heap
Code: PriorityQueue

Week 13 (Chap 8.1-8.3)

Mon 11/25
Hwk 6 due
Tue 11/26
Lab 10 due
Wed 11/27Fri 11/29 Resources

Start Maps
[Notes]


(Binary Search Tree lab)









Week 14 (Chap 8.4, 8.6, 8.9)

Mon 12/02Tue 12/03
Lab 11 due
Wed 12/04Fri 12/06 Resources

HashMap cont.
[Notes]


(Open Addressing lab)


HashMap cont.; Start sorting
[Notes]


Sorting: merge sort
[Notes]


Code: Sorting

Week 15

Mon 12/09Tue 12/10Wed 12/11
Hwk 7 due
Fri 12/13 Resources

Sorting: quicksort
[Notes]


(Sorting lab)
[Notes]


Review


Reading period



Finals

Mon 12/16Tue 12/17Wed 12/18Fri 12/20 Resources







Final Exam 12-2p





Review Guide 3 (Sol, Code)

   Department of Mathematics and Computer Science
University of Puget Sound
1500 N. Warner St
Tacoma, WA 98416