Skip to main content
๐Ÿ“œ WAYPOINT LESSON

Checkpoint: The Library, Assembled

โญโญ intermediateโณ 40 min read๐Ÿ“ Lesson 130 of 204

The capstone core object: add, find with optional, and an inventory serializer โ€” the whole course in one class.

Library is the final exam because it is the course in miniature:

  • add/find/size are encapsulation (M2-M4) with a clean interface
  • std::optional<const Book*> is the modern result type (M7)
  • inventory() is a serializer (M10) with an exact format contract

The format tests are deliberately strict โ€” A|1\nB|3\n, insertion order, empty string when empty โ€” because exact output is what a persistence boundary means in practice. "Close enough" is a parse error on the way back in.

Finish here and you have touched every layer: types, containers, algorithms, errors, and the seams between them. That is the intermediate bar: not that you have seen the features, but that you can assemble them into a small, working, explainable system.