food ordering system to debug

hello,
i'm new here.

can someone help me how can i fix my system...

my total amount purchase doesn't total .and also my billing statement..
these are my codes ..
i just need to pass this as my finals exam this coming october 14 ..
i hope that someone can help me on this problem.
thankyou :)

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
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
#include<iostream>
#include<cstdlib>
#include<string>

using namespace std;

class MainMenu
{
public:
	MainMenu();
	virtual void showMenu();

private:

};

MainMenu::MainMenu()
{
	
}

void MainMenu::showMenu()
{
	 cout<<"\n\nSelect type of food:"<<endl<<endl;
	 cout<<"\n";
     cout<<"\t * * * * * * * * * * * * * * * * * * * *  \n";
     cout<<"\t * Bill         NAME                   *"<<endl;
     cout<<"\t *-------------------------------------*\n";
	 cout<<"\t *			  	       *\n";
	 cout<<"\t * [1]		Foods                  *"<<endl;
     cout<<"\t * [2]		Drinks                 *"<<endl;
     cout<<"\t * [3]		Dessert                *"<<endl;
	 cout<<"\t *			  	       *\n";
     cout<<"\t * * * * * * * * * * * * * * * * * * * *"<<endl;
     cout<<"\n\tYour choice : ";
}

class MenuOne: public MainMenu
{
public:
	MenuOne();
	void showMenu();

private:

};

MenuOne::MenuOne()
{

}

void MenuOne::showMenu()
{
	 cout<<"\n\nSelect type of meal:"<<endl<<endl;
     cout<<"\t * * * * * * * * * * * * * * * * * * * *  \n";
     cout<<"\t * Bill         NAME                   *"<<endl;
     cout<<"\t *-------------------------------------*\n";
	 cout<<"\t *			  	       *\n";
	 cout<<"\t * [1]		Chicken		       *"<<endl;
     cout<<"\t * [2]		Meat		       *"<<endl;
     cout<<"\t * [3]		Seafood		       *"<<endl;
     cout<<"\t * [4]		Vegetables             *"<<endl;
	 cout<<"\t *			  	       *\n";
     cout<<"\t * * * * * * * * * * * * * * * * * * * *"<<endl;
     cout<<"\n\tYour choice : ";
}

class MenuTwo: public MainMenu
{
public:
	MenuTwo();
	void showMenu();

private:

};

MenuTwo::MenuTwo()
{

}

void MenuTwo::showMenu()
{
     cout<<"\n\nSelect type of drink:"<<endl<<endl;
	 cout<<"\t * * * * * * * * * * * * * * * * * * * *  \n";
     cout<<"\t * Bill         NAME                   *"<<endl;
     cout<<"\t *-------------------------------------*\n";
	 cout<<"\t *			  	       *\n";
	 cout<<"\t * [1]		Hot drinks	       *"<<endl;
     cout<<"\t * [2]		Cold drinks            *"<<endl;
     cout<<"\t * [3]		Soft drinks            *"<<endl;
     cout<<"\t * [4]		Juices                 *"<<endl;
	 cout<<"\t *			  	       *\n";
	 cout<<"\t * * * * * * * * * * * * * * * * * * * *"<<endl;
     cout<<"\n\tYour choice : ";
}

class MenuThree: public MainMenu
{
public:
	MenuThree();
	void showMenu();

private:

};

MenuThree::MenuThree()
{

}

void MenuThree::showMenu()
{
	cout<<"\n\nSelect type of dessert:"<<endl<<endl;
	cout<<"\t * * * * * * * * * * * * * * * * * * * *  \n";
    cout<<"\t * Bill         NAME                   *"<<endl;
    cout<<"\t *-------------------------------------*\n";
	cout<<"\t *			  	       *\n";
	cout<<"\t * [1]		Cake		       *"<<endl;
    cout<<"\t * [2]		Ice-cream	       *"<<endl;
    cout<<"\t * [3]		Pies		       *"<<endl;
	cout<<"\t *			  	       *\n";
	cout<<"\t * * * * * * * * * * * * * * * * * * * *"<<endl;
	cout<<"\t\nYour choice : ";
}

class MealOne: public MainMenu
{
public:
	MealOne();
	void showMenu();

private:

};
MealOne::MealOne()
{

}

void MealOne::showMenu()
{
	 cout<<"\n\nSelect type of chicken:"<<endl<<endl;
	 cout<<"\t * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\n";
     cout<<"\t * Bill           NAME                        PRICE          *"<<endl;
     cout<<"\t *-----------------------------------------------------------*\n";
	 cout<<"\t *			  	                             *\n";
     cout<<"\t * [1]		Deep Fried Chicken Chop		'PHP 90.00'  *"<<endl;
	 cout<<"\t * [2]		Chicken Chilly			'PHP 90.00'  *"<<endl;
     cout<<"\t * [3]		Chicken Curry			'PHP 90.00'  *"<<endl;
	 cout<<"\t * [4]		Chicken Inasal			'PHP 100.00' *"<<endl;
     cout<<"\t * [5]		Sweet and Sour Chicken		'PHP 90.00'  *"<<endl;
     cout<<"\t * [6]		Exit and show price			     *"<<endl;
	 cout<<"\t *			  	                             *\n";
     cout<<"\t * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *"<<endl;
     cout<<"\n\tYour choice : ";
}

class MealTwo: public MainMenu
{
public:
	MealTwo();
	void showMenu();

private:

};

MealTwo::MealTwo()
{

}

void MealTwo::showMenu()
{
	 cout<<"\n\nSelect type of meat:"<<endl<<endl;
	 cout<<"\t * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * \n";
     cout<<"\t * Bill           NAME                           PRICE           *"<<endl;
     cout<<"\t *---------------------------------------------------------------*\n";
	 cout<<"\t *			  	                                 *\n";
     cout<<"\t * [1]		Adobo				    'PHP 100.00' *"<<endl;
	 cout<<"\t * [2]		Bicol Express                       'PHP 130.00' *"<<endl;
	 cout<<"\t * [3]		Black Pepper Beef Chop              'PHP 130.00' *"<<endl;
	 cout<<"\t * [4]		Lechon Kawali                       'PHP 130.00' *"<<endl;
     cout<<"\t * [5]		Pork Chop			    'PHP 100.00' *"<<endl;
     cout<<"\t * [6]		Exit and show price                              *"<<endl;
	 cout<<"\t *			  	                                 *\n";
	 cout<<"\t * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * "<<endl;
     cout<<"\n\tYour choice : ";
}

class MealThree: public MainMenu
{
public:
	MealThree();
	void showMenu();

private:

};

MealThree::MealThree()
{

}

void MealThree::showMenu()
{
	 cout<<"\n\nSelect type of seafood:"<<endl<<endl;
	 cout<<"\t * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\n";
     cout<<"\t * Bill           NAME                        PRICE          *"<<endl;
     cout<<"\t *-----------------------------------------------------------*\n";
	 cout<<"\t *			  	                             *\n";
     cout<<"\t * [1]		Fish and chips		        'PHP 95.00'  *"<<endl;
	 cout<<"\t * [2]		Fish curry		        'PHP 100.00' *"<<endl;
     cout<<"\t * [3]		Sweet and sour prawn	        'PHP 120.00' *"<<endl;
	 cout<<"\t * [4]		Prawn with vegetables	        'PHP 130.00' *"<<endl;
     cout<<"\t * [5]		Prawn				'PHP 90.00'  *"<<endl;
     cout<<"\t * [6]		Exit and show price			     *"<<endl;
	 cout<<"\t *			  	                             *\n";
     cout<<"\t * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *"<<endl;
     cout<<"\n\tYour choice : ";
}

	 
class MealFour: public MainMenu
{
public:
	MealFour();
	void showMenu();

private:

};

MealFour::MealFour()
{

}
Last edited on
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
217
218
219
220
221
void MealFour::showMenu()
{
	cout<<"\n\nSelect type of seafood:"<<endl<<endl;
	 cout<<"\t * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\n";
     cout<<"\t * Bill           NAME                        PRICE          *"<<endl;
     cout<<"\t *-----------------------------------------------------------*\n";
	 cout<<"\t *			  	                             *\n";
     cout<<"\t * [1]		Ampalaya		        'PHP 85.00'  *"<<endl;
	 cout<<"\t * [2]		Balatong		        'PHP 85.00'  *"<<endl;
     cout<<"\t * [3]		Chopseuy	                'PHP 85.00'  *"<<endl;
	 cout<<"\t * [4]		Dinengdeng na Labong	        'PHP 85.00'  *"<<endl;
     cout<<"\t * [5]		Pinakbet			'PHP 85.00'  *"<<endl;
     cout<<"\t * [6]		Exit and show price			     *"<<endl;
	 cout<<"\t *			  	                             *\n";
     cout<<"\t * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *"<<endl;
     cout<<"\n\tYour choice : ";
}

class DrinkOne: public MainMenu
{
public:
	DrinkOne();
	void showMenu();

private:

};

DrinkOne::DrinkOne()
{

}

void DrinkOne::showMenu()
{
	 cout<<"\n\nSelect type of Hot Drinks:"<<endl<<endl;
	 cout<<"\t * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\n";
     cout<<"\t * Bill           NAME                        PRICE          *"<<endl;
     cout<<"\t *-----------------------------------------------------------*\n";
	 cout<<"\t *			  	                             *\n";
     cout<<"\t * [1]		Coffee		               'PHP 35.00'   *"<<endl;
	 cout<<"\t * [2]		Green Tea		       'PHP 35.00'   *"<<endl;
     cout<<"\t * [3]		Hot Choco		       'PHP 35.00'   *"<<endl;
     cout<<"\t * [4]		Milo	                       'PHP 35.00'   *"<<endl;
     cout<<"\t * [5]		Mocaccino		       'PHP 35.00'   *"<<endl;
     cout<<"\t * [6]		Exit and show price			     *"<<endl;
	 cout<<"\t *			  	                             *\n";
     cout<<"\t * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *"<<endl;
     cout<<"\n\tYour choice : ";

}

class DrinkTwo: public MainMenu
{
public:
	DrinkTwo();
	void showMenu();

private:

};

DrinkTwo::DrinkTwo()
{

}

void DrinkTwo::showMenu()
{
   	 cout<<"\t * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\n";
     cout<<"\t * Bill           NAME                        PRICE          *"<<endl;
     cout<<"\t *-----------------------------------------------------------*\n";
	 cout<<"\t *			  	                             *\n";
     cout<<"\t * [1]		Cold Coffee		       'PHP 25.00'   *"<<endl;
	 cout<<"\t * [2]		Milo		               'PHP 25.00'   *"<<endl;
     cout<<"\t * [3]		Mocaccino		       'PHP 25.00'   *"<<endl;
     cout<<"\t * [4]		Nestea		               'PHP 25.00'   *"<<endl;
     cout<<"\t * [5]		ChocoLate Shake		       'PHP 25.00'   *"<<endl;
     cout<<"\t * [6]		Exit and show price			     *"<<endl;
	 cout<<"\t *			  	                             *\n";
     cout<<"\t * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *"<<endl;
     cout<<"\n\tYour choice : ";

}

class DrinkThree: public MainMenu
{
public:
	DrinkThree();
	void showMenu();

private:

};

DrinkThree::DrinkThree()
{

}

void DrinkThree::showMenu()
{
	 cout<<"\nSelect type of carbonate drinks:"<<endl<<endl;
	 cout<<"\t * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\n";
     cout<<"\t * Bill           NAME                        PRICE          *"<<endl;
     cout<<"\t *-----------------------------------------------------------*\n";
	 cout<<"\t *			  	                             *\n";
     cout<<"\t * [1]		Coca-Cola		       'PHP 15.00'   *"<<endl;
	 cout<<"\t * [2]		Mountain Dew		       'PHP 15.00'   *"<<endl;
     cout<<"\t * [3]		Rc Cola		               'PHP 15.00'   *"<<endl;
     cout<<"\t * [4]		Sprite		               'PHP 15.00'   *"<<endl;
     cout<<"\t * [5]		7 Up		               'PHP 15.00'   *"<<endl;
     cout<<"\t * [6]		Exit and show price			     *"<<endl;
	 cout<<"\t *			  	                             *\n";
     cout<<"\t * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *"<<endl;
     cout<<"\n\tYour choice : ";
     
}

class DrinkFour: public MainMenu
{
public:
	DrinkFour();
	void showMenu();

private:

};

DrinkFour::DrinkFour()
{

}

void DrinkFour::showMenu()
{
	 cout<<"\nSelect type of juices:"<<endl<<endl;
	 cout<<"\t * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * \n";
     cout<<"\t * Bill           NAME                           PRICE           *"<<endl;
     cout<<"\t *---------------------------------------------------------------*\n";
	 cout<<"\t *			  	                                 *\n";
     cout<<"\t * [1]		Apple Juice			    'PHP 10.00'  *"<<endl;
	 cout<<"\t * [2]		Honey Dew Juice                     'PHP 10.00'  *"<<endl;
	 cout<<"\t * [3]		Mango Juice                         'PHP 10.00'  *"<<endl;
	 cout<<"\t * [4]		Orange Juice                        'PHP 10.00'  *"<<endl;
     cout<<"\t * [5]		Coffee Jelly			    'PHP 10.00'  *"<<endl;
     cout<<"\t * [6]		Exit and show price                              *"<<endl;
	 cout<<"\t *			  	                                 *\n";
	 cout<<"\t * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * "<<endl;
     cout<<"\n\tYour choice : ";
     
}

class DessertOne: public MainMenu
{
public:
	DessertOne();
	void showMenu();

private:

};

DessertOne::DessertOne()
{

}

void DessertOne::showMenu()
{
	 cout<<"\nSelect type of cake Slices:"<<endl<<endl;
	 cout<<"\t * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * \n";
     cout<<"\t * Bill           NAME                           PRICE           *"<<endl;
     cout<<"\t *---------------------------------------------------------------*\n";
	 cout<<"\t *			  	                                 *\n";
     cout<<"\t * [1]		Cheese Cake			    'PHP 20.00'  *"<<endl;
	 cout<<"\t * [2]		Chocolate Cake                      'PHP 20.00'  *"<<endl;
	 cout<<"\t * [3]		Fruit Cake                          'PHP 20.00'  *"<<endl;
	 cout<<"\t * [4]		Mango Cake                          'PHP 20.00'  *"<<endl;
     cout<<"\t * [5]		Ube cake 			    'PHP 20.00'  *"<<endl;
     cout<<"\t * [6]		Exit and show price                              *"<<endl;
	 cout<<"\t *			  	                                 *\n";
	 cout<<"\t * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * "<<endl;
     cout<<"\n\tYour choice : ";
    
    
}

class DessertTwo: public MainMenu
{
public:
	DessertTwo();
	void showMenu();

private:

};

DessertTwo::DessertTwo()
{

}

void DessertTwo::showMenu()
{
	 cout<<"\nSelect type of flavor ice-cream:"<<endl<<endl;
	 cout<<"\t * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * \n";
     cout<<"\t * Bill           NAME                           PRICE           *"<<endl;
     cout<<"\t *---------------------------------------------------------------*\n";
	 cout<<"\t *			  	                                 *\n";
	 cout<<"\t * [1]		Chocolate                           'PHP 20.00'  *"<<endl;
	 cout<<"\t * [2]		Mango                               'PHP 20.00'  *"<<endl;
     cout<<"\t * [3]		Strawberry			    'PHP 20.00'  *"<<endl;
	 cout<<"\t * [4]		Ube                                 'PHP 20.00'  *"<<endl;
     cout<<"\t * [5]		Vanilla 			    'PHP 20.00'  *"<<endl;
     cout<<"\t * [6]		Exit and show price                              *"<<endl;
	 cout<<"\t *			  	                                 *\n";
	 cout<<"\t * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * "<<endl;
     cout<<"\n\tYour choice : ";
      
}
Last edited on
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
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
class DessertThree: public MainMenu
{
public:
	DessertThree();
	void showMenu();

private:

};

DessertThree::DessertThree()
{

}

void DessertThree::showMenu()
{
	 cout<<"\nSelect type of Pie Slices:"<<endl<<endl;
	 cout<<"\t * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * \n";
     cout<<"\t * Bill           NAME                           PRICE           *"<<endl;
     cout<<"\t *---------------------------------------------------------------*\n";
	 cout<<"\t *			  	                                 *\n";
	 cout<<"\t * [1]		Apple Pie                           'PHP 15.00'  *"<<endl;
	 cout<<"\t * [2]		buko Pie                            'PHP 15.00'  *"<<endl;
     cout<<"\t * [3]		Cherry Pie			    'PHP 15.00'  *"<<endl;
	 cout<<"\t * [4]		Custard Pie                         'PHP 15.00'  *"<<endl;
     cout<<"\t * [5]		Pumpmkin Pie 			    'PHP 15.00'  *"<<endl;
     cout<<"\t * [6]		Exit and show price                              *"<<endl;
	 cout<<"\t *			  	                                 *\n";
	 cout<<"\t * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * "<<endl;
     cout<<"\n\tYour choice : ";
      
}

void intro();
void menuFunction();
void mainMenu();
void menuOne();
void menuTwo();
void menuThree();
void mealOne();
void mealTwo();
void mealThree();
void mealFour();
void drinkOne();
void drinkTwo();
void drinkThree();
void drinkFour();
void dessertOne();
void dessertTwo();
void dessertThree();
void totalAmount();
void menuConfirmation();


int main()
{
	intro();
    
	menuFunction();
	
	mainMenu();
	totalAmount();
	menuConfirmation();
	cout<<"\t =================================================== \n";  
	cout<<"\t * * * * * * * * * * * * * * * * * * * * * * * * * *\n";
	cout<<"\t *			  	                   *\n";
	cout<<"\t *			  	                   *\n";
    cout<<"\t *      Enjoy your meal, have a great day !!!      *"<<endl;
	cout<<"\t *			  	                   *\n";
	cout<<"\t *			  	                   *\n";
	cout<<"\t * * * * * * * * * * * * * * * * * * * * * * * * * * \n";
	cout<<"\t =================================================== \n"; 
	system("pause"); 
    //return 0;
}

void intro()
{
	cout<<"Group member     : ANSHERINE V. ABANES" <<endl;
	cout<<"                 : JEROME C. TACUBAN" <<endl;
	cout<<"\n\n";

}

    
    
void menuFunction()
{
    char userName[200];
    int contactNumber;
    char userAddress[200];

	cout<<" * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\n";
	cout<<" *			  	                                        *\n";
	cout<<" *			  	                                       *\n";
    cout<<" *      WELCOME to ANSHEROME's FOOD RESTAURANT's ORDERING SYSTEM     *"<<endl;
	cout<<" *			  	                                       *\n";
	cout<<" *			  	                                        *\n";
	cout<<" * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\n";
    
    cout<<"\n\n";
    cout<<"Please enter your name:  ";
    cin.get(userName,200);
    cout<<endl;
    
	cout<<"\n";
    cout<<"Please enter your contact number:  ";
    cin>>contactNumber;
    cout<<endl;
    
	cout<<"\n";
    cout<<"Please enter your address that you wish to deliver:  ";
    cin>>userAddress;
    cout<<endl;
}  
void  mainMenu()
{
     int menu;
     MainMenu a;
	 
	 a.showMenu();
     cin>>menu;


	 if(menu == 1)
		 menuOne();
	 
	 else if(menu == 2)
	     menuTwo();
	
     else if(menu == 3)
	     menuThree();
	  
	 else
	     mainMenu();
}

void menuOne()
{
     int meal;
	 MenuOne b;

	 b.showMenu();
     cin>>meal;

	 if(meal == 1)
		mealOne();
		
   	 else if(meal == 2)
		mealTwo();
		
	 else if(meal == 3)
		mealThree();
		
	 else if(meal == 4)
		mealFour();
		
	else
		menuOne();
}

void menuTwo()
{
	 int drinks;
	 MenuTwo c;
     
     c.showMenu();
     cin>>drinks;

	 if(drinks == 1)
		drinkOne();
     else if(drinks == 2)
		drinkTwo();
     else if(drinks == 3)
        drinkThree();
     else if(drinks == 4)
		drinkFour();
     else
	    menuTwo();
}

void menuThree()
{
	int dessert;
	MenuThree d;

    d.showMenu();
    cin>>dessert;

	if(dessert == 1)
       dessertOne();
	else if(dessert == 2)
	   dessertTwo();
    else if(dessert == 3)
	   dessertThree();
	else
	   menuThree();
}
                   
void mealOne()
{
     int chicken;
	 int quantity1=0, quantity2=0, quantity3=0, quantity4=0, quantity5=0;
	 char purchase;
     MealOne e;
     
	 e.showMenu();
     cin>>chicken;
                            
     switch (chicken)
     {
         case 1:
			cout<<"How many quantity you want: ";
			cin>>quantity1;
			cout<<endl;

			cout<<"Do you want to continue purchasing (y/n)? ";
			cin>>purchase;
			cout<<endl;

			if (purchase == 'y' || purchase == 'Y')
				mainMenu();
			
			else if (purchase == 'n' || purchase == 'N')
			{
				totalAmount();
				menuConfirmation();
			}
			else
				cout<<"Invalid Choice!"<<endl;
				break;

			
         case 2:
            cout<<"How many quantity you want: ";
			cin>>quantity2;
			cout<<endl;

			cout<<"Do you want to continue purchasing (y/n)? ";
			cin>>purchase;
			cout<<endl;

			if (purchase == 'y' || purchase == 'Y')
				mainMenu();
			
			else if (purchase == 'n' || purchase == 'N')
			{
				totalAmount();
				menuConfirmation();
			}
			else
				cout<<"Invalid Choice!"<<endl;
            
         case 3:
            cout<<"How many quantity you want: ";
			cin>>quantity3;
			cout<<endl;

			cout<<"Do you want to continue purchasing (y/n)? ";
			cin>>purchase;
			cout<<endl;

			if (purchase == 'y' || purchase == 'Y')
				mainMenu();
			
			else if (purchase == 'n' || purchase == 'N')
			{
				totalAmount();
				menuConfirmation();
			}
			else
				cout<<"Invalid Choice!"<<endl;
            
         case 4:
            cout<<"How many quantity you want: ";
			cin>>quantity4;
			cout<<endl;

			cout<<"Do you want to continue purchasing (y/n)? ";
			cin>>purchase;
			cout<<endl;

			if (purchase == 'y' || purchase == 'Y')
				mainMenu();
			
			else if (purchase == 'n' || purchase == 'N')
			{
				totalAmount();
				menuConfirmation();
			}
			else
				cout<<"Invalid Choice!"<<endl;
            
         case 5:
            cout<<"How many quantity you want: ";
			cin>>quantity5;
			cout<<endl;

			cout<<"Do you want to continue purchasing (y/n)? ";
			cin>>purchase;
			cout<<endl;

			if (purchase == 'y' || purchase == 'Y')
				mainMenu();
			
			else if (purchase == 'n' || purchase == 'N')
			{
				totalAmount();
				menuConfirmation();
			}
			else
				cout<<"Invalid Choice!"<<endl;
                                        
         default:
            cout<<" Invalid Choice "<<endl; 
      }
}       
Last edited on
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
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
void mealTwo()
{
     int meat;
	 int quantity6=0, quantity7=0, quantity8=0, quantity9=0, quantity10=0;
	 char purchase;
	 MealTwo f;

	 f.showMenu();
     cin>>meat;  
                            
     switch (meat)
     {
          case 1:
            cout<<"How many quantity you want: ";
			cin>>quantity6;
			cout<<endl;

			cout<<"Do you want to continue purchasing (y/n)? ";
			cin>>purchase;
			cout<<endl;

			if (purchase == 'y' || purchase == 'Y')
				mainMenu();
			
			else if (purchase == 'n' || purchase == 'N')
			{
				totalAmount();
				menuConfirmation();
			}
			else
				cout<<"Invalid Choice!"<<endl;
              
          case 2:
            cout<<"How many quantity you want";
			cin>>quantity7;
			cout<<endl;

			cout<<"Do you want to continue purchasing (y/n)? ";
			cin>>purchase;
			cout<<endl;

			if (purchase == 'y' || purchase == 'Y')
				mainMenu();
			
			else if (purchase == 'n' || purchase == 'N')
			{
				totalAmount();
				menuConfirmation();
			}
			else
				cout<<"Invalid Choice!"<<endl;
             
          case 3:
            cout<<"How many quantity you want";
			cin>>quantity8;
			cout<<endl;

			cout<<"Do you want to continue purchasing (y/n)? ";
			cin>>purchase;
			cout<<endl;

			if (purchase == 'y' || purchase == 'Y')
				mainMenu();
			
			else if (purchase == 'n' || purchase == 'N')
			{
				totalAmount();
				menuConfirmation();
			}
			else
				cout<<"Invalid Choice!"<<endl;
              
          case 4:
            cout<<"How many quantity you want: ";
			cin>>quantity9;
			cout<<endl;

			cout<<"Do you want to continue purchasing (y/n)? ";
			cin>>purchase;
			cout<<endl;

			if (purchase == 'y' || purchase == 'Y')
				mainMenu();
			
			else if (purchase == 'n' || purchase == 'N')
			{
				totalAmount();
				menuConfirmation();
			}
			else
				cout<<"Invalid Choice!"<<endl;
              
          case 5:
            cout<<"How many quantity you want: ";
			cin>>quantity10;
			cout<<endl;

			cout<<"Do you want to continue purchasing (y/n)? ";
			cin>>purchase;
			cout<<endl;

			if (purchase == 'y' || purchase == 'Y')
				mainMenu();
			
			else if (purchase == 'n' || purchase == 'N')
			{
				totalAmount();
				menuConfirmation();
			}
			else
				cout<<"Invalid Choice!"<<endl;
                                         
          default:
              cout<<" Invalid Choice "<<endl; 
      }    
}
                          
void mealThree()
{
     int seafood;
	 int quantity11=0, quantity12=0, quantity13=0, quantity14=0, quantity15=0;
	 char purchase;
	 MealThree g;

	 g.showMenu();
     cin>>seafood;  
                            
     switch (seafood)
     {
         case 1:
            cout<<"How many quantity you want: ";
			cin>>quantity11;
			cout<<endl;

			cout<<"Do you want to continue purchasing (y/n)? ";
			cin>>purchase;
			cout<<endl;

			if (purchase == 'y' || purchase == 'Y')
				mainMenu();
			
			else if (purchase == 'n' || purchase == 'N')
			{
				totalAmount();
				menuConfirmation();
			}
			else
				cout<<"Invalid Choice!"<<endl;
             
         case 2:
            cout<<"How many quantity you want: ";
			cin>>quantity12;
			cout<<endl;

			cout<<"Do you want to continue purchasing (y/n)? ";
			cin>>purchase;
			cout<<endl;

			if (purchase == 'y' || purchase == 'Y')
				mainMenu();
			
			else if (purchase == 'n' || purchase == 'N')
			{
				totalAmount();
				menuConfirmation();
			}
			else
				cout<<"Invalid Choice!"<<endl;
            
         case 3:
            cout<<"How many quantity you want: ";
			cin>>quantity13;
			cout<<endl;

			cout<<"Do you want to continue purchasing (y/n)? ";
			cin>>purchase;
			cout<<endl;

			if (purchase == 'y' || purchase == 'Y')
				mainMenu();
			
			else if (purchase == 'n' || purchase == 'N')
			{
				totalAmount();
				menuConfirmation();
			}
			else
				cout<<"Invalid Choice!"<<endl;
            
         case 4:
            cout<<"How many quantity you want: ";
			cin>>quantity14;
			cout<<endl;

			cout<<"Do you want to continue purchasing (y/n)? ";
			cin>>purchase;
			cout<<endl;

			if (purchase == 'y' || purchase == 'Y')
				mainMenu();
			
			else if (purchase == 'n' || purchase == 'N')
			{
				totalAmount();
				menuConfirmation();
			}
			else
				cout<<"Invalid Choice!"<<endl;
             
         case 5:
            cout<<"How many quantity you want: ";
			cin>>quantity15;
			cout<<endl;

			cout<<"Do you want to continue purchasing (y/n)? ";
			cin>>purchase;
			cout<<endl;

			if (purchase == 'y' || purchase == 'Y')
				mainMenu();
			
			else if (purchase == 'n' || purchase == 'N')
			{
				totalAmount();
				menuConfirmation();
			}
			else
				cout<<"Invalid Choice!"<<endl;
                                        
         default:
            cout<<" Invalid Choice "<<endl; 
     } 
}
                        
void mealFour()
{
     int vegetables;
     int quantity16=0, quantity17=0, quantity18=0, quantity19=0, quantity20=0;
	 char purchase;
	 MealFour h;
     
	 h.showMenu();
     cin>>vegetables;                
                             
     switch (vegetables)
     {
         case 1:
            cout<<"How many quantity you want: ";
			cin>>quantity16;
			cout<<endl;

			cout<<"Do you want to continue purchasing (y/n)? ";
			cin>>purchase;
			cout<<endl;

			if (purchase == 'y' || purchase == 'Y')
				mainMenu();
			
			else if (purchase == 'n' || purchase == 'N')
			{
				totalAmount();
				menuConfirmation();
			}
			else
				cout<<"Invalid Choice!"<<endl;
             
         case 2:
            cout<<"How many quantity you want: ";
			cin>>quantity17;
			cout<<endl;

			cout<<"Do you want to continue purchasing (y/n)? ";
			cin>>purchase;
			cout<<endl;

			if (purchase == 'y' || purchase == 'Y')
				mainMenu();
			
			else if (purchase == 'n' || purchase == 'N')
			{
				totalAmount();
				menuConfirmation();
			}
			else
				cout<<"Invalid Choice!"<<endl;
            
         case 3:
            cout<<"How many quantity you want: ";
			cin>>quantity18;
			cout<<endl;

			cout<<"Do you want to continue purchasing (y/n)? ";
			cin>>purchase;
			cout<<endl;

			if (purchase == 'y' || purchase == 'Y')
				mainMenu();
			
			else if (purchase == 'n' || purchase == 'N')
			{
				totalAmount();
				menuConfirmation();
			}
			else
				cout<<"Invalid Choice!"<<endl;
            
         case 4:
            cout<<"How many quantity you want: ";
			cin>>quantity19;
			cout<<endl;

			cout<<"Do you want to continue purchasing (y/n)? ";
			cin>>purchase;
			cout<<endl;

			if (purchase == 'y' || purchase == 'Y')
				mainMenu();
			
			else if (purchase == 'n' || purchase == 'N')
			{
				totalAmount();
				menuConfirmation();
			}
			else
				cout<<"Invalid Choice!"<<endl;
             
         case 5:
            cout<<"How many quantity you want: ";
			cin>>quantity20;
			cout<<endl;

			cout<<"Do you want to continue purchasing (y/n)? ";
			cin>>purchase;
			cout<<endl;

			if (purchase == 'y' || purchase == 'Y')
				mainMenu();
			
			else if (purchase == 'n' || purchase == 'N')
			{
				totalAmount();
				menuConfirmation();
			}
			else
				cout<<"Invalid Choice!"<<endl;
                                        
         default:
            cout<<" Invalid Choice "<<endl;  
     } 
}
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
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
void drinkOne()
{
     int hotDrinks;
     int quantity21=0, quantity22=0, quantity23=0, quantity24=0, quantity25=0;
	 char purchase;
	 DrinkOne i;
     
     i.showMenu();
     cin>>hotDrinks;
                            
     switch (hotDrinks)
     {
            case 1:
            cout<<"How many quantity you want: ";
			cin>>quantity21;
			cout<<endl;

			cout<<"Do you want to continue purchasing (y/n)? ";
			cin>>purchase;
			cout<<endl;

			if (purchase == 'y' || purchase == 'Y')
				mainMenu();
			
			else if (purchase == 'n' || purchase == 'N')
			{
				totalAmount();
				menuConfirmation();
			}
			else
				cout<<"Invalid Choice!"<<endl;
             
         case 2:
            cout<<"How many quantity you want: ";
			cin>>quantity22;
			cout<<endl;

			cout<<"Do you want to continue purchasing (y/n)? ";
			cin>>purchase;
			cout<<endl;

			if (purchase == 'y' || purchase == 'Y')
				mainMenu();
			
			else if (purchase == 'n' || purchase == 'N')
			{
				totalAmount();
				menuConfirmation();
			}
			else
				cout<<"Invalid Choice!"<<endl;
            
         case 3:
            cout<<"How many quantity you want: ";
			cin>>quantity23;
			cout<<endl;

			cout<<"Do you want to continue purchasing (y/n)? ";
			cin>>purchase;
			cout<<endl;

			if (purchase == 'y' || purchase == 'Y')
				mainMenu();
			
			else if (purchase == 'n' || purchase == 'N')
			{
				totalAmount();
				menuConfirmation();
			}
			else
				cout<<"Invalid Choice!"<<endl;
            
         case 4:
            cout<<"How many quantity you want: ";
			cin>>quantity24;
			cout<<endl;

			cout<<"Do you want to continue purchasing (y/n)? ";
			cin>>purchase;
			cout<<endl;

			if (purchase == 'y' || purchase == 'Y')
				mainMenu();
			
			else if (purchase == 'n' || purchase == 'N')
			{
				totalAmount();
				menuConfirmation();
			}
			else
				cout<<"Invalid Choice!"<<endl;
             
         case 5:
            cout<<"How many quantity you want: ";
			cin>>quantity25;
			cout<<endl;

			cout<<"Do you want to continue purchasing (y/n)? ";
			cin>>purchase;
			cout<<endl;

			if (purchase == 'y' || purchase == 'Y')
				mainMenu();
			
			else if (purchase == 'n' || purchase == 'N')
			{
				totalAmount();
				menuConfirmation();
			}
			else
				cout<<"Invalid Choice!"<<endl;
                                        
         default:
            cout<<" Invalid Choice "<<endl; 
     }
}
                        
void drinkTwo()
{
     int coldDrinks;
     int quantity26=0, quantity27=0, quantity28=0, quantity29=0, quantity30=0;
	 char purchase;
	 DrinkTwo j;
     
     j.showMenu();
     cin>>coldDrinks;  
                            
     switch (coldDrinks)
     {
            case 1:
            cout<<"How many quantity you want: ";
			cin>>quantity26;
			cout<<endl;

			cout<<"Do you want to continue purchasing (y/n)? ";
			cin>>purchase;
			cout<<endl;

			if (purchase == 'y' || purchase == 'Y')
				mainMenu();
			
			else if (purchase == 'n' || purchase == 'N')
			{
				totalAmount();
				menuConfirmation();
			}
			else
				cout<<"Invalid Choice!"<<endl;
             
         case 2:
            cout<<"How many quantity you want: ";
			cin>>quantity27;
			cout<<endl;

			cout<<"Do you want to continue purchasing (y/n)? ";
			cin>>purchase;
			cout<<endl;

			if (purchase == 'y' || purchase == 'Y')
				mainMenu();
			
			else if (purchase == 'n' || purchase == 'N')
			{
				totalAmount();
				menuConfirmation();
			}
			else
				cout<<"Invalid Choice!"<<endl;
            
         case 3:
            cout<<"How many quantity you want: ";
			cin>>quantity28;
			cout<<endl;

			cout<<"Do you want to continue purchasing (y/n)? ";
			cin>>purchase;
			cout<<endl;

			if (purchase == 'y' || purchase == 'Y')
				mainMenu();
			
			else if (purchase == 'n' || purchase == 'N')
			{
				totalAmount();
				menuConfirmation();
			}
			else
				cout<<"Invalid Choice!"<<endl;
            
         case 4:
            cout<<"How many quantity you want: ";
			cin>>quantity29;
			cout<<endl;

			cout<<"Do you want to continue purchasing (y/n)? ";
			cin>>purchase;
			cout<<endl;

			if (purchase == 'y' || purchase == 'Y')
				mainMenu();
			
			else if (purchase == 'n' || purchase == 'N')
			{
				totalAmount();
				menuConfirmation();
			}
			else
				cout<<"Invalid Choice!"<<endl;
             
         case 5:
            cout<<"How many quantity you want: ";
			cin>>quantity30;
			cout<<endl;

			cout<<"Do you want to continue purchasing (y/n)? ";
			cin>>purchase;
			cout<<endl;

			if (purchase == 'y' || purchase == 'Y')
				mainMenu();
			
			else if (purchase == 'n' || purchase == 'N')
			{
				totalAmount();
				menuConfirmation();
			}
			else
				cout<<"Invalid Choice!"<<endl;
                                        
         default:
            cout<<" Invalid Choice "<<endl; 
     }    
}
void drinkThree()
{
     int carbonateDrinks; 
     int quantity31=0, quantity32=0, quantity33=0, quantity34=0, quantity35=0;
	 char purchase; 
	 DrinkThree k;
     
     k.showMenu();
     cin>>carbonateDrinks;  
                            
     switch (carbonateDrinks)
     {
            case 1:
            cout<<"How many quantity you want: ";
			cin>>quantity31;
			cout<<endl;

			cout<<"Do you want to continue purchasing (y/n)? ";
			cin>>purchase;
			cout<<endl;

			if (purchase == 'y' || purchase == 'Y')
				mainMenu();
			
			else if (purchase == 'n' || purchase == 'N')
			{
				totalAmount();
				menuConfirmation();
			}
			else
				cout<<"Invalid Choice!"<<endl;
             
         case 2:
            cout<<"How many quantity you want: ";
			cin>>quantity32;
			cout<<endl;

			cout<<"Do you want to continue purchasing (y/n)? ";
			cin>>purchase;
			cout<<endl;

			if (purchase == 'y' || purchase == 'Y')
				mainMenu();
			
			else if (purchase == 'N' || purchase == 'Y')
			{
				totalAmount();
				menuConfirmation();
			}
			else
				cout<<"Invalid Choice!"<<endl;
            
         case 3:
            cout<<"How many quantity you want: ";
			cin>>quantity33;
			cout<<endl;

			cout<<"Do you want to continue purchasing (y/n)? ";
			cin>>purchase;
			cout<<endl;

			if (purchase == 'y' || purchase == 'Y')
				mainMenu();
			
			else if (purchase == 'n' || purchase == 'N')
			{
				totalAmount();
				menuConfirmation();
			}
			else
				cout<<"Invalid Choice!"<<endl;
            
         case 4:
            cout<<"How many quantity you want: ";
			cin>>quantity34;
			cout<<endl;

			cout<<"Do you want to continue purchasing (y/n)? ";
			cin>>purchase;
			cout<<endl;

			if (purchase == 'y' || purchase == 'Y')
				mainMenu();
			
			else if (purchase == 'n' || purchase == 'N')
			{
				totalAmount();
				menuConfirmation();
			}
			else
				cout<<"Invalid Choice!"<<endl;
             
         case 5:
            cout<<"How many quantity you want: ";
			cin>>quantity35;
			cout<<endl;

			cout<<"Do you want to continue purchasing (y/n)? ";
			cin>>purchase;
			cout<<endl;

			if (purchase == 'y' || purchase == 'Y')
				mainMenu();
			
			else if (purchase == 'n' || purchase == 'N')
			{
				totalAmount();
				menuConfirmation();
			}
			else
				cout<<"Invalid Choice!"<<endl;
                                        
         default:
            cout<<" Invalid Choice "<<endl; 
     }  
} 
        
                        
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
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
void drinkFour()
{ 
     int juices;
     int quantity36=0, quantity37=0, quantity38=0, quantity39=0, quantity40=0;
	 char purchase; 
	 DrinkFour l;
     
     l.showMenu();
     cin>>juices;  
                            
     switch (juices)
     {
        case 1:
            cout<<"How many quantity you want: ";
			cin>>quantity36;
			cout<<endl;

			cout<<"Do you want to continue purchasing (y/n)? ";
			cin>>purchase;
			cout<<endl;

			if (purchase == 'y' || purchase == 'Y')
				mainMenu();
			
			else if (purchase == 'n' || purchase == 'N')
			{
				totalAmount();
				menuConfirmation();
			}
			else
				cout<<"Invalid Choice!"<<endl;
             
         case 2:
            cout<<"How many quantity you want: ";
			cin>>quantity37;
			cout<<endl;

			cout<<"Do you want to continue purchasing (y/n)? ";
			cin>>purchase;
			cout<<endl;

			if (purchase == 'y' || purchase == 'Y')
				mainMenu();
			
			else if (purchase == 'n' || purchase == 'N')
			{
				totalAmount();
				menuConfirmation();
			}
			else
				cout<<"Invalid Choice!"<<endl;
            
         case 3:
            cout<<"How many quantity you want: ";
			cin>>quantity38;
			cout<<endl;

			cout<<"Do you want to continue purchasing (y/n)? ";
			cin>>purchase;
			cout<<endl;

			if (purchase == 'y' || purchase == 'Y')
				mainMenu();
			
			else if (purchase == 'n' || purchase == 'N')
			{
				totalAmount();
				menuConfirmation();
			}
			else
				cout<<"Invalid Choice!"<<endl;
            
         case 4:
            cout<<"How many quantity you want: ";
			cin>>quantity39;
			cout<<endl;

			cout<<"Do you want to continue purchasing (y/n)? ";
			cin>>purchase;
			cout<<endl;

			if (purchase == 'y' || purchase == 'Y')
				mainMenu();
			
			else if (purchase == 'n' || purchase == 'N')
			{
				totalAmount();
				menuConfirmation();
			}
			else
				cout<<"Invalid Choice!"<<endl;
             
         case 5:
            cout<<"How many quantity you want: ";
			cin>>quantity40;
			cout<<endl;

			cout<<"Do you want to continue purchasing (y/n)? ";
			cin>>purchase;
			cout<<endl;

			if (purchase == 'y' || purchase == 'Y')
				mainMenu();
			
			else if (purchase == 'n' || purchase == 'N')
			{
				totalAmount();
				menuConfirmation();
			}
			else
				cout<<"Invalid Choice!"<<endl;
                                        
         default:
            cout<<" Invalid Choice "<<endl; 
     } 
} 
                         
void dessertOne()
{
     int cake;
     int quantity41=0, quantity42=0, quantity43=0, quantity44=0, quantity45=0;
	 char purchase; 
	 DessertOne m;
                       
     m.showMenu();
     cin>>cake;
                            
     switch (cake)
     {
        case 1:
            cout<<"How many quantity you want: ";
			cin>>quantity41;
			cout<<endl;

			cout<<"Do you want to continue purchasing (y/n)? ";
			cin>>purchase;
			cout<<endl;

			if (purchase == 'y' || purchase == 'Y')
				mainMenu();
			
			else if (purchase == 'n' || purchase == 'N')
			{
				totalAmount();
				menuConfirmation();
			}
			else
				cout<<"Invalid Choice!"<<endl;
             
         case 2:
            cout<<"How many quantity you want: ";
			cin>>quantity42;
			cout<<endl;

			cout<<"Do you want to continue purchasing (y/n)? ";
			cin>>purchase;
			cout<<endl;

			if (purchase == 'y' || purchase == 'Y')
				mainMenu();
			
			else if (purchase == 'n' || purchase == 'N')
			{
				totalAmount();
				menuConfirmation();
			}
			else
				cout<<"Invalid Choice!"<<endl;
            
         case 3:
            cout<<"How many quantity you want: ";
			cin>>quantity43;
			cout<<endl;

			cout<<"Do you want to continue purchasing (y/n)? ";
			cin>>purchase;
			cout<<endl;

			if (purchase == 'y' || purchase == 'Y')
				mainMenu();
			
			else if (purchase == 'n' || purchase == 'N')
			{
				totalAmount();
				menuConfirmation();
			}
			else
				cout<<"Invalid Choice!"<<endl;
           
         case 4:
            cout<<"How many quantity you want: ";
			cin>>quantity44;
			cout<<endl;

			cout<<"Do you want to continue purchasing (y/n)? ";
			cin>>purchase;
			cout<<endl;

			if (purchase == 'y' || purchase == 'Y')
				mainMenu();
			
			else if (purchase == 'n' || purchase == 'N')
			{
				totalAmount();
				menuConfirmation();
			}
			else
				cout<<"Invalid Choice!"<<endl;
             
         case 5:
            cout<<"How many quantity you want: ";
			cin>>quantity45;
			cout<<endl;

			cout<<"Do you want to continue purchasing (y/n)? ";
			cin>>purchase;
			cout<<endl;

			if (purchase == 'y' || purchase == 'Y')
				mainMenu();
			
			else if (purchase == 'n' || purchase == 'N')
			{
				totalAmount();
				menuConfirmation();
			}
			else
				cout<<"Invalid Choice!"<<endl;
                                        
         default:
            cout<<" Invalid Choice "<<endl; 
     }  
}
 
 void dessertTwo()
 {
      int iceCream;
      int quantity46=0, quantity47=0, quantity48=0, quantity49=0, quantity50=0;
	  char purchase; 
	  DessertTwo n;
      
      n.showMenu();
      cin>>iceCream;
                            
      switch (iceCream)
      {
         case 1:
            cout<<"How many quantity you want: ";
			cin>>quantity46;
			cout<<endl;

			cout<<"Do you want to continue purchasing (y/n)? ";
			cin>>purchase;
			cout<<endl;

			if (purchase == 'y' || purchase == 'Y')
				mainMenu();
			
			else if (purchase == 'n' || purchase == 'N')
			{
				totalAmount();
				menuConfirmation();
			}
			else
				cout<<"Invalid Choice!"<<endl;
             
         case 2:
            cout<<"How many quantity you want: ";
			cin>>quantity47;
			cout<<endl;

			cout<<"Do you want to continue purchasing (y/n)? ";
			cin>>purchase;
			cout<<endl;

			if (purchase == 'y' || purchase == 'Y')
				mainMenu();
			
			else if (purchase == 'n' || purchase == 'N')
			{
				totalAmount();
				menuConfirmation();
			}
			else
				cout<<"Invalid Choice!"<<endl;
            
         case 3:
            cout<<"How many quantity you want: ";
			cin>>quantity48;
			cout<<endl;

			cout<<"Do you want to continue purchasing (y/n)? ";
			cin>>purchase;
			cout<<endl;

			if (purchase == 'y' || purchase == 'Y')
				mainMenu();
			
			else if (purchase == 'n' || purchase == 'N')
			{
				totalAmount();
				menuConfirmation();
			}
			else
				cout<<"Invalid Choice!"<<endl;
            
         case 4:
            cout<<"How many quantity you want: ";
			cin>>quantity49;
			cout<<endl;

			cout<<"Do you want to continue purchasing (y/n)? ";
			cin>>purchase;
			cout<<endl;

			if (purchase == 'y' || purchase == 'Y')
				mainMenu();
			
			else if (purchase == 'n' || purchase == 'N')
			{
				totalAmount();
				menuConfirmation();
			}
			else
				cout<<"Invalid Choice!"<<endl;
             
         case 5:
            cout<<"How many quantity you want: ";
			cin>>quantity50;
			cout<<endl;

			cout<<"Do you want to continue purchasing (y/n)? ";
			cin>>purchase;
			cout<<endl;

			if (purchase == 'y' || purchase == 'Y')
				mainMenu();
			
			else if (purchase == 'n' || purchase == 'N')
			{
				totalAmount();
				menuConfirmation();
			}
			else
				cout<<"Invalid Choice!"<<endl;
                                        
         default:
            cout<<" Invalid Choice "<<endl; 
      } 
 } 
      
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
 void dessertThree()
 { 
      int ABC;
      int quantity51=0, quantity52=0, quantity53=0, quantity54=0, quantity55=0;
	  char purchase; 
	  DessertThree o;
      
      o.showMenu();
      cin>>ABC;
                            
      switch (ABC)
      {
             case 1:
            cout<<"How many quantity you want: ";
			cin>>quantity51;
			cout<<endl;

			cout<<"Do you want to continue purchasing (y/n)? ";
			cin>>purchase;
			cout<<endl;

			if (purchase == 'y' || purchase == 'Y')
				mainMenu();
			
			else if (purchase == 'n' || purchase == 'N')
			{
				totalAmount();
				menuConfirmation();
			}
			else
				cout<<"Invalid Choice!"<<endl;
             
         case 2:
            cout<<"How many quantity you want: ";
			cin>>quantity52;
			cout<<endl;

			cout<<"Do you want to continue purchasing (y/n)? ";
			cin>>purchase;
			cout<<endl;

			if (purchase == 'y' || purchase == 'Y')
				mainMenu();
			
			else if (purchase == 'n' || purchase == 'N')
			{
				totalAmount();
				menuConfirmation();
			}
			else
				cout<<"Invalid Choice!"<<endl;
            
         case 3:
            cout<<"How many quantity you want: ";
			cin>>quantity53;
			cout<<endl;

			cout<<"Do you want to continue purchasing (y/n)? ";
			cin>>purchase;
			cout<<endl;

			if (purchase == 'y' || purchase == 'Y')
				mainMenu();
			
			else if (purchase == 'n' || purchase == 'N')
			{
				totalAmount();
				menuConfirmation();
			}
			else
				cout<<"Invalid Choice!"<<endl;
            
         case 4:
            cout<<"How many quantity you want: ";
			cin>>quantity54;
			cout<<endl;

			cout<<"Do you want to continue purchasing (y/n)? ";
			cin>>purchase;
			cout<<endl;

			if (purchase == 'y' || purchase == 'Y')
				mainMenu();
			
			else if (purchase == 'n' || purchase == 'N')
			{
				totalAmount();
				menuConfirmation();
			}
			else
				cout<<"Invalid Choice!"<<endl;
             
         case 5:
            cout<<"How many quantity you want: ";
			cin>>quantity55;
			cout<<endl;

			cout<<"Do you want to continue purchasing (y/n)? ";
			cin>>purchase;
			cout<<endl;

			if (purchase == 'y' || purchase == 'Y')
				mainMenu();
			
			else if (purchase == 'n' || purchase == 'N')
			{
				totalAmount();
				menuConfirmation();
			}
			else
				cout<<"Invalid Choice!"<<endl;
                                        
         default:
            cout<<" Invalid Choice "<<endl; 
      }  
}

void totalAmount()
{
	double amount1, total;
	int quantity1;

	amount1=quantity1*10;

	total=amount1;
}

      
void menuConfirmation()
{
     char userName[200];
     int contactNumber;
     char userAddress;
     double govTax;
     double total;
     
     cout << "Customer name : " << userName << endl;
     cout << "Contact number : "<< contactNumber << endl;
	 cout << "Address that wish to deliver: "<< userAddress << endl;
     cout << "Gov tax: PHP "<< govTax << endl;
	 cout << "Total : PHP" << total << endl;
}
Topic archived. No new replies allowed.