Files
School/Anul 1/Semestrul 2/OOP/Labs/Exam/item.h
T
2024-08-31 12:07:21 +03:00

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);
};