Chapter 16 — Sample Final Reference
This file is not a set of weekly reps. Coding 2’s reps are over.
What you have here is the reference for a sample final — a fully worked example of Project 14, in the shape and scope that the real final will take. Read it. Compare it to your own Capstone Drill 5 runs from Chapter 15. The sample final is meant to be the baseline expectation, not the target — the real final’s grader is grading you against this same shape.
The reference solution itself lives alongside this file. Below is the prompt, the rubric mapping, and the walkthrough. Download the reference solution’s files and read them after your own timed run:
- Source:
DailyVerseRotator.java,VerseLoader.java,Verse.java - Tests:
DailyVerseRotatorTest.java - Sample input:
verses.csv - The written deliverables: the spec, the architecture doc, the prompts log, and the reflection
Ground rules
- Read the sample-final prompt below. Don’t peek at the reference solution yet.
- Open a blank Java project. Set a 60-minute timer.
- Build it. Spec, tests, code, persistence, prompts log, reflection.
- Stop at 60 minutes. Then open the reference solution and compare.
If you can ship the sample-final scope in 60 minutes with the required deliverables, you are ready for the real final. If you can’t — figure out which deliverable cost you the time, and drill that.
Sample Final Prompt
Build a Daily Verse Rotator.
The application reads a CSV file of
reference,textrows (e.g.,Psalm 23:1,The LORD is my shepherd; I shall not want.). Each time the program is run, it selects one verse to display. No verse should repeat within a “cycle”; when all verses have been shown, the cycle resets.State must persist across runs in a text file.
Required deliverables:
spec.txt— a complete specification.DailyVerseRotatorTest.java— at least 6 JUnit 5 tests, written before the production code.DailyVerseRotator.java(and any supporting classes) — the implementation.architecture.docx— a brief module-architecture doc (classes, responsibilities, data flow).prompts.txt— the prompt log. At least 2 methods must be AI-built. All prompts logged.reflection.docx— honest reflection on what the AI did, what you redirected, what you wrote by hand.- The program must run end-to-end on a sample CSV without crashing.
Constraints:
- Java 17.
- Standard library only —
java.util,java.io,java.nio.file,java.timeare all fair game; no third-party dependencies (JUnit 5 is the only test library).- Persistence file format is your choice, but must be documented in
spec.txt.- Exception handling at every I/O boundary.
Time: 60 minutes.
How the rubric maps to the deliverables
| Deliverable | What it proves | Rubric weight |
|---|---|---|
spec.txt | P2 skill: you wrote the contract | 15 |
DailyVerseRotatorTest.java | P4 skill: 6+ JUnit tests written first | 20 |
DailyVerseRotator.java | The system runs and is correct | 25 |
architecture.docx | P12 skill: module boundaries documented | 10 |
prompts.txt | P9/P10/P13 skill: AI partnership logged | 15 |
reflection.docx | P14 honesty work: claim what’s yours | 10 |
| Exception handling, persistence | P3, P6 skills firing in the implementation | 5 |
That’s 100 points. The reference solution scores ~95 on this rubric.
Walkthrough of the reference solution
The reference solution (the DailyVerseRotator.java files you downloaded above) follows the order from Chapter 15 §15.3:
- Spec, 3 minutes. Inputs, outputs, invariants, public API.
spec.txtis one short page. - Architecture, 3 minutes. Three classes:
Verse(data),VerseLoader(I/O),DailyVerseRotator(state machine).architecture.docxis half a page. - Tests, 10 minutes. Six JUnit tests covering: returns a verse, no repeat within cycle, cycle resets,
versesRemainingdecrements,resetCycleworks, state persists. - Implementation, 25 minutes, AI on. Six prompts total, all scoped to one method each. Two redirects (one for a hallucinated
Files.readLinescall, one for a missing edge case innext()). - Integration check, 3 minutes. Run the full test suite. Run the program against the sample CSV. Confirm round-trip.
- Architecture doc final pass, 2 minutes. Update if anything changed during implementation.
- Reflection, 3 minutes. What the AI got right, what was redirected, what was hand-typed.
Total: 49 minutes. Buffer of 11 minutes for things going sideways.
The reference solution’s prompts.txt is 8 prompts long. The reference solution’s reflection.docx is 220 words. Both are deliberately tight.
Read the reference solution. Then attempt your own. Then compare.
What to notice when comparing
If your version is markedly longer than the reference, ask why. Did you over-engineer the architecture? Did you write tests that go beyond the spec? Did you accept AI rewrites that bloated the code?
If your version is markedly shorter, also ask why. Did you skip a deliverable? Did you under-test? Is the implementation missing an edge case the spec required?
If your version is roughly the same length but took longer, the bottleneck is somewhere in your workflow. Most often: spec or tests. Drill the bottleneck.
Final note
The real final’s prompt will not be “Daily Verse Rotator” — it will be a different scope from the same approved list. The shape is the same; the content differs.
If you can ship this sample final in 60 minutes, you can ship the real final in 60 minutes. The variation is small.
Show up rested.
Up next: Project 14 — the capstone, the last project of Coding 2.