Skip to main content

Checkpoint: Library, assembled

Challenge on lesson: Checkpoint: The Library, Assembled

Assemble the capstone core: class Library holding std::vector<Book> with void add(const Book&), std::optional<const Book*> find(const std::string& title) const, std::size_t size() const, and std::string inventory() const — a listing of title|quantity lines in insertion order (one per book, each ending with \n; empty library yields an empty string). Book is {std::string title; int quantity;}.

Difficulty: advanced

Back to lesson: Checkpoint: The Library, Assembled