Practice · 1 of 3
Capstone seam 1: the borrow state machine
Complete BorrowTracker: bool borrow(const std::string& isbn) moves an available (or unknown) book to Borrowed and returns true — but returns false and changes nothing if it is already Borrowed. bool give_back(...) is the mirror for returning. bool is_borrowed(...) const reports state; unknown books are not borrowed.
Difficulty: intermediate
Press Submit to check your solution.
Back to lesson: Practice: Capstone seams