-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathProdotto.h
50 lines (35 loc) · 861 Bytes
/
Prodotto.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
45
46
47
48
49
50
//
// Created by Riccardo Becciolini on 19/02/23.
//
#ifndef PROJECTLAB_PRODOTTO_H
#define PROJECTLAB_PRODOTTO_H
#include <iostream>
class Prodotto {
public:
Prodotto(const std::string& n, const std::string& c, int q): name(n), category(c), quantity(q) {}
bool operator == (const Prodotto& p);
const std::string &getName() const {
return name;
}
const std::string &getCategory() const {
return category;
}
int getQuantity() const {
return quantity;
}
void setQuantity(int q) {
quantity = q;
}
const bool isBought1() {
return isBought;
};
void setIsBought(bool isBought) {
Prodotto::isBought = isBought;
};
private:
bool isBought = false;
std::string name;
std::string category;
int quantity;
};
#endif //PROJECTLAB_PRODOTTO_H