#include #include #include "StickerCollectionT.h" #include #include using namespace std; StickerCollectionT::StickerCollectionT(int max): stickers(max,0){} void StickerCollectionT::ChangeSticker(size_t id, int quantity){ if (id < stickers.size()) { if (quantity + stickers[id] >= 0) { stickers[id] += quantity; } else { throw domain_error("Invalid ticket quantity"); } } else { throw out_of_range("Invalid ID"); } } int StickerCollectionT::GetStickerCount(size_t id) const{ return stickers.at(id); }