Important
Important
Important
#include<iomanip>
#include<conio.h>
#include<string.h>
#include<stdlib.h>
char l_destination[5][20]={"AHMEDABAD","CHENNAI","DELHI","HYDRABAD","BANGLORE"};
class mytime
protected:
int choose;
public:
void getdata()
cin>>choose;
void show()
if(choose==1)
cout<<"| "<<endl;
cout<<"|
_________________________________________________________________________"<<endl;
cout<<" GOOD BYE AND HAVE A SAFE JOURNEY "<<endl;
if(choose==2)
cout<<"| "<<endl;
cout<<"|
_________________________________________________________________________"<<endl;
if(choose==3)
cout<<"| "<<endl;
cout<<"|
_________________________________________________________________________"<<endl;
};
class passenger
public:
};
{
protected:
int num,option,dd,mm,yyyy;
char firstname[60],lastname[60],address[60],c_loc[30],dest[30],reservation_no[60];
public:
void getdata()
cin>>firstname;
cin>>lastname;
cin>>address;
cin>>num;
cin>>c_loc;
cin>>dest;
cin>>dd>>mm>>yyyy;
system("CLS");
void show()
{
cout<<setw(40)<<"Your E-Ticket is :"<<endl;
int t=1;
int r=12345;
cout<<"|
_________________________________________________________________________"<<endl;
cout<<"|
_________________________________________________________________________"<<endl;
else
cout<<endl;
cout<<"|
_________________________________________________________________________"<<endl;
cout<<"|
_________________________________________________________________________"<<endl;
t=t+1;
r=r+1;
};
class search
public:
void searching()
for(int i=0;i<10;i++)
for(int j=0;j<5;j++)
for(int i=0;i<5;i++)
for(int j=0;j<5;j++)
if(i!=j)
};
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<<"1)AIR INDIA"<<endl;
cout<<"2)INDIGO"<<endl;
cout<<"3)GO AIR"<<endl;
cout<<"4)JET AIRWAYS"<<endl;
cin>>option;
switch(option)
case 1:
cout<<setw(40)<<" ******************************"<<endl;
cout<<setw(40)<<" ******************************"<<endl;
break;
case 2:
cout<<setw(40)<<" ******************************"<<endl;
cout<<setw(40)<<" ******************************"<<endl;
break;
case 3:
cout<<setw(40)<<" ******************************"<<endl;
cout<<setw(40)<<" ******************************"<<endl;
break;
case 4:
cout<<setw(40)<<" ******************************"<<endl;
cout<<setw(40)<<" ******************************"<<endl;
break;
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++;
}
}
if(k==1)
b_seat=30;
e_seat=40;
cout<<"\n\n\n\n\n\n";
cout<<setw(60)<<"*************************************"<<endl;
cout<<setw(60)<<"*************************************"<<endl<<endl<<endl<<endl;
cin>>ch;
cout<<endl;
switch(ch)
case 1:
if(b_seat<=0)
else
break;
case 2:
if(e_seat<=0)
else
break;
}
t1.getdata();
booking::show();
if(ch==1)
cout<<"| "<<endl;
if(ch==2)
cout<<"| "<<endl;
t1.show();
else
cout<<"__________________________________________________________________________"<
<endl;
cout<<"__________________________________________________________________________"<
<endl;
};
class international:public booking
protected:
int b1_seat,e1_seat,choice,c,b,v;
mytime t1;
public:
void getdata()
b=0;
v=0;
cout<<"1)AIR INDIA"<<endl;
cout<<"2)LUFTHANSA"<<endl;
cout<<"3)EMIRATES"<<endl;
cout<<"4)ETIHAD AIRWAYS"<<endl;
cin>>option;
switch(option)
case 1:
cout<<setw(40)<<" ******************************"<<endl;
cout<<setw(40)<<" ******************************"<<endl;
break;
case 2:
cout<<setw(40)<<" ******************************"<<endl;
cout<<setw(40)<<" ******************************"<<endl;
break;
case 3:
cout<<setw(40)<<" ******************************"<<endl;
cout<<setw(40)<<" ******************************"<<endl;
break;
case 4:
cout<<setw(40)<<" ******************************"<<endl;
cout<<setw(40)<<" ******************************"<<endl;
break;
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++;
if(b==1)
b1_seat=30;
e1_seat=40;
cout<<"\n\n\n\n\n\n";
cout<<setw(60)<<"*************************************"<<endl;
cout<<setw(60)<<"*************************************"<<endl<<endl<<endl<<endl;
cin>>choice;
cout<<endl;
switch(choice)
case 1:
if(b1_seat<=0)
else
break;
case 2:
if(e1_seat<=0)
else
break;
t1.getdata();
booking::show();
if(choice==1)
{
cout<<"| "<<endl;
if(choice==2)
cout<<"| "<<endl;
t1.show();
else
cout<<"__________________________________________________________________________"<
<endl;
cout<<"__________________________________________________________________________"<
<endl;
};
class main1
private:
int menu_choice;
public:
void getdata()
{
m:
cout<<"\n\n";
cout<<setw(60)<<"*************************************"<<endl;
cout<<setw(60)<<"*************************************"<<endl;
cin>>menu_choice;
passenger* p1;
booking b1;
international i1;
local l1;
char back;
switch(menu_choice)
case 1:
p1=&l1;
p1->getdata();
cin>>back;
if (back=='b')
goto m;
else
{
cout<<"\n\n\n\n\n\n";
break;
case 2:
p1=&i1;
p1->getdata();
cin>>back;
if (back=='b')
goto m;
else
cout<<"\n\n\n\n\n\n";
break;
case 3:
search s1;
s1.searching();
cin>>back;
if (back=='b')
goto m;
else
{
cout<<"\n\n\n\n\n\n";
break;
};
int main()
main1 m1;
m1.getdata();
return 0;