-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcoolcab1.cpp
846 lines (798 loc) · 24.3 KB
/
coolcab1.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
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
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
#include<iostream>
#include<iomanip>
#include<conio.h>
#include<string>
#include<windows.h>
#include<fstream>
using namespace std;
char l_destination[5][20]={"AMRITSAR","JALANDHAR","PHAGWARA","LUDHIANA","CHANDIGARH"};
char i_destination[10][20]={"DELHI","MUMBAI","LUCKNOW","JAIPUR","AHEMDABAD" };
ofstream MYFILE;
class login{
protected:
string username,password,securityQuestion;
string fileUser,filePassword,fileSecQues;
public:
login();
int loginCheck();
void signUp();
int forgotPassword();
};
login::login()
{
int n;
start_Page:
cout<<"\n-----------------------\n";
cout<<"\n1. LOGIN\n2. REGISTER\n3. FORGET YOUR PASSWORD\n4. EXIT";
cout<<"\n-----------------------\n";
cout<<"ENTER OUR CHOICE--->: ";
cin>>n;
int login_retry=0,forgot_try=0;
switch(n)
{
case 1:
{
system("cls");
login_retry=loginCheck();
if(login_retry>0)
{
system("cls");
cout<<"OH HO! WORNG USER NAME AND PASSWORD";
cout<<"\n DON'T HAVE AN ACCOUNT please Sign Up"<<endl;
goto start_Page;
}
}
break;
case 2:
signUp();
system("cls");
goto start_Page;
break;
case 3:
system("cls");
forgot_try=forgotPassword();
switch(forgot_try)
{
case 0:
break;
case 1:
cout<<"SORRY! YOUR DETAILS ARE NOT FOUND IN OUR DATABASE"<<endl;
cout<<"HEY ! COME JOIN US BY DOING A SIMPLE REGESTRATION."<<endl;
break;
case 2:
cout<<"I'M REALLY VERY SORRY YOUR ANSWER DOESN'T MATCH ''.";
cout<<"PLEASE TRY AGAIN.";
break;
default:
cout<<"COMMON ";
}
getch();
system("cls");
goto start_Page;
break;
case 4:
exit(2);
default:
cout<<"I'M NOT SEEING ANY OPTION RELATED TO THIS'\n PLEASE CHOOSE A CORRECT OR A VALID OPTION TO MOVE FURTHER";
goto start_Page;
}
}
void login::signUp()
{
system("cls");
cout<<"HEY! COME JOIN US AND HAVE A GREAT AND REMEBERABLE TRIP\n";
cout<<"ALL THE DETAIL ARE MANDATORY PLEASE FILL YOUR DETAIL CORRECTLY\n";
cout<<"ENTER USERNAME: ";
cin>>username;
cout<<"ENTER PASSWORD: ";
cin>>password;
cout<<"SECURITY CHECK:PLEASE ANSWER A SIMPLE QUESTION TO PROCEED FURTHER: ";
cout<<"\n IN WHICH COMPANY YOU WANT YOUR DREAM JOB ?";
cout<<"\nYour Answer: ";
cin>>securityQuestion;
ofstream file;
file.open("CoolCab2.txt",ios::app);
file<<username<<' '<<password<<' '<<securityQuestion<<'\n';
cout<<"CONGRATULATION!!! ACCOUNT CREATED SUCCESSFULLY\t";
cout<<"\nPlease press any button to continue to the main page";
getch();
}
int login::loginCheck()
{
cout<<"ENTER USERNAME: ";
cin>>username;
cout<<"ENTER PASSWORD: ";
cin>>password;
ifstream file;
file.open("CoolCab2.txt");
file.seekg(0);
while(!file.eof())
{
file>>fileUser>>filePassword>>fileSecQues;
if(username==fileUser && password== filePassword)
{
cout<<"Login Successful";
cout<<"\nCOOLCABS WELCOMES YOU HAVE A SAFE AND NICE TRIP\n";
getch();
return 0;
}
}
return 1;
}
int login::forgotPassword()
{
system("cls");
cout<<"Enter Username: ";
cin>>username;
int userFound=0;
ifstream file;
file.open("CoolCab2.txt");
file.seekg(0);
while(!file.eof())
{
file>>fileUser>>filePassword>>fileSecQues;
if(username==fileUser)
{
userFound=1;
break;
}
}
if(userFound==1)
{
cout<<"Welcome "<<username<<endl;
cout<<"SECURITY CHECK:PLEASE ANSWER A SIMPLE QUESTION TO PROCEED FURTHERPlease answer your security question:"<<endl;
cout<<"IN WHICH COMPANY YOU WANT YOUR DREAM JOB ?";
cout<<"\nYOur Answer: ";
cin>>securityQuestion;
if(securityQuestion==fileSecQues)
{
cout<<"Please wait.......Searching the database.......";
Sleep(2000);
cout<<"\nSEARCH COMPLETE";
cout<<"\nYOUR PASSWORD IS: \n NEXT TIME TRY TO REMEBER IT: "<<filePassword;
getch();
return 0;
}
else
return 2;
}
return 1;
getch();
}
class mytime
{
protected:
int choose;
public:
void getdata()
{
cout<<"ON WHICH TIME YOU WANT TO TRAVEL"<<endl;
cout<<"PRESS 1 FOR 11 AM"<<endl;
cout<<"PRESS 2 FOR 10 AM"<<endl;
cout<<"PRESS 3 FOR 9 AM"<<endl;
cin>>choose;
}
void show()
{
if(choose==1)
{
ifstream InFile;
char ch;
InFile.open("C://ticket1.txt");
while (!InFile.eof())
{
InFile.get ( ch ) ;
cout << ch ;
}
InFile.close();
cout<<endl;
cout<<"| "<<endl;
cout<<"|CABS mytime 11 AM "<<endl;
cout<<"|_________________________________________________________________________"<<endl;
cout<<" GOOD BYE AND HAVE A SAFE JOURNEY "<<endl;
ofstream outfile;
outfile.open("E:\\Customer.txt",ios::app);
outfile<<"| "<<endl<<
"|CABS mytime 11 AM "<<endl<<
"|_________________________________________________________________________"<<endl<<
" GOOD BYE AND HAVE A SAFE JOURNEY "<<endl;
}
if(choose==2)
{
ifstream InFile;
char ch;
InFile.open("C://ticket2.txt");
while (!InFile.eof())
{
InFile.get ( ch ) ;
cout << ch ;
}
InFile.close();
cout<<endl;
cout<<"| "<<endl;
cout<<"|CABS mytime 10 AM "<<endl;
cout<<"|_________________________________________________________________________"<<endl;
cout<<" GOOD BYE AND HAVE A SAFE JOURNEY "<<endl;
ofstream outfile;
outfile.open("E:\\Customer.txt",ios::app);
outfile<<"| "<<endl<<
"|CABS mytime 10 AM "<<endl<<
"|_________________________________________________________________________"<<endl<<
" GOOD BYE AND HAVE A SAFE JOURNEY "<<endl;
}
if(choose==3)
{
ifstream InFile;
char ch;
InFile.open("C://ticket3.txt");
while (!InFile.eof())
{
InFile.get ( ch ) ;
cout << ch ;
}
InFile.close();
cout<<endl;
cout<<"| "<<endl;
cout<<"|CABS mytime 9 AM "<<endl;
cout<<"|_________________________________________________________________________"<<endl;
cout<<" GOOD BYE AND HAVE A SAFE JOURNEY "<<endl;
ofstream outfile;
outfile.open("E:\\Customer.txt",ios::app);
outfile<<"| "<<endl<<
"|CABS mytime 9 AM "<<endl<<
"|_________________________________________________________________________"<<endl<<
" GOOD BYE AND HAVE A SAFE JOURNEY "<<endl;
}
}
};
class customer
{
public:
virtual void getdata()
{
}
virtual void show()
{
}
};
class booking:public customer
{
protected:
int num;
char ch;
char firstname[60];
char lastname[60];
char c_loc[30];
char dest[30];
int distance;
char address[60];
int ChargesPerKm=5;
int Counting=4;
int count=0;
int *PChargesPerKm=&ChargesPerKm;
int option;
public:
void getdata()
{
cout<<setw(40)<<"\n\n ::Please enter the required information for customer number::"<<endl;
cout<<"\n\n\nEnter the firstname of customer: ";
cin.getline(firstname,60);
cout<<endl;
cout<<"Enter the lastname of customer: ";
cin.getline(lastname,60);
cout<<endl<<endl;
cout<<"enter total distance"<<endl;
cin>>distance;
cout<<endl<<endl;
cout<<"Enter address of customer: ";
gets(address);
cout<<endl<<endl;
cout<<"Enter the current location of customer(IN CAPITAL LETTERS ONLY): ";
cin.getline(c_loc,60);
cout<<endl<<endl;
cout<<"Enter the destination of customer(IN CAPITAL LETTERS ONLY): ";
cin.getline(dest,60);
cout<<endl<<endl;
system("CLS");
}
void show()
{
cout<<setw(40)<<"Your E-Ticket is :"<<endl;
int t=1;
int r=12345;
float Distance;
float Charges;
Charges=distance*ChargesPerKm -distance*0.10;
cout<<" CABS TICKET "<<endl;
cout<<"|Ticket No."<<t<<" Reference No."<<r<<"\t "<<endl;
cout<<"|__________________________________________________________________________"<<endl;
cout<<"|customer Information : "<<endl;
cout<<"|Name :"<<firstname<<lastname<<" "<<endl;
cout<<"| "<<endl;
cout<<"|Address :"<<address<<" "<<endl;
cout<<"|_________________________________________________________________________"<<endl;
cout<<"|Depart :"<<c_loc<<" "<<endl;
cout<<"|Arrive :"<<dest<<" "<<endl;
cout <<"|\ndistance:"<<distance<<"\n";
cout <<"|\nCharges: Rs"<< Charges<<"\n";
cout<<endl;
cout<<"|_________________________________________________________________________"<<endl;
ofstream outfile("E:\\Customer.txt");
outfile<<" CABS TICKET "<<endl<<
"|Ticket No."<<t<<" Reference No."<<r<<"\t "<<endl<<
"|_________________________________________________________________________"<<endl<<
"|__________________________________________________________________________"<<endl<<
"|customer Information : "<<endl<<
"|Name :"<<firstname<<lastname<<" "<<endl<<
"| "<<endl<<
"|Address :"<<address<<" "<<endl<<
"|_________________________________________________________________________"<<endl<<
"|Depart :"<<c_loc<<" "<<endl<<
"|Arrive :"<<dest<<" "<<endl<<
"|_________________________________________________________________________"<<endl;
t=t+1;
r=r+1;
}
};
class search
{
public:
void searching()
{
cout<<"FOLLOWING ARE THE OUTSTATION CABS AVAILABLE"<<endl;
for(int i=0;i<5;i++)
{
for(int j=0;j<10;j++)
{
cout<<"cabs FROM "<<l_destination[i]<<" TO "<<i_destination[j]<<endl;
}
}
}
};
class local: public booking
{
protected:
int b_seat;
int e_seat;
int ch;
int k;
int p;
int option;
mytime t1;
public:
void getdata()
{
k=0;
p=0;
cout<<"In which CABS you want to travel"<<endl<<endl;
cout<<"1)MICRO"<<endl;
cout<<"2)MINI"<<endl;
cout<<"3)SEDAN"<<endl;
cout<<"4)PRIME SEDAN"<<endl;
cout<<"enter your choice"<<endl;;
cin>>option;
system ("cls");
switch(option)
{
case 1:
if (option==1)
cout<<setw(40)<<"\n\n\n WELCOME TO MICRO"<<endl;
break;
case 2:
if(option==2)
cout<<setw(40)<<"\n\n\n WELCOME TO MINI"<<endl;
break;
case 3:
if(option==3)
cout<<setw(40)<<"\n\n\n WELCOME TO SEDAN"<<endl;
break;
case 4:
if(option==4)
cout<<setw(40)<<"\n\n\n WELCOME TO QPRIME SEDAN"<<endl;
break;
}
cout<<setw(40)<<"\nTHESE ARE THE LOCAL PLACES AVAILABLE\n\n\n"<<endl;
cin.ignore();
for(int i=0;i<5;i++)
{
cout<<l_destination[i]<<endl;
}
booking::getdata();
for(int j=0;j<5;j++)
{
if(strcmp(l_destination[j],c_loc)==0)
{
k++;
}
}
for( int i=0;i<5;i++)
{
if(strcmp(l_destination[i],c_loc)==0)
{
p++;
}
}
if(k==1&&p==1)
{
cout<<" CABS AVAILABLE ON THIS ROUTE"<<endl;
b_seat=30;
e_seat=40;
cout<<"In which class you want to travel?"<<endl;
cout<<"Make your choice"<<endl<<endl;
cout<<"\n\n\n\n\n\n";
cout<<setw(60)<<"*************************************"<<endl;
cout<<setw(60)<<"* Press 1 for ac *"<<endl;
cout<<setw(60)<<"* Press 2 for non ac *"<<endl;
cout<<setw(60)<<"*************************************"<<endl<<endl<<endl<<endl;
cout<<"Enter your choice"<<endl;
cin>>ch;
cout<<endl;
switch(ch)
{
case 1:
b_seat--;
if(b_seat<=0)
cout<<"SORRY NO SEAT AVAILABLE"<<endl;
else
cout<<"SEAT AVAILABLE"<<endl;
break;
case 2:
e_seat--;
if(e_seat<=0)
cout<<"SORRY NO SEAT AVAILABLE"<<endl;
else
cout<<"SEAT AVAILABLE"<<endl;
break;
}
t1.getdata();
system("CLS");
booking::show();
if(ch==1)
{
cout<<"| "<<endl;
cout<<"|Status Information: "<<endl;
cout<<"|AC "<<endl;
ofstream outfile;
outfile.open("C:\\Customer.txt",ios::app);
outfile<<"| "<<endl<<
"|Status Information: "<<endl<<
"|AC "<<endl;
}
if(ch==2)
{
cout<<"| "<<endl;
cout<<"|Status Information: "<<endl;
cout<<"|NON AC "<<endl;
ofstream outfile;
outfile.open("C:\\Customer.txt",ios::app);
outfile<<"| "<<endl<<
"|Status Information: "<<endl<<
"|NON AC "<<endl;
}
cout<<"|Status: confirmed "<<endl;
ofstream outfile;
outfile.open("C:\\Customer.txt",ios::app);
outfile<<"|Status: confirmed "<<endl;
t1.show();
}
else
{
cout<<"__________________________________________________________________________"<<endl;
cout<<"| SORRY NO cabs AVAILABLE ON THIS ROUTE RIGHT NOW "<<endl;
cout<<"__________________________________________________________________________"<<endl;
}
}};
class destination:public booking
{
protected:
int c,b,v,g,choice,e1_seat,b1_seat;
mytime t1;
public:
void getdata()
{
b=0;
v=0;
cout<<"In which CABS you want to travel"<<endl<<endl;
cout<<"1)MICRO"<<endl;
cout<<"2)MINI"<<endl;
cout<<"3)SEDAN"<<endl;
cout<<"4)PRIME SEDAN"<<endl;
cout<<"enter your choice"<<endl;;
cin>>option;
system ("cls");
switch(option)
{
case 1:
if (option==1)
cout<<setw(40)<<"\n\n\n WELCOME TO MICRO"<<endl;
break;
case 2:
if(option==2)
cout<<setw(40)<<"\n\n\n WELCOME TO MINI"<<endl;
break;
case 3:
if(option==3)
cout<<setw(40)<<"\n\n\n WELCOME TO SEDAN"<<endl;
break;
case 4:
if(option==4)
cout<<setw(40)<<"\n\n\n WELCOME TO PRIME SEDAN"<<endl;
break;
}
cout<<"\n\nTHESE ARE THE DESTINATION PLACES AVAILABLE"<<endl<<endl;
cin.ignore();
for(int i=0;i<10;i++)
{
cout<<i_destination[i]<<endl;
}
booking::getdata();
for(int j=0;j<10;j++)
{
if(strcmp(i_destination[j],dest)==0)
{
v++;
}
}
for( int i=0;i<5;i++)
{
if(strcmp(l_destination[i],c_loc)==0)
{
b++;
}
}
if(b==1&&v==1)
{
cout<<" CABS AVAILABLE ON THIS ROUTE"<<endl;
b1_seat=30;
e1_seat=40;
cout<<"In which class you want to travel?"<<endl;
cout<<"Make your choice"<<endl<<endl;
cout<<"\n\n\n\n\n\n";
cout<<setw(60)<<"*************************************"<<endl;
cout<<setw(60)<<"* Press 1 for AC *"<<endl;
cout<<setw(60)<<"* Press 2 for NON AC *"<<endl;
cout<<setw(60)<<"*************************************"<<endl<<endl<<endl<<endl;
cout<<"Enter your choice"<<endl;
cin>>choice;
cout<<endl;
switch(choice)
{
case 1:
b1_seat--;
if(b1_seat<=0)
cout<<"SORRY NO SEAT AVAILABLE"<<endl;
else
cout<<"SEAT AVAILABLE"<<endl;
break;
case 2:
e1_seat--;
if(e1_seat<=0)
cout<<"SORRY NO SEAT AVAILABLE"<<endl;
else
cout<<"SEAT AVAILABLE"<<endl;
break;
}
t1.getdata();
system("CLS");
booking::show();
if(choice==1)
{ cout<<"| "<<endl;
cout<<"|Status Information: "<<endl;
cout<<"|AC "<<endl;
ofstream outfile;
outfile.open("C:\\Customer.txt",ios::app);
outfile<<"| "<<endl<<
"|Status Information: "<<endl<<
"|AC "<<endl;
}
if(choice==2)
{ cout<<"| "<<endl;
cout<<"|Status Information: "<<endl;
cout<<"|NON AC "<<endl;
ofstream outfile;
outfile.open("C:\\Customer.txt",ios::app);
outfile<<"| "<<endl<<
"|Status Information: "<<endl<<
"|NON AC "<<endl;
}
cout<<"|Status: confirmed "<<endl;
ofstream outfile;
outfile.open("C:\\Customer.txt",ios::app);
outfile<<"|Status: confirmed "<<endl;
t1.show();
}
else
{
cout<<"__________________________________________________________________________"<<endl;
cout<<"| SORRY NO CABS AVAILABLE ON THIS ROUTE RIGHT NOW "<<endl;
cout<<"__________________________________________________________________________"<<endl;
}
} };
class cab
{
public:
int cabno;
int cabstats;
int av,cb;
char ch;
int i;
}c[10];
class main1
{
private:
char f;
int menu_choice;
char a;
public:
void changecabstat()
{fstream file;
file.open("CabStatus.txt",ios::in|ios::out);
system("CLS");
string upStats;
char choice;
do{
cout<<"\t\t\t\t\t\t\t\t\t********************"<<endl;
cout<<"\t\t\t\t\t\t\t\t\t* UpDating Status *"<<endl;
cout<<"\t\t\t\t\t\t\t\t\t********************"<<endl;
cout<<endl;
cout<<"Enter The Cab Id Number To Update status: ";
cin>>upStats;
long int choice = atoi(upStats.c_str());
for(int i=0;i<10;i++)
{
if(c[i].cabno==choice)
{
char stat;
cout<<"The Cab Id Number "<<i+1<<" Returned Or Not(Y/N) :";
cin>>stat;
if(toupper(stat=='Y'))
{
c[i].cabstats=1;
}
else
{
c[i].cabstats=0;
}
}
}
cout<<"Do You Want To update The Another Cab Status (Y/N) : ";
cin>>choice;
}while((choice=='Y') || (choice=='y'));
file.close();
}
void showcstat()
{
int sh;
sh=0;
system("CLS");
cout<<"\t\t\t\t\t\t\t\tCAB STATUS\n"<<endl;
for(int i=1;i<=10;i++)
{
if(sh%10==0)
{
cout<<"\n";
if(c[i].cabstats==1)
cout<<"Cab "<<c[i].cabno<<" IS FREE\t";
else
cout<<"Cab "<<c[i].cabno<<" IS NOT FREE\t";
}
else
{
if(c[i].cabstats==1)
cout<<"Cab "<<c[i].cabno<<" IS FREE\t";
else
cout<<"Cab "<<c[i].cabno<<" IS NOT FREE\t";
}
sh++;
}
}
void getdata()
{m:
cout<<"\n\n\n\n\n\n";
cout<<setw(60)<<"****************************************"<<endl;
cout<<setw(60)<<"* COOLCABS BOOKING SYSTEM *"<<endl;
cout<<setw(60)<<"* MAIN MENU *"<<endl;
cout<<setw(60)<<"* ENTER YOUR CHOICE *"<<endl;
cout<<setw(60)<<"* PRESS 1 FOR LOCAL BOOKING *"<<endl;
cout<<setw(60)<<"* PRESS 2 FOR OUTSTATION BOOKING *"<<endl;
cout<<setw(60)<<"* PRESS 3 FOR SEARCH OF CABS *"<<endl;
cout<<setw(60)<<"* PRESS 4 FOR SEARCH OF CABSTAT *"<<endl;
cout<<setw(60)<<"* NOW ENTER YOUR CHOICE: *"<<endl;
cout<<setw(60)<<"****************************************"<<endl;
cin>>menu_choice;
system("cls");
customer* p1;
booking b1;
destination i1;
cab ob;
local l1;
char back;
switch(menu_choice)
{
case 1:
p1=&l1;
p1->getdata();
cout<<"To Go To Main Menu Press b"<<endl;
cin>>back;
system("CLS");
if (back=='b')
{
goto m;
}
else
{
cout<<"\n\n\n\n\n\n";
cout<<setw(40)<<"BYE FROM COOLCABS SYSTEM";
}
break;
case 2:
p1=&i1;
p1->getdata();
cout<<"To Go To Main Menu Press b"<<endl;
cin>>back;
system("CLS");
if (back=='b')
{
goto m;
}
else
{
cout<<"\n\n\n\n\n\n";
cout<<setw(40)<<"BYE FROM COOLCABS BOOKING SYSTEM";
}
break;
case 3:
search s1;
s1.searching();
cout<<"To Go To Main Menu Press b"<<endl;
cin>>back;
system("CLS");
if (back=='b')
{
goto m;
}
else
{
cout<<"\n\n\n\n\n\n";
cout<<setw(40)<<"BYE FROM COOLCABS BOOKING SYSTEM";
}
break;
case 4:
showcstat();
break;
}
} };
int main()
{
SetConsoleTitle("COOLCABS BOOKING SYSTEM ");
system("color 5f");
cout<<"\n\n\n\n\n\n\n\n\n\n\t\t WELCOME TO COOLCABS BOOKING SYSTEM";
Sleep(2500);
system("color 2f");
system("color 0e");
char a=177, b=219;
cout<<"\n\n\n\t\t\t\tLOADING.....";
cout<<"\n\n\n";
cout<<"\t\t\t\t\t";
for(int i=0;i<=25;i++)
cout<<a;
Sleep(150);
cout<<"\r";
cout<<"\t\t\t\t\t";
for(int i=0;i<=25;i++)
{
cout<<b;
Sleep(200);
}
system("CLS");
cout<<"\n\n\n\n\n\n\n\t\t Developed by :";
Sleep(500);
cout<<" Aman Kumar Soni";
Sleep(500);
system("cls");
login l;
l.loginCheck();
l.signUp();
main1 m1;
m1.getdata();
}