Checkpoint: Object-Oriented Design
Challenge on lesson: Checkpoint: Object-Oriented Design
CHALLENGE
Difficulty: intermediate+25 XP
Implement class Library that owns a std::vector<std::string> titles_; plus an inline static int copies_; counting every title ever added across all instances. Provide: void add(std::string title) (push_back and bump the static counter), std::size_t size() const, bool has(const std::string& title) const, and static int total_copies().
Press Submit to check your solution.
Back to lesson: Checkpoint: Object-Oriented Design