-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathProg7.cpp
150 lines (146 loc) · 3.24 KB
/
Prog7.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
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
#include "Def.h"
using namespace std;
void main() {
Queue NewCars;
Queue OldCars;
Queue LuxCars;
int choice = 0;
choice = menu();
do {
if (choice == 1) {
int func;
do {
func = inmenu("New Cars");
if (func == 1) {
string name;
string model;
int plate;
cout << "Enter name of car" << endl;
cin >> name;
cout << "Enter model of car" << endl;
cin >> model;
cout << "Enter plate number of car" << endl;
cin >> plate;
NewCars.push(name, model, plate);
}
else if (func == 2) {
string name;
string model;
int plate;
cout << "Enter name of car" << endl;
cin >> name;
cout << "Enter model of car" << endl;
cin >> model;
cout << "Enter plate number of car" << endl;
cin >> plate;
NewCars.VIPpush(name, model, plate);
}
else if (func == 3) {
NewCars.pop();
}
else if (func == 4) {
}
else if (func == 5) {
NewCars.print();
}
else if (func == 6) {
choice = menu();
}
else {
cout << "Please enter a valid choice" << endl;
}
} while (func < 0 || func >6);
}
else if (choice == 2) {
int func1;
func1 = inmenu("Old and Historical Cars");
if (func1 == 1) {
string name;
string model;
int plate;
cout << "Enter name of car" << endl;
cin >> name;
cout << "Enter model of car" << endl;
cin >> model;
cout << "Enter plate number of car" << endl;
cin >> plate;
OldCars.push(name, model, plate);
}
else if (func1 == 2) {
string name;
string model;
int plate;
cout << "Enter name of car" << endl;
cin >> name;
cout << "Enter model of car" << endl;
cin >> model;
cout << "Enter plate number of car" << endl;
cin >> plate;
OldCars.VIPpush(name, model, plate);
}
else if (func1 == 3) {
OldCars.pop();
}
else if (func1 == 4) {
}
else if (func1 == 5) {
OldCars.print();
}
else if (func1==6){
choice = menu();
}
else {
cout << "Please enter a valid choice" << endl;
}
}
else if (choice == 3) {
int func2;
func2 = inmenu("Luxury Cars");
if (func2 == 1) {
string name;
string model;
int plate;
cout << "Enter name of car" << endl;
cin >> name;
cout << "Enter model of car" << endl;
cin >> model;
cout << "Enter plate number of car" << endl;
cin >> plate;
LuxCars.push(name, model, plate);
}
else if (func2 == 2) {
string name;
string model;
int plate;
cout << "Enter name of car" << endl;
cin >> name;
cout << "Enter model of car" << endl;
cin >> model;
cout << "Enter plate number of car" << endl;
cin >> plate;
LuxCars.VIPpush(name, model, plate);
}
else if (func2 == 3) {
LuxCars.pop();
}
else if (func2 == 4) {
}
else if (func2 == 5) {
LuxCars.print();
}
else if (func2==6){
choice = menu();
}
else {
cout << "Please enter a valid choice" << endl;
}
}
else if (choice==4){
break;
}
else {
cout << "Please input a valid choice" << endl;
}
choice = menu();
}while (choice != 4);
}