-
Notifications
You must be signed in to change notification settings - Fork 0
/
products.h
44 lines (35 loc) · 904 Bytes
/
products.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#ifndef PRODUCTS_H
#define PRODUCTS_H
#include <iostream>
#include <map>
using namespace std;
class Products{
char name_of_category[20];
char name[20];
double import_price;
int quantity;
double price;
char attributes[10][20];
map<string, char*>attributesMap;
public:
//Constructors
Products(char* id_of_category,char* name);
Products(char* id_of_category,char* name, int nr_of_attributes);
//Deconstructor
~Products();
//Printers
void PrintAttribute(string& key);
void PrintAllAttributes();
//Return Functions
char* GetName();
int GetNrOfAttributes();
//Modifiers
void SetAttribute(string& key,char* attr);
void SetName(char* name);
void SetPrice(double price);
void SetImportPrice(int import_price);
void SetQuantity(int quantity);
void Sell();
void Sell(int quantity);
};
#endif