The objective of this project is to automate vehicle rental and reservation so that customer do not need
to call and spend unnecessary time in order to reserve a ride.
They can go in the application and reserve any kind of vehicle they want that is available. Even when a
customer chooses to visit the booking center to personally hire a vehicle, computers are available for
him to go online and perform his reservation. When he/she choose to reserve by computer the system
will provide all the services.
The Proposed update feature is to allow the passengers to track current status of the journey i.e we can
see the journey details in the application itself. The application also evaluates the amount each cab is
earning, and also it will figure out drop time of the journey between points like A or B, etc.
In Update system, we will implement the alarm system and sending notification to all family members in
case of any emergencies while make journey. For example, in case of accident the system will notify all
closed members of the person who reserved the cab.
#include<stdio.h>
#include<conio.h>
#include<string.h>
#include<math.h>
#include<stdlib.h>
void taxiprint(int);
int booking_id=1;
int taxi1,taxi2,taxi3,taxi4;
int taxi1_book,taxi2_book,taxi3_book,taxi4_book;
int taxi_earning[4];
struct taxi
int customer_id;
char pickup_point[10];
char drop_point[10];
int pickup_time;
}t[100];
struct booking
int booking_id;
int customer_id;
char from[10];
char to[10];
int pickuptime;
int droptime;
int amount;
}b[4][100];
void booking(struct booking *b,struct taxi t,int no)
b->customer_id=t.customer_id;
b->booking_id=booking_id++;
strcpy(b->from,t.pickup_point);
strcpy(b->to,t.drop_point);
b->pickuptime=t.pickup_time;
b->droptime =distance(t.pickup_point,t.drop_point)+t.pickup_time;
if(b->droptime>12)
b->droptime-=12;
taxi_earning[no]+=b->amount;
char start=a[0];
char stop=b[0];
return (abs(start-stop));
void decrement()
if(taxi1>0)
taxi1--;
if(taxi2>0)
taxi2--;
if(taxi3>0)
taxi3--;
if(taxi4>0)
taxi4--;
printf("\n\t\t\t\tTaxi- %d is allocated\n\n",taxino);
void display()
int i;
// printf("%d %d %d %d",taxi1_book,taxi2_book,taxi3_book,taxi4_book);
if(taxi1_book>0)
printf("\nId\tCust_Id\tFrom\tTo\tPickup_time\tDrop_time\tAmount\n");
for(i=0;i<taxi1_book;i++)
printf("%d\t%d\t%s\t%s\t%d\t\t%d\t\t%d\n",b[0][i].booking_id,b[0][i].customer_id,b[0][i].from,b[0][i].t
o,b[0][i].pickuptime,b[0][i].droptime,b[0][i].amount);
}
if(taxi2_book>0)
printf("\nId\tCust_Id\tFrom\tTo\tPickup_time\tDrop_time\tAmount\n");
for(i=0;i<taxi2_book;i++)
printf("%d\t%d\t%s\t%s\t%d\t\t%d\t\t%d\n",b[1][i].booking_id,b[1][i].customer_id,b[1][i].from,b[1][i].t
o,b[1][i].pickuptime,b[1][i].droptime,b[1][i].amount);
}if(taxi3_book>0)
printf("\nId\tCust_Id\tFrom\tTo\tPickup_time\tDrop_time\tAmount\n");
for(i=0;i<taxi3_book;i++)
printf("%d\t%d\t%s\t%s\t%d\t\t%d\t\t%d\n",b[2][i].booking_id,b[2][i].customer_id,b[2][i].from,b[2][i].t
o,b[2][i].pickuptime,b[2][i].droptime,b[2][i].amount);
}if(taxi4_book>0)
printf("\nId\tCust_Id\tFrom\tTo\tPickup_time\tDrop_time\tAmount\n");
for(i=0;i<taxi4_book;i++)
{
printf("%d\t%d\t%s\t%s\t%d\t\t%d\t\t%d\n",b[3][i].booking_id,b[3][i].customer_id,b[3][i].from,b[3][i].t
o,b[3][i].pickuptime,b[3][i].droptime,b[3][i].amount);
int main()
Login:
scanf("%s", user);
scanf("%s", pass);
system("CLS");
while(1)
int user_choice,count,i;
printf("\t\t\t\tEnter Choice:");
scanf("%d",&user_choice);
if(user_choice==1)
scanf("%d",&count);
for(i=0;i<count;i++)
printf("\n\t\t\t\tInput %d:\n",i+1);
printf("\n\t\t\t\tCustomer Id :");
scanf("%d",&t[i].customer_id);
scanf("%s",t[i].pickup_point);
scanf("%s",t[i].drop_point);
scanf("%d",&t[i].pickup_time);
if(taxi1==0)
booking(&b[0][taxi1_book++],t[i],0);
taxi1=distance(t[i].pickup_point,t[i].drop_point);
taxiprint(1);
else if(taxi2==0)
booking(&b[1][taxi2_book++],t[i],1);
taxi2=distance(t[i].pickup_point,t[i].drop_point);
taxiprint(2);
else if(taxi3==0)
booking(&b[2][taxi3_book++],t[i],2);
taxi3=distance(t[i].pickup_point,t[i].drop_point);
taxiprint(3);
else if(taxi4==0)
booking(&b[3][taxi4_book++],t[i],3);
taxi4=distance(t[i].pickup_point,t[i].drop_point);
taxiprint(4);
else
decrement();
else if(user_choice==2)
display();
}
else
return 0;
else
goto Login;
}
The above all screenshots of the output console.