food ordering system

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
243
 #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()
{

}
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 : ";
      
}
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
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; 
      }
}       
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
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;
}
Is that all one program? Do you realize how much repeated code you have??

1
2
3
4
5
6
7
8
9
void totalAmount()
{
	double amount1, total;
	int quantity1;

	amount1=quantity1*10;

	total=amount1;
}

This does literally nothing at best, and is undefined behavior at worst.
amount1, total, and quantity1 are all local variables. And also uninitialized .
You then assign uninitialized, local variables to other unassigned, local variables. At the end of your function, nothing has changed in relation to the rest of your program.

It also defeats the point of a class if you're making 6 almost-exactly-the-same classes to do one specific thing.

I would look up what the "scope" of a variable is, and how to pass variables into different functions.
Last edited on
yeah .. this is ...

as of now, im rushing and pushing my self on how i can fix this ..
actually I dont know what to do now .. and it is part
of our final exam .. so i decided to post it here ..
hoping that someone can solve the problem that I have about this ..

thanks for the reply :) :)
Last edited on
i also tried this one ,,

but how can i loop it ??

now ,
the total is now appearing but the problem is, this only reads the total of my first transaction
when I'm about to try to input another transaction this doesn't add the first transaction to second transaction ..

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
#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()
{
double mOne1 = 90.00, mOne2 = 90.00, mOne3 = 90.00, mOne4 = 90.00, mOne5 = 90.00;
	 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 "<<mOne1<<"   *"<<endl;
	 cout<<"\t * [2]		Chicken Chilly			'PHP "<<mOne2<<"    *"<<endl;
     cout<<"\t * [3]		Chicken Curry			'PHP "<<mOne3<<"     *"<<endl;
	 cout<<"\t * [4]		Chicken Inasal			'PHP "<<mOne4<<"    *"<<endl;
     cout<<"\t * [5]		Sweet and Sour Chicken		'PHP "<<mOne5<<"       *"<<endl;
     cout<<"\t *			                                     *\n";
	 cout<<"\t * [6]		Cancel you purchasing			     *"<<endl;
     cout<<"\t * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *"<<endl;
     cout<<"\n\tYour choice : ";
}

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

private:

};
MealTwo::MealTwo()
{

}

void MealTwo::showMenu()
{
double mTwo1 = 90.00, mTwo2 = 100.00, mTwo3 = 100.00, mTwo4 = 90.00, mTwo5 = 85.00;
	 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 "<<mTwo1<<"   *"<<endl;
	 cout<<"\t * [2]		Bicol Express                       'PHP "<<mTwo2<<"    *"<<endl;
	 cout<<"\t * [3]		Black Pepper Beef Chop              'PHP "<<mTwo3<<"     *"<<endl;
	 cout<<"\t * [4]		Lechon Kawali                       'PHP "<<mTwo4<<"    *"<<endl;
     cout<<"\t * [5]		Pork Chop			    'PHP "<<mTwo5<<"       *"<<endl;
     cout<<"\t *                                                              *\n";
	 cout<<"\t * [6]		Cancel you purchasing		                 *"<<endl;
	 cout<<"\t * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * "<<endl;
     cout<<"\n\tYour choice : ";
}

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

private:

};

MealThree::MealThree()
{

}

void MealThree::showMenu()
{
	double mThree1 = 80.00, mThree2 = 85.00, mThree3 = 90.00, mThree4 = 80.00, mThree5 = 70.00;
	 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 "<<mThree1<<"  *"<<endl;
	 cout<<"\t * [2]		Fish curry		        'PHP "<<mThree2<<" *"<<endl;
     cout<<"\t * [3]		Sweet and sour prawn	        'PHP "<<mThree3<<"' *"<<endl;
	 cout<<"\t * [4]		Prawn with vegetables	        'PHP "<<mThree4<<" *"<<endl;
     cout<<"\t * [5]		Prawn				'PHP "<<mThree5<<"  *"<<endl;
     cout<<"\t *                                                              *\n";
	 cout<<"\t * [6]		Cancel you purchasing		                 *"<<endl;
	 cout<<"\t * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * "<<endl;
     cout<<"\n\tYour choice : ";
}

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

private:

};

MealFour::MealFour()
{

}

void MealFour::showMenu()
{
	double mFour1 = 90.00, mFour2 = 100.00, mFour3 = 100.00, mFour4 = 90.00, mFour5 = 85.00;
	 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 "<<mFour1<<"  *"<<endl;
	 cout<<"\t * [2]		Balatong		        'PHP "<<mFour2<<"  *"<<endl;
     cout<<"\t * [3]		Chopseuy	                'PHP "<<mFour3<<"  *"<<endl;
	 cout<<"\t * [4]		Dinengdeng na Labong	        'PHP "<<mFour4<<"  *"<<endl;
     cout<<"\t * [5]		Pinakbet			'PHP "<<mFour5<<"  *"<<endl;
     cout<<"\t *                                                              *\n";
	 cout<<"\t * [6]		Cancel you purchasing		                 *"<<endl;
	 cout<<"\t * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * "<<endl;
     cout<<"\n\tYour choice : ";
}
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
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 : ";
      
}

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 : ";
      
}

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

	 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>>userName;
    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()
{
	double total, tax_total;
	double mOne1 = 90.00, mOne2 = 90.00, mOne3 = 90.00, mOne4 = 90.00, mOne5 = 90.00;
     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 << "What is the quantity you would like?" << endl;
						cout << "Quantity: ";
						cin >> quantity1;
						cout << endl;
                        cout<<"Do you want to cancel your purchasing (y/n)? ";
			cin>>purchase;
			cout<<endl;

			if (purchase == 'y' || purchase == 'Y')
				mainMenu();
			
			else if (purchase == 'n' || purchase == 'N')
			{
						total = (quantity1*mOne1);
						tax_total = total * 1.083;

                        cout << "Proceeding to check out..." << endl << endl;
						cout << "Your total is: Php" << total << endl;
						cout << "Your total after tax is: Php" << tax_total << endl;
						cout << "Thank you and have a nice day" << endl;
			}
			else
				cout<<"Invalid Choice!"<<endl;
            break;

	case 2:
                        cout << "What is the quantity you would like?" << endl;
						cout << "Quantity: ";
						cin >> quantity2;
						cout << endl;
                        cout<<"Do you want to cancel your purchasing (y/n)? ";
			cin>>purchase;
			cout<<endl;

			if (purchase == 'y' || purchase == 'Y')
				mainMenu();
			
			else if (purchase == 'n' || purchase == 'N')
			{
						total = (quantity2*mOne2);
						tax_total = total * 1.083;

                        cout << "Proceeding to check out..." << endl << endl;
						cout << "Your total is: Php" << total << endl;
						cout << "Your total after tax is: Php" << tax_total << endl;
						cout << "Thank you and have a nice day" << endl;	
			}
			else
				cout<<"Invalid Choice!"<<endl;
			break;
	case 3:
                        cout << "What is the quantity you would like?" << endl;
						cout << "Quantity: ";
						cin >> quantity3;
						cout << endl;
                        cout<<"Do you want to cancel your purchasing (y/n)? ";
			cin>>purchase;
			cout<<endl;

			if (purchase == 'y' || purchase == 'Y')
				mainMenu();
			
			else if (purchase == 'n' || purchase == 'N')
			{

						total = (quantity3*mOne3);
						tax_total = total * 1.083;

                        cout << "Proceeding to check out..." << endl << endl;
						cout << "Your total is: Php" << total << endl;
						cout << "Your total after tax is: Php" << tax_total << endl;
						cout << "Thank you and have a nice day" << endl;
			
			}
			else
				cout<<"Invalid Choice!"<<endl;
			break;
	case 4:
                        cout << "What is the quantity you would like?" << endl;
						cout << "Quantity: ";
						cin >> quantity4;
						cout << endl;
                        cout<<"Do you want to cancel your purchasing (y/n)? ";
			cin>>purchase;
			cout<<endl;

			if (purchase == 'y' || purchase == 'Y')
				mainMenu();
			
			else if (purchase == 'n' || purchase == 'N')
			{

						total = (quantity4*mOne4);
						tax_total = total * 1.083;

                        cout << "Proceeding to check out..." << endl << endl;
						cout << "Your total is: Php" << total << endl;
						cout << "Your total after tax is: Php" << tax_total << endl;
						cout << "Thank you and have a nice day" << endl;
			
			}
			else
				cout<<"Invalid Choice!"<<endl;
			break;
	case 5:
                        cout << "What is the quantity you would like?" << endl;
						cout << "Quantity: ";
						cin >> quantity5;
						cout << endl;
                        cout<<"Do you want to cancel your purchasing (y/n)? ";
			cin>>purchase;
			cout<<endl;

			if (purchase == 'y' || purchase == 'Y')
				mainMenu();
			
			else if (purchase == 'n' || purchase == 'N')
			{

						total = (quantity5*mOne5);
						tax_total = total * 1.083;

                        cout << "Proceeding to check out..." << endl << endl;
						cout << "Your total is: Php" << total << endl;
						cout << "Your total after tax is: Php" << tax_total << endl;
						cout << "Thank you and have a nice day" << endl;
			
			}
			else
				cout<<"Invalid Choice!"<<endl;
			break;
	case 6:
                       total = (quantity1*mOne1);
					   total = (quantity2*mOne2);
					   total = (quantity3*mOne3);
					   total = (quantity4*mOne4);
					   total = (quantity5*mOne5);
						tax_total = total * 1.083;

                        cout << "Proceeding to check out..." << endl << endl;
						cout << "Your total is: Php" << total << endl;
						cout << "Your total after tax is: Php" << tax_total << endl;
						cout << "Thank you and have a nice day" << endl;
                        break;
	default:
						cout << "Selections must be between 1 and 6\n";
						mealOne();
			break;	
            }
        }
                        
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
void mealTwo()
{
	double total, tax_total;
	double mTwo1 = 90.00, mTwo2 = 100.00, mTwo3 = 100.00, mTwo4 = 90.00, mTwo5 = 85.00;
     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 << "What is the quantity you would like?" << endl;
						cout << "Quantity: ";
						cin >> quantity6;
						cout << endl;
                        cout<<"Do you want to cancel your purchasing (y/n)? ";
			cin>>purchase;
			cout<<endl;

			if (purchase == 'y' || purchase == 'Y')
				mainMenu();
			
			else if (purchase == 'n' || purchase == 'N')
			{
						total = (quantity6*mTwo1);
						tax_total = total * 1.083;

                        cout << "Proceeding to check out..." << endl << endl;
						cout << "Your total is: Php" << total << endl;
						cout << "Your total after tax is: Php" << tax_total << endl;
						cout << "Thank you and have a nice day" << endl;
			}
			else
				cout<<"Invalid Choice!"<<endl;
            break;

	case 2:
                        cout << "What is the quantity you would like?" << endl;
						cout << "Quantity: ";
						cin >> quantity7;
						cout << endl;
                        cout<<"Do you want to cancel your purchasing (y/n)? ";
			cin>>purchase;
			cout<<endl;

			if (purchase == 'y' || purchase == 'Y')
				mainMenu();
			
			else if (purchase == 'n' || purchase == 'N')
			{
						total = (quantity7*mTwo2);
						tax_total = total * 1.083;

                        cout << "Proceeding to check out..." << endl << endl;
						cout << "Your total is: Php" << total << endl;
						cout << "Your total after tax is: Php" << tax_total << endl;
						cout << "Thank you and have a nice day" << endl;	
			}
			else
				cout<<"Invalid Choice!"<<endl;
			break;
	case 3:
                        cout << "What is the quantity you would like?" << endl;
						cout << "Quantity: ";
						cin >> quantity8;
						cout << endl;
                        cout<<"Do you want to cancel your purchasing (y/n)? ";
			cin>>purchase;
			cout<<endl;

			if (purchase == 'y' || purchase == 'Y')
				mainMenu();
			
			else if (purchase == 'n' || purchase == 'N')
			{

						total = (quantity8*mTwo3);
						tax_total = total * 1.083;

                        cout << "Proceeding to check out..." << endl << endl;
						cout << "Your total is: Php" << total << endl;
						cout << "Your total after tax is: Php" << tax_total << endl;
						cout << "Thank you and have a nice day" << endl;
			
			}
			else
				cout<<"Invalid Choice!"<<endl;
			break;
	case 4:
                        cout << "What is the quantity you would like?" << endl;
						cout << "Quantity: ";
						cin >> quantity9;
						cout << endl;
                        cout<<"Do you want to cancel your purchasing (y/n)? ";
			cin>>purchase;
			cout<<endl;

			if (purchase == 'y' || purchase == 'Y')
				mainMenu();
			
			else if (purchase == 'n' || purchase == 'N')
			{

						total = (quantity9*mTwo4);
						tax_total = total * 1.083;

                        cout << "Proceeding to check out..." << endl << endl;
						cout << "Your total is: Php" << total << endl;
						cout << "Your total after tax is: Php" << tax_total << endl;
						cout << "Thank you and have a nice day" << endl;
			
			}
			else
				cout<<"Invalid Choice!"<<endl;
			break;
	case 5:
                        cout << "What is the quantity you would like?" << endl;
						cout << "Quantity: ";
						cin >> quantity10;
						cout << endl;
                        cout<<"Do you want to cancel your purchasing (y/n)? ";
			cin>>purchase;
			cout<<endl;

			if (purchase == 'y' || purchase == 'Y')
				mainMenu();
			
			else if (purchase == 'n' || purchase == 'N')
			{

						total = (quantity10*mTwo5);
						tax_total = total * 1.083;

                        cout << "Proceeding to check out..." << endl << endl;
						cout << "Your total is: Php" << total << endl;
						cout << "Your total after tax is: Php" << tax_total << endl;
						cout << "Thank you and have a nice day" << endl;
			
			}
			else
				cout<<"Invalid Choice!"<<endl;
			break;
	case 6:
                       total = (quantity6*mTwo1);
					   total = (quantity7*mTwo2);
					   total = (quantity8*mTwo3);
					   total = (quantity9*mTwo4);
					   total = (quantity10*mTwo5);
						tax_total = total * 1.083;

                        cout << "Proceeding to check out..." << endl << endl;
						cout << "Your total is: Php" << total << endl;
						cout << "Your total after tax is: Php" << tax_total << endl;
						cout << "Thank you and have a nice day" << endl;
                        break;
	default:
						cout << "Selections must be between 1 and 6\n";
						mealOne();
			break;	
            }
        }
                          

                         
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
void mealThree()
{
	double total, tax_total;
	double mThree1 = 80.00, mThree2 = 85.00, mThree3 = 90.00, mThree4 = 80.00, mThree5 = 70.00;
     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 << "What is the quantity you would like?" << endl;
						cout << "Quantity: ";
						cin >> quantity11;
						cout << endl;
                        cout<<"Do you want to cancel your purchasing (y/n)? ";
			cin>>purchase;
			cout<<endl;

			if (purchase == 'y' || purchase == 'Y')
				mainMenu();
			
			else if (purchase == 'n' || purchase == 'N')
			{
						total = (quantity11*mThree1);
						tax_total = total * 1.083;

                        cout << "Proceeding to check out..." << endl << endl;
						cout << "Your total is: Php" << total << endl;
						cout << "Your total after tax is: Php" << tax_total << endl;
						cout << "Thank you and have a nice day" << endl;
			}
			else
				cout<<"Invalid Choice!"<<endl;
            break;

	case 2:
                        cout << "What is the quantity you would like?" << endl;
						cout << "Quantity: ";
						cin >> quantity12;
						cout << endl;
                        cout<<"Do you want to cancel your purchasing (y/n)? ";
			cin>>purchase;
			cout<<endl;

			if (purchase == 'y' || purchase == 'Y')
				mainMenu();
			
			else if (purchase == 'n' || purchase == 'N')
			{
						total = (quantity12*mThree2);
						tax_total = total * 1.083;

                        cout << "Proceeding to check out..." << endl << endl;
						cout << "Your total is: Php" << total << endl;
						cout << "Your total after tax is: Php" << tax_total << endl;
						cout << "Thank you and have a nice day" << endl;	
			}
			else
				cout<<"Invalid Choice!"<<endl;
			break;
	case 3:
                        cout << "What is the quantity you would like?" << endl;
						cout << "Quantity: ";
						cin >> quantity13;
						cout << endl;
                        cout<<"Do you want to cancel your purchasing (y/n)? ";
			cin>>purchase;
			cout<<endl;

			if (purchase == 'y' || purchase == 'Y')
				mainMenu();
			
			else if (purchase == 'n' || purchase == 'N')
			{

						total = (quantity13*mThree3);
						tax_total = total * 1.083;

                        cout << "Proceeding to check out..." << endl << endl;
						cout << "Your total is: Php" << total << endl;
						cout << "Your total after tax is: Php" << tax_total << endl;
						cout << "Thank you and have a nice day" << endl;
			
			}
			else
				cout<<"Invalid Choice!"<<endl;
			break;
	case 4:
                        cout << "What is the quantity you would like?" << endl;
						cout << "Quantity: ";
						cin >> quantity14;
						cout << endl;
                        cout<<"Do you want to cancel your purchasing (y/n)? ";
			cin>>purchase;
			cout<<endl;

			if (purchase == 'y' || purchase == 'Y')
				mainMenu();
			
			else if (purchase == 'n' || purchase == 'N')
			{

						total = (quantity14*mThree4);
						tax_total = total * 1.083;

                        cout << "Proceeding to check out..." << endl << endl;
						cout << "Your total is: Php" << total << endl;
						cout << "Your total after tax is: Php" << tax_total << endl;
						cout << "Thank you and have a nice day" << endl;
			
			}
			else
				cout<<"Invalid Choice!"<<endl;
			break;
	case 5:
                        cout << "What is the quantity you would like?" << endl;
						cout << "Quantity: ";
						cin >> quantity15;
						cout << endl;
                        cout<<"Do you want to cancel your purchasing (y/n)? ";
			cin>>purchase;
			cout<<endl;

			if (purchase == 'y' || purchase == 'Y')
				mainMenu();
			
			else if (purchase == 'n' || purchase == 'N')
			{

						total = (quantity15*mThree5);
						tax_total = total * 1.083;

                        cout << "Proceeding to check out..." << endl << endl;
						cout << "Your total is: Php" << total << endl;
						cout << "Your total after tax is: Php" << tax_total << endl;
						cout << "Thank you and have a nice day" << endl;
			
			}
			else
				cout<<"Invalid Choice!"<<endl;
			break;
	case 6:
                       total = (quantity11*mThree1);
					   total = (quantity12*mThree2);
					   total = (quantity13*mThree3);
					   total = (quantity14*mThree4);
					   total = (quantity15*mThree5);
						tax_total = total * 1.083;

                        cout << "Proceeding to check out..." << endl << endl;
						cout << "Your total is: Php" << total << endl;
						cout << "Your total after tax is: Php" << tax_total << endl;
						cout << "Thank you and have a nice day" << endl;
                        break;
	default:
						cout << "Selections must be between 1 and 6\n";
						mealOne();
			break;	
            }
        }
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
void mealFour()
{
	double total, tax_total;
	double mFour1 = 90.00, mFour2 = 100.00, mFour3 = 100.00, mFour4 = 90.00, mFour5 = 85.00;
     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 << "What is the quantity you would like?" << endl;
						cout << "Quantity: ";
						cin >> quantity16;
						cout << endl;
                        cout<<"Do you want to cancel your purchasing (y/n)? ";
			cin>>purchase;
			cout<<endl;

			if (purchase == 'y' || purchase == 'Y')
				mainMenu();
			
			else if (purchase == 'n' || purchase == 'N')
			{
						total = (quantity16*mFour1);
						tax_total = total * 1.083;

                        cout << "Proceeding to check out..." << endl << endl;
						cout << "Your total is: Php" << total << endl;
						cout << "Your total after tax is: Php" << tax_total << endl;
						cout << "Thank you and have a nice day" << endl;
			}
			else
				cout<<"Invalid Choice!"<<endl;
            break;

	case 2:
                        cout << "What is the quantity you would like?" << endl;
						cout << "Quantity: ";
						cin >> quantity17;
						cout << endl;
                        cout<<"Do you want to cancel your purchasing (y/n)? ";
			cin>>purchase;
			cout<<endl;

			if (purchase == 'y' || purchase == 'Y')
				mainMenu();
			
			else if (purchase == 'n' || purchase == 'N')
			{
						total = (quantity17*mFour2);
						tax_total = total * 1.083;

                        cout << "Proceeding to check out..." << endl << endl;
						cout << "Your total is: Php" << total << endl;
						cout << "Your total after tax is: Php" << tax_total << endl;
						cout << "Thank you and have a nice day" << endl;	
			}
			else
				cout<<"Invalid Choice!"<<endl;
			break;
	case 3:
                        cout << "What is the quantity you would like?" << endl;
						cout << "Quantity: ";
						cin >> quantity18;
						cout << endl;
                        cout<<"Do you want to cancel your purchasing (y/n)? ";
			cin>>purchase;
			cout<<endl;

			if (purchase == 'y' || purchase == 'Y')
				mainMenu();
			
			else if (purchase == 'n' || purchase == 'N')
			{

						total = (quantity18*mFour3);
						tax_total = total * 1.083;

                        cout << "Proceeding to check out..." << endl << endl;
						cout << "Your total is: Php" << total << endl;
						cout << "Your total after tax is: Php" << tax_total << endl;
						cout << "Thank you and have a nice day" << endl;
			
			}
			else
				cout<<"Invalid Choice!"<<endl;
			break;
	case 4:
                        cout << "What is the quantity you would like?" << endl;
						cout << "Quantity: ";
						cin >> quantity19;
						cout << endl;
                        cout<<"Do you want to cancel your purchasing (y/n)? ";
			cin>>purchase;
			cout<<endl;

			if (purchase == 'y' || purchase == 'Y')
				mainMenu();
			
			else if (purchase == 'n' || purchase == 'N')
			{

						total = (quantity19*mFour4);
						tax_total = total * 1.083;

                        cout << "Proceeding to check out..." << endl << endl;
						cout << "Your total is: Php" << total << endl;
						cout << "Your total after tax is: Php" << tax_total << endl;
						cout << "Thank you and have a nice day" << endl;
			
			}
			else
				cout<<"Invalid Choice!"<<endl;
			break;
	case 5:
                        cout << "What is the quantity you would like?" << endl;
						cout << "Quantity: ";
						cin >> quantity20;
						cout << endl;
                        cout<<"Do you want to cancel your purchasing (y/n)? ";
			cin>>purchase;
			cout<<endl;

			if (purchase == 'y' || purchase == 'Y')
				mainMenu();
			
			else if (purchase == 'n' || purchase == 'N')
			{

						total = (quantity20*mFour5);
						tax_total = total * 1.083;

                        cout << "Proceeding to check out..." << endl << endl;
						cout << "Your total is: Php" << total << endl;
						cout << "Your total after tax is: Php" << tax_total << endl;
						cout << "Thank you and have a nice day" << endl;
			
			}
			else
				cout<<"Invalid Choice!"<<endl;
			break;
	case 6:
                       total = (quantity16*mFour1);
					   total = (quantity17*mFour2);
					   total = (quantity18*mFour3);
					   total = (quantity19*mFour4);
					   total = (quantity20*mFour5);
						tax_total = total * 1.083;

                        cout << "Proceeding to check out..." << endl << endl;
						cout << "Your total is: Php" << total << endl;
						cout << "Your total after tax is: Php" << tax_total << endl;
						cout << "Thank you and have a nice day" << endl;
                        break;
	default:
						cout << "Selections must be between 1 and 6\n";
						mealOne();
			break;	
            }
        }
                       
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
352
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 =100;
      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
                      
 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;
   
     
     cout << "Customer name : " << userName << endl;
     cout << "Contact number : "<< contactNumber << endl;
	 cout << "Address that wish to deliver: "<< userAddress << endl;
}
Not many people are going to go through all that, but:

In your functions you have a common problem: Unintialized variables.
http://en.wikipedia.org/wiki/Uninitialized_variable

Just looking at your last two functions, you have the same problems as before:
In your totalAmount() function, amount1, total, and quantity1 have junk values in them.
In your menuConfirmation() function, userName's indices, contactNumber, and userAddress all have junk in them as well.

What are you expecting to be in them? You must realize that these local variables have nothing to do with any other functions you're calling totalAmount() from.

The scope of a variable is where a variable is defined. The quantity1 defined in your mealOne() function has no relation to your quantity1 variable in your totalAmount function.

I would also read the site's tutorial on functions. http://www.cplusplus.com/doc/tutorial/functions/
You can pass values you want to use through the function's parameters.
Last edited on
Topic archived. No new replies allowed.