Schedule

A week runs Wednesday through the following Monday, across the weekend:

Wed (class) Mon (class) Tue (no class)
Assignment may go out due
Reading due before class
Quiz at the start, 2 attempts
Presentation of the assignment due the day before

Why the week is arranged this way is on How the week works.

Week 12 (11/11—11/16): Databases

  • Assignment: A11 out Wednesday 11/11, due Thursday 11/19.
  • Presentation: A10 on Wednesday 11/11, a student walks us through their Session and their server.
  • Quiz: Quiz 10, Nov 16, 2026 — Two attempts, one at the start of class and one near the end.
  • Reading (before Nov 16, 2026), either of:

Wednesday is a bank that outlives its program: a database, its tables and rows, and SQL sent to it from Java. It is designed so you can follow it unread. Monday goes on from there with the reading in hand. The reading is for Monday.

The reading is three things: sending SQL through a Statement, a PreparedStatement and why it keeps a name from changing what a query says, and a transaction, its changes committed together or rolled back together. [JT]’s examples use a coffee shop’s tables and [CJ]’s a book shop’s, each on a database server of its own; ours is H2, which runs inside your program, so their pages on drivers and connecting to a server can be skimmed.

A11 is BankLab’s third part: the bank’s accounts kept in a database, so they survive the server stopping.

Week 11 (11/4—11/9): Clients and servers

Wednesday is two programs that talk to each other: a server that waits for clients, and a client that connects to it, first one client at a time and then a thread for each. It is designed so you can follow it unread. Monday goes on from there with the reading in hand. The reading is for Monday.

The reading is three things: what a socket is, a client that writes a line and reads the answer, and a server that answers many clients at once, a thread for each. [JT]’s programs read the machine and the port from args, where ours write "localhost" and the port into the code. [CJ] tries its servers with a program called telnet, which we do not use: our clients are programs of our own. [CJ] 4.2.2 starts a thread for each client with an executor, service.submit(() -> serve(incoming)); read it as new Thread(() -> serve(incoming)).start(), which is what Wednesday’s class writes.

A10 is BankLab’s second part: a server in front of the bank from A9, with a thread for each client.

Week 10 (10/28—11/2): Locks and deadlock

Wednesday finishes last week’s question, how big a piece of work each thread should take, and then has two threads that each need two locks, and can end up waiting for each other for ever. It is designed so you can follow it unread. Monday goes on from there with the reading in hand. The reading is for Monday.

The reading is three things: the lock a synchronized method takes, a block that takes another object’s lock, and a deadlock. [JT] is three short pages. [CJ] 10.5.6 opens by comparing synchronized with the Lock objects of 10.5.3, which are not assigned; read past them to the part about the intrinsic lock. [CJ]’s own section on deadlocks is about something else, so both tracks end with [JT]’s Deadlock page.

A9 starts BankLab, the last four assignments: this week, the bank itself, in memory, safe for many threads at once.

Week 9 (10/21—10/26): Threads

  • Assignment: A8 out Wednesday 10/21, due Tuesday 10/27.
  • Presentation: A7 on Wednesday 10/21, a student walks us through their Chain and their Pair.
  • Quiz: Quiz 7, Oct 26, 2026 — Two attempts, one at the start of class and one near the end.
  • Reading (before Oct 26, 2026), either of:

Wednesday finishes the generic Matrix from Monday, in the seats, and then starts two threads at once: one count they both add to, why it comes out short, and synchronized. It is designed so you can follow it unread. Monday goes on from there with the reading in hand. The reading is for Monday.

The reading is three things: what a thread is and how one starts, waiting for one to finish, and two threads losing each other’s updates. synchronized is Wednesday’s class, not the reading. [JT] is three short pages. [CJ] writes each thread’s work as Runnable r = () -> { ... };, a lambda: a Runnable without a class, the code between the braces being its run. Wednesday’s class starts its threads the same way.

[YL] is optional extra reading: [YL] 5.3 — Implementing the Runnable Interface starts two threads from one Runnable class.

Week 8 (10/14—10/19): Generics

  • Assignment: A7 out Wednesday 10/14, due Tuesday 10/20.
  • Presentation: A6 on Wednesday 10/14, a student walks us through their BucketSet and their priority queue.
  • Quiz: Quiz 6, Oct 19, 2026 — Two attempts, one at the start of class and one near the end.
  • Reading (before Oct 19, 2026), either of:
    • [DJ] Introducing Generics
    • [CJ] 8.1 — Why Generic Programming?, [CJ] 8.2 — Defining a Simple Generic Class, [CJ] 8.3 — Generic Methods, [CJ] 8.4 — Bounds for Type Variables, [CJ] 8.6 — Inheritance Rules for Generic Types

Wednesday is one chain for every type: the WordChain from A5 and the midterm’s TimeChain, written once, and the first tests you run from a green arrow. It is designed so you can follow it unread. Monday is what the compiler checks and what it cannot: a method with a type of its own, a bound on it, and why a chain of integers is not a chain of numbers. The reading is for Monday.

[DJ] is one page, and the whole of it is the reading. In [CJ], 8.5 (erasure) and 8.7 onward (wildcards) are not assigned; 8.6 is, for the rule about inheritance that [DJ]’s page ends on.

Week 7 (10/7—10/12): Midterm, and fall break

  • Exam: Midterm, Oct 7, 2026 — The whole period, in Sutliff 106 or on Zoom with your camera on. A repository like an assignment’s. Open book, no AI.
  • Quiz: None — Monday 10/12 is fall break.

No new reading and no new assignment this week. Wednesday is the midterm, which takes the whole period, and Monday is fall break. The exam page says what is on it and what you may use. A6 is presented on the Wednesday after the break, which is also when the next assignment goes out.

Week 6 (9/30—10/5): Hash tables and queues

  • Assignment: A6 out Wednesday 09/30, due Tuesday 10/06.
  • Presentation: A5 on Wednesday 09/30, a student walks us through their word count and their WordChain.
  • Quiz: Quiz 5, Oct 5, 2026 — Two attempts, one at the start of class and one near the end.
  • Reading (before Oct 5, 2026), either of:

Wednesday is how a HashMap finds a key, beside a list and a tree set, which look for things in their own ways; then you build a hash set by hand. It is designed so you can follow it unread. Monday is the collections that do not look anything up at all: stacks, queues and priority queues. The reading is for Monday.

[YL] is optional extra reading: [YL] 2.3 — Hashing Technique builds the same hash set out of an array of linked lists.

Week 5 (9/23—9/28): Collections

Wednesday is lists — ArrayList, the five calls, an iterator, and what LinkedList costs — and it runs on the Matrix you already have. Monday is the other two kinds of collection, sets and maps, as things you use; how a hash table finds a key is the week after, not this one.

[YL] is optional extra reading: [YL] 2.1 — Lists and Iterators is lists and iterators, and [YL] 2.2 — Sets and Maps is the Set and Map methods in a list.

Week 4 (9/16—9/21): Ordering objects

  • Assignment: A4 out Wednesday 09/16, due Tuesday 09/22.
  • Presentation: A3 on Wednesday 09/16, a student walks us through their Matrix.
  • Quiz: Quiz 3, Sep 21, 2026 — Two attempts, one at the start of class and one near the end.
  • Reading (before Sep 21, 2026), either of:

One question this week, and A4 is the answer to it: what does Arrays.sort need from your class before it will sort your objects? Wednesday is designed so you can follow it unread, so this is reading for Monday rather than for tomorrow.

[API] Comparable: the compareTo contract is the contract itself, in a few sentences of javadoc. It is the same kind of rule Object gave you last week, and it is worth reading the same way — as something you have to keep, rather than as documentation.

[YL] is optional extra reading this week rather than a track of its own. [YL] 1.7 — The Comparable, Comparator Interfaces, Arrays, and Collections Class is the matching section and it is a quick way in, but it teaches ordering on a Fraction rather than on the matrices A4 asks about, so read one of the two tracks above as well.

Week 3 (9/9—9/14): Equality and exceptions

Two questions this week, and A3 needs both answers. When are two objects the same one, and when are they merely equal? And what should a method do when it is handed something it cannot work with?

[API] Object: the equals and hashCode contracts is the whole of the first answer, in four sentences of javadoc — worth reading as the rule you have to keep rather than as documentation. Its equals and hashCode are also what [CJ] 5.2 — Object: The Cosmic Superclass is about, so the [CJ] track re-reads a section from week 2 with a different question in hand.

Monday is the part of A3 where a mistake still compiles: a HashSet that cannot find an object it is already holding, and a method that throws something the compiler will not let its caller ignore.

Week 2 (9/2—9/7): Inheritance

A one-class week. Mon 09/07 is Labor Day, so this week is Wednesday only. Under the one-class rule, there is no quiz, and the reading is due before the work it supports rather than before a class.

  • Assignment: A2 out Wednesday 09/02, due Tuesday 09/08, both parts are graded, and we start Part 2 together on the day it goes out.
  • Presentation: A1 on Wednesday 09/02, and A0 with it — a student walks us through their sum.
  • Quiz: None
  • Reading (before Sep 8, 2026), either of:

There is no class between 09/02 and 09/09, so A2 gets a full week — and no class in the middle of it to ask questions in. Part 2 is the half that leans on the reading: [CJ] 5.4 — Object Wrappers and Autoboxing is what explains why an int and a double can sit in a Number[] beside a Fraction, and [CJ] 5.6 — Abstract Classes is what Number itself is — the section to read before attempting A2’s optional part.

Week 1 (8/26—9/1): OOP

Week 0 (8/24): Setup