-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathheader.cpp
More file actions
217 lines (182 loc) · 4.86 KB
/
Copy pathheader.cpp
File metadata and controls
217 lines (182 loc) · 4.86 KB
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
#include <iostream>
#include <vector>
#include <map>
#include <string>
#include "header.h"
using namespace std;
Pizza::Pizza() noexcept{
toppingsID = {
{1, "Rosemary"},
{2, "E.V. olive oil"},
{3, "Coarse sea salt"},
{4, "Sea salt"},
{5, "Mozzarella"},
{6, "Truffle oil"},
{7, "Vine ripe tomatoes"},
{8, "Sliced garlic"},
{9, "Oregano"},
{10, "Peperoncino"},
{11, "Garlic"},
{12, "Capers"},
{13, "Olives"},
{14, "Sicilian salted anchovies"},
{15, "Fresh basil"},
{16, "Fresh mushrooms"},
{17, "Parsley"},
{18, "Cherry tomatoes"},
{19, "Arugula"},
{20, "Zucchini"},
{21, "Eggplant"},
{22, "Mushrooms"},
{23, "Radicchio"},
{24, "Spicy salame"},
{25, "Homemade sausage"},
{26, "Baby meatballs"},
{27, "Fresh sage"},
{28, "Goat cheese"},
{29, "Roasted peppers"},
{30, "Roasted eggplant"},
{31, "Tomato"},
{32, "Prosciutto crudo"},
{33, "Salame piccante"},
{34, "Green peas"},
{35, "Parmigiano"}
};
}
void Pizza::displayPizzaToppingsOptions()
{
cout << R"( 1 - Rosemary 19 - Arugula
2 - E.V. olive oil 20 - Zucchini
3 - Coarse sea salt 21 - Eggplant
4 - Sea salt 22 - Mushrooms
5 - Mozzarella 23 - Radicchio
6 - Truffle oil 24 - Spicy salame
7 - Vine ripe tomatoes 25 - Homemade sausage
8 - Sliced garlic 26 - Baby meatballs
9 - Oregano 27 - Fresh sage
10 - Peperoncino 28 - Goat cheese
11 - Garlic 29 - Roasted peppers
12 - Capers 30 - Roasted eggplant
13 - Olives 31 - Tomato
14 - Sicilian salted anchovies 32 - Prosciutto crudo
15 - Fresh basil 33 - Salame piccante
16 - Fresh mushrooms 34 - Green peas
17 - Parsley 35 - Parmigiano
18 - Cherry tomatoes
)" << endl;
}
int Pizza::getSize()
{return size;}
void Pizza::displayToppings()
{
for (int id : toppings)
{
auto it = toppingsID.find(id);
if (it != toppingsID.end())
{
cout << it ->second << endl;
}
else
{
cout << "\nUnknown Topping ID: " << id << endl;
}
}
}
void Pizza::setSize()
{
int choice;
cout << "\nChoose a size: \n\t12 \t\t14 \n" << endl;
cin >> choice;
while(choice != 12 && choice != 14)
{
cout << "\nInvalid choice, please enter a valid size for the ones listed\n" << endl;
cout << "\nChoose a size: \n\t12 \t\t 14 \n" << endl;
cin >> choice;
}
size = choice;
}
void Pizza::setToppings()
{
int choice;
cout << "\nChoose a Topping\n" << endl;
displayPizzaToppingsOptions();
cin >> choice;
toppings.push_back(choice);
while(choice < 1 && choice > 35)
{
cout << "\nInvalid choice, please enter a valid topping from the ones listed\n" << endl;
displayPizzaToppingsOptions();
cin >> choice;
toppings.push_back(choice);
}
char choice2;
cout << "\nAnother Topping?\n(Y/N)\n" << endl;
cin >> choice2;
while(choice != 'Y' && choice != 'N' && choice != 'y' && choice != 'n')
{
cout << "\nInvalid option please try again\n" << endl;
cout << "\nAnother Topping?(Y/N)\n" << endl;
cin >> choice2;
}
while(choice2 == 'Y' || choice2 == 'y')
{
choice = 0;
cout << "\nEnter a topping" << endl;
displayPizzaToppingsOptions();
cin >> choice;
toppings.push_back(choice);
cout << "\nAnother Topping?\n(Y/N)\n" << endl;
cin >> choice2;
while(choice != 'Y' && choice != 'N' && choice != 'y' && choice != 'n')
{
cout << "\nInvalid option please try again\n" << endl;
cout << "\nAnother Topping?(Y/N)\n" << endl;
cin >> choice2;
}
}
}
double Focaccia::getPrice() {
return price;
}
double Bianca::getPrice() {
return price;
}
double Marinara::getPrice() {
return price;
}
double Napoletana::getPrice() {
return price;
}
double Margherita::getPrice() {
return price;
}
double Funghi::getPrice() {
return price;
}
double Angelina::getPrice() {
return price;
}
double Ortolana::getPrice() {
return price;
}
double SalamePiccante::getPrice() {
return price;
}
double Salsiccia::getPrice() {
return price;
}
double Polpettine::getPrice() {
return price;
}
double GoatCheese::getPrice() {
return price;
}
double ProsciuttoDiParma::getPrice() {
return price;
}
double Diavola::getPrice() {
return price;
}
double Nonna::getPrice() {
return price;
}