-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.cpp
59 lines (51 loc) · 1.11 KB
/
main.cpp
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
#include <iostream>
#include <string>
#include "chair.h"
#include "table.h"
using namespace std;
void command(Table& object){
int access;
do {
cout << "\n\n";
cout << "what would you like to do? \n";
cout << "1: view what has been ordered for this table \n";
cout << "2: take order for table\n";
cout << "3: make final bill and close out this table\n";
cout << "4: exit and go back\n";
cin >> access;
switch(access){
case 1: object.view_table();
break;
case 2: object.chairs();
break;
case 3: object.final_check();
break;
}
}while (access != 4);
cout << "\n\n";
}
int main(){
Table A;
Table B;
Table C;
Table D;
int counter;
string access;
do{
cout << "Which table would you like to look at? 1, 2, 3, or 4? " << endl;
cin >> counter;
switch (counter){
case 1: command(A);
break;
case 2: command(B);
break;
case 3: command(C);
break;
case 4: command(D);
break;
}
cout << "would you like to exit? yes/no?" << endl;
cin >> access;
}while (access != "yes");
return 0;
}