Flight Passenger Booking

1479 Words3 Pages

// ConsoleApplication51.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include #include using namespace std; class person { public : virtual void menu() { } virtual void show() { } }; char local_destination[5][20]={"LAHORE","ISLAMABAD","KARACHI","PESHAWAR","QUETTA"}; char international_destination[6][24]={"LONDON","BERLIN","DUBAI","NEW YORK","BEIJING","TOKYO"}; class time { protected : int choice ; public : void menu() { cout<<" ON WHICH TIME U WANT TO TRAVEL "< cout<<" PRESS 1 FOR 11 AM "< cout<<" PRESS 2 FOR 10 AM "< cout<<" PRESS 3 FOR 9 AM "< cin>>choice; } void timing() { if(choice==1) { cout<<"|-----------------------------------------|"< cout<<"|flight time 11 AM "< cout<<" have a safe journey "< } if(choice==2) { cout<<"|-----------------------------------------|"< cout<<" flight time 10AM "< cout<<" have a safe journey "< } if(choice==3) { cout<<" |------------------------------------------------------|"< cout<<" flight time 9 AM "< cout<<" have a safe journey "< } } }; class booking:public person { protected : int num; char ch; char first[30]; char last[30]; char passport_no[50]; char loc[30]; char dest[30]; char reserv_no[60]; int option; void getdata() { cout<<" PLEASE ENTER THE REQUIRED INFROMATION OF PASSENGER "< cout< cout<<" Enter first name :"; cin.getline(first,30); cout< cout<<" Enter last name :"; cin.getline(last,30); cout< cout<<" Enter passport no. :"; cin.getline(passport_no,50); cout< cout<<" Enter registration no . :"; cin... ... middle of paper ... ...<<"press 0 to go back to main menu"< cin>>alpha; if(alpha==0) { main_menu(); } else { cout< cout<<" thanks , have a nice day "< } break; case 5: s=&km; s->menu(); cout<<" press 0 to go back to mani menu "< cin>>alpha; if(alpha==0) { main_menu(); } else { cout<<" thanks , have a nice day"< } break; case 2: flights f; f.searching(); cout<<" press 0 to go back to mani menu "< cin>>alpha; if(alpha==0) { main_menu(); } else { cout<<" thanks , have a nice day"< } break; } } }; int main() { function a; a.main_menu(); system ("pause"); return 0; }

Open Document