Chapter 15 — Capstone Drills
These are not weekly reps. They are review drills — small, time-bound, end-to-end programs that combine concepts from across the whole of Coding 2.
Do them in order. Each builds toward the final.
Ground rules:
- Time yourself. Each drill has a budget. If you blow it by more than 50%, stop and re-read the relevant chapter, then come back.
- AI usage varies per drill. Read each drill’s header.
- Compile and run after every change. Tight feedback loop.
- Log every prompt for the AI-on drills, the same way you do for projects. Reflection at the end.
- No partner help. These are solo. The exam is solo.
Drill 1 — Three-Minute Spec
Time budget: 3 minutes. AI off.
Pick one of these problem statements. Write a complete spec for it in three minutes:
- A simple to-do list that persists across runs and supports priority levels.
- A hymn-suggestion generator that takes a Sunday’s theme and proposes three hymns from a CSV.
- A prayer-journal recorder that lets you add timestamped entries and search by date range.
Your spec must include:
- One-sentence description.
- Inputs and outputs.
- 3+ invariants.
- The public API (class name + method signatures).
Don’t write code. Write the spec. Then close it. Then write another one for a different problem.
Goal: by the end of the week, you can produce a publishable spec in 3 minutes flat. This skill saves you 15 minutes on the final.
Drill 2 — Test Suite from a Spec
Time budget: 12 minutes. AI off.
Take the spec from Drill 1. Write a complete JUnit 5 test suite for it. At least 6 tests.
Constraints:
- All public API methods must have at least one test.
- Include at least one test for an error case (bad input, missing file, etc.).
- Include at least one test for an invariant (e.g., “no duplicate IDs”).
- Use
@Test,assertEquals,assertThrows, etc. — no other JUnit features required.
Don’t write the implementation. Write only the tests.
Goal: by the end of the week, you can produce a 6-test JUnit suite in 10 minutes flat. The final requires at least 6 tests before any production code.
Drill 3 — Architecture Under Pressure
Time budget: 5 minutes. AI off.
Pick a problem from Drill 1 (different one this time). On paper, draw:
- The classes (3 or fewer for a small application).
- What each class owns (fields).
- The public methods on each class.
- The data flow between them.
- The persistence boundary (which class touches the filesystem).
Do it in five minutes. Don’t perfect it. Don’t pretty-print. Get the shape down.
The discipline is finishing in five minutes. Five-minute architecture catches 80% of design errors that would otherwise emerge during implementation. Skipping it costs 25 minutes.
Drill 4 — Prompting Under Constraint
Time budget: 15 minutes. AI on.
Take the spec and tests from Drills 1 and 2. Implement one of the classes — not the whole application, just one class — using AI.
Constraints:
- You may not write any implementation code by hand.
- Every prompt must be scoped to a single method.
- Every prompt must reference the relevant test by name.
- Log every prompt.
- Maximum 8 prompts total for the class.
Run the tests at the end. They should pass for the methods you implemented.
This drill is graded (by you, against yourself) on prompt economy. 8 prompts for a 4-method class is generous. 4 prompts is excellent. 2 prompts per method, on average, is the target you want for the final.
Drill 5 — Full Mini-Capstone (45 minutes, AI on)
Time budget: 45 minutes. AI on. This is the closest analog to the final.
Pick one scope from the approved list (these mirror P14’s scope list):
- Daily-verse rotator — reads a CSV of
reference,text, presents one per “day,” tracks which have been shown. - Study-streak tracker — records daily check-ins, computes streaks, persists state across runs.
- Sermon-note indexer — reads a text file of sermon notes, builds a keyword index, supports search.
- Prayer-journal recorder — timestamped entries, search by date range, persists to file.
- Hymn-suggestion generator — takes a theme keyword, returns top-3 matching hymns from a CSV.
In 45 minutes, build:
- A spec doc (
spec.txtorspec.txt). - At least 6 JUnit tests written before code.
- The implementation, with at least 2 methods written by AI.
- Persistent storage (read and write a file).
- Exception handling on the I/O boundary.
- A
prompts.txtlog. - A 100-word reflection at the end.
45 minutes. Total. Time yourself rigorously. Stop at 45 even if incomplete — and write the reflection about what you would have done with more time.
This is your single most valuable preparation rep. Do it at least twice this week, on two different scopes.
Drill 6 — Variation Reps
If you got through Drill 5 in 45 minutes with a working program, do another variation. Different scope, different shape, same skills.
If you got through Drill 5 in 75 minutes with a half-working program, the bottleneck is probably one of:
- Spec. Re-do Drill 1 three times.
- Tests. Re-do Drill 2 three times.
- Prompting. Re-do Drill 4 three times.
- Integration. Re-do Drill 5 with a simpler scope and aim for 30 minutes.
Identify your bottleneck. Drill that. The skills that are weakest under time pressure are the ones that fail on the exam.
Drill 7 — Hand-Type a 30-Line Method
Time budget: 10 minutes. AI off.
Pick a small method from one of your Phase 2 projects that you remember being hand-written (not AI-generated). Close the file. From the spec only, re-implement it from scratch.
Compile. Run a quick test. Compare to your original.
The point isn’t to recreate the original. The point is to confirm your fingers still know how to write 30 lines of clean Java without a prompt. They should.
If they don’t, you’ve coasted too hard on AI in Phase 2. Spend an hour each day this week hand-typing one method.
Drill 8 — Read Your Own Past Prompts
Time budget: 30 minutes. AI off.
Open every prompts.txt from Projects 9–13. Read each one.
For each project, identify:
- The single most effective prompt.
- The single least effective prompt.
- Any prompt template you would reuse on the final.
Build a my-prompts.txt with your top 5 reusable templates. Print it. Keep it next to you on exam day.
Your own past prompts are the best library you have. Use them.
Drill 9 — Sample Final Walkthrough
Read Project 14 carefully. Pretend you’ve just received it under exam conditions. Spend 2 minutes deciding which scope you would pick, then 3 minutes drafting the spec, then 5 minutes drafting the test names.
Don’t write the code. Just plan it.
This drill teaches the first 10 minutes of the exam — the most critical 10 minutes. Students who plan well in the first 10 minutes finish on time. Students who panic-code in the first 10 minutes do not.
Drill 10 — The Reflection Rep
Take any one of your previous drills. Write its reflection.docx as if you were submitting it on the final.
It should answer:
- What the AI got right on the first try.
- What you had to redirect (specifically).
- What you wrote by hand because asking would have taken longer.
- One thing you would change about your approach next time.
Aim for 150–250 words. Specific. Not generic.
This is exactly the reflection you’ll write on the final. It is graded. Practice it now so it doesn’t feel like a chore at minute 58 of the exam.
After the Drills
If you can:
- Write a spec in 3 minutes (Drill 1).
- Write a 6-test JUnit suite in 12 minutes (Drill 2).
- Architect a 3-class system in 5 minutes (Drill 3).
- Implement a class in 8 prompts or fewer (Drill 4).
- Ship a full mini-capstone in 45 minutes (Drill 5).
- Type 30 lines of clean Java without AI (Drill 7).
- Write a specific reflection in under 5 minutes (Drill 10).
— you are ready.
If any of those numbers feel impossible right now, you have one week. Pick the weakest one. Drill it specifically. Move on.
The students who do 3+ full Drill-5 timed runs the week before the final score noticeably higher than the students who only do one. Plan accordingly.
See you in the exam room.
Up next: Chapter 16 — final review and Project 14 — the capstone spec.