Design a C++ Project on Travel Agency Travel management

Q. Design a C++ Project on Travel Agency Travel management
a) The main objective of the project travelling agency is to make avail to the customers all sorts of travelling services.
b) A host of services such as registration, display, search, modify etc are provided. In the registration step, the client has to provide his personal details.
c) In the option of display all the client information is read like name, phone, cost etc. in the search tab, if information of a particular client is required, then that be obtained. 


Solution:


#include <iostream>
#include<string.h>
using namespace std;
int main()
{
  char x,d,l,name[50],sname[50];
  long int phone;
  int i,opt,cost,day;
  int comp;
  cout<<"you are not a customer of our company!!\n do you want to register? enter y or n\n";
  cin>>x;
  if (x=='y')
  {
    cout<<"enter your name:";
    cin>>name;
    cout<<"enter your phone number:";
    cin>>phone;
    cout<<"registration successfull!!\n";   
  }
  cout<<"welcome "<<name;
  cout<<"\ndo you want to modify your info reply y or n:";
  cin>>d;
  if(d=='y')
  {
     cout<<"\nenter your name:";
    cin>>name;
    cout<<"\nenter your phone number:";
    cin>>phone;
    cout<<"\nmodification successfull!!\n";
   
  }
       cout<<"\nwhat type of car do you want? delux? or super delux?\ncharges for delux will be 5000 per day while that of delux is 10000 per day \nreply 1 for delux and 2 for super delux";
    cin>>opt;
    cout<<"\nenter number of days do you want to travel:";
    cin>>day;
    if(opt==1)
  {
    cost=day*5000;
  }
  else if(opt==2)
  {
    cost=day*10000;
 
  }
  cout<<"do you want to search reply y or n:";
  cin>>l;
  if(l=='y')
  {
    cout<<"enter name:";
    cin>>sname;
    comp=strcmp(name,sname);
    if(comp==0)
    {
      cout<<"match found";
    }
    else
    {
      cout<<"match not found";
    }

  }
  cout<<"displaying result:\n";
  cout<<"name:"<<name;
  cout<<"\nphone number:"<<phone;
  cout<<"\ntotal cost you have to pay:"<<cost;

}

Output:


0 comments: