28 lines
856 B
C++
28 lines
856 B
C++
#pragma once
|
|
#include<string>
|
|
#include<vector>
|
|
#include<tuple>
|
|
|
|
|
|
class Item{
|
|
private:
|
|
std::string _name;
|
|
std::string _category;
|
|
int _price;
|
|
std::vector<std::tuple<int,std::string,int>> _offers;
|
|
public:
|
|
Item();
|
|
Item(std::string name, std::string category, int price);
|
|
Item(std::string name, std::string category, int price, std::vector<std::tuple<int,std::string,int>> offers);
|
|
std::string name();
|
|
std::string category();
|
|
int price() const;
|
|
std::vector<std::tuple<int,std::string,int>> offers();
|
|
void name(std::string name);
|
|
void category(std::string category);
|
|
void price(int price);
|
|
void offers(std::vector<std::tuple<int,std::string,int>> offers);
|
|
void add_offer(std::tuple<int,std::string,int> offer);
|
|
|
|
|
|
}; |