0% found this document useful (0 votes)
105 views30 pages

Varanasi Bus Depo Reservation System

This document appears to be a project report for a Varanasi Bus Depot Reservation System created in C programming language. The summary includes: 1) The report describes the coding for a bus reservation system that allows users to view bus lists, book tickets, cancel bookings, and view bus status boards. 2) The coding includes functions for the bus list, booking tickets, reading booking details from files, canceling bookings, and displaying status boards. 3) The user interface allows users to log in and select options to view bus lists, book tickets, and view status boards by entering numbers. It then prompts for details like ticket quantities, seat numbers, and names.

Uploaded by

kaushal.mdb85
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
105 views30 pages

Varanasi Bus Depo Reservation System

This document appears to be a project report for a Varanasi Bus Depot Reservation System created in C programming language. The summary includes: 1) The report describes the coding for a bus reservation system that allows users to view bus lists, book tickets, cancel bookings, and view bus status boards. 2) The coding includes functions for the bus list, booking tickets, reading booking details from files, canceling bookings, and displaying status boards. 3) The user interface allows users to log in and select options to view bus lists, book tickets, and view status boards by entering numbers. It then prompts for details like ticket quantities, seat numbers, and names.

Uploaded by

kaushal.mdb85
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 30

Team Institute Varanasi

National Institute of Electronics and


Information Technology

Project Report

On

Varanasi Bus Depo Reservation System

In partial fulfillment for the award of the degree of


‘O’ LEVEL

Guided by: - Submitted by:

Mr. Kaushlendra Thakur Name: Pooja Pathak


(Team Institute, Cantt, Varanasi) Reg No: 1138848

VARANASI BUS DEPO RESERVATION SYSTEM Page 1


Team Institute Varanasi

Proforma of the Project Completion Certificate

This is to certify that the Project work done at VARANASI BUS


DEPO RESERVATION SYSTEM by Mr. KM POOJA PATHAK
NIELIT Registration No. 1138848 in partial fulfillment of
NIELIT‘O’ Level Examination has been found satisfactory. This
report has not been submitted for any other examination and
does not form part of any other course undergone by the
candidate. It is further certifies that he has appeared in all the
four modules of NIELIT‘O’ Level Examination.

Signature
Name:
(Institute PROV No. /FULL No.)

(or)
Head of the Organization/Division:
Name of the Organization:
Address:

(or)
Name of the Guide/Supervisor:
Qualification:
(Self attested copy of the qualification of the guide/Supervisor
to be attached)

VARANASI BUS DEPO RESERVATION SYSTEM Page 2


Team Institute Varanasi

ACKNOWLEDGEMENT
We would like to express our deep gratitude and sincere thanks
to all who helped us to complete this project work successfully.

Our sincere thanks to Mr. Akhilesh Singh (Center Head), for


having provided us facilities to do our project.

We sincerely thankful to Mr.Kaushlendra Thakur project guide,


for his valuable suggestions and guidance at time of need.

Our joy finds no boundary to expose our thanks to the whole


faculty, for extending great help needed for our project.

Great thanks to our family, our project associates, our most


valuable dear friends and all those directly or indirectly helped
us in this endeavor.

Last but not the least we thank the Almighty God who makes
everything happen.

Prepared by:

Km. Pooja Pathak

VARANASI BUS DEPO RESERVATION SYSTEM Page 3


Team Institute Varanasi

TITLE OF THE PROJECT

VARANASI BUS DEPO RESERVATION SYSTEM Page 4


Team Institute Varanasi

CONTENTS

1. Introduction 6
2. Objective and Problem definition 7
3. Analysis and Design 8
4. Technical Tools and Software Specification 9
5. System User Interface 10
6. Coding 16
7. Output 27
8. Conclusion 30

VARANASI BUS DEPO RESERVATION SYSTEM Page 5


Team Institute Varanasi

Introduction

A sample C programming code for a real time Varanasi Bus Depo


Reservation System is given below. This program will perform the
below Reservation operations.

 View Bus List


 Book Tickets
 Cancel Booking
 Bus Status Board

In below c programming code example, the user is prompted to


choose the operations (i.e. addition, subtraction etc) to be
performed and then prompted to key in the values which are
used to perform the operations. Then, the result will be shown as
output to the user.

This project is a console application without graphics.

VARANASI BUS DEPO RESERVATION SYSTEM Page 6


Team Institute Varanasi

Objective and Problem definition

Features of real time Varanasi Bus Depo Reservation System in C:

This project is limited to the The functions and features used in this project
are listed below:

void bus();//for list of bus

void name_number(intbooking,charnumstr[100]);

void booking();//for booking the tickets

int read_number(inttrno);//for reading the number from the file

void read_name(inttrno);//for reading the name from the file

void status();//for printing the status by user input

void status_1(inttrno);//for printing the status while booking ticket

void cancle();

void login();

You can add new features as you like to make this project a better one.

VARANASI BUS DEPO RESERVATION SYSTEM Page 7


Team Institute Varanasi

Analysis and Design

Feasibility study

It is both necessary and prudent to evaluate the feasibility of a project at


the earliest possible time. Months or years of effort, thousands and millions of dollars,
and untold professional embarrassment can be averted if an ill-conceived system is
recognized early in the definition phase.

Feasibility and risk analysis are related in many ways. If project risk is great,
the feasibility of producing quality software is reduced. During product engineering,
however, we concentrate our attention on primary areas of interest.

Technical Feasibility

Technical feasibility is the need of hardware and software, which are


needed to implement the proposed system in the organization. Technical requirements are
to be fulfilled to make the proposed system work. This should be necessarily
predetermined so as to make the system more competent.

Economical Feasibility

The Economic feasibility must satisfy the needs of the technical feasibility
and the operational feasibility. It involves the economic feasibility of developing and
implementing the proposed system.

Operational Feasibility

The proposed system should use the internet level then the different types of
end users are involved in the system, so it solves the user’s needs and the organization
needs. And it supports the all users environment.

VARANASI BUS DEPO RESERVATION SYSTEM Page 8


Team Institute Varanasi

Technical Tools and Software Specification

The project has been built on a system with the following Configuration:-

Hardware specification

Processor: -Intel PIV or Intel Core processor

RAM: -Near about 128 or 256 MB of RAM

Monitor: -Standard VGA Resolutions

Backup Media: -Compact Disk or DVD can be used.

Software specification

The project has been built on a system with the following Software requirements:-

Operating System: - Compatible Linux GUI Version or Windows OS

Compiler Package: - Compatible Code BlockIDE GCC compiler, or Turbo C 7


compiler

VARANASI BUS DEPO RESERVATION SYSTEM Page 9


Team Institute Varanasi

System User Interface

1. Main Screen

User Login: Give the user and password and press any key like Enter Key.

 After first screen user need to input Number Key for Reservation operation

 For example ‘1’ for View Bus List operation

VARANASI BUS DEPO RESERVATION SYSTEM Page 10


Team Institute Varanasi

 For Book Ticket operation press ‘2’

 For No of Tickets Give the Tickets value to book for a seat

VARANASI BUS DEPO RESERVATION SYSTEM Page 11


Team Institute Varanasi

 Now to give Seat No Details and Person Name for a given below screen

VARANASI BUS DEPO RESERVATION SYSTEM Page 12


Team Institute Varanasi

 Now to check Bus booked ticket Board Status

 Now Continue Ticket Booking for Rest of seats for same bus no

VARANASI BUS DEPO RESERVATION SYSTEM Page 13


Team Institute Varanasi

 Go to cancel ticket Operation: Press Seat number 0 and Press Enter key to return

VARANASI BUS DEPO RESERVATION SYSTEM Page 14


Team Institute Varanasi

VARANASI BUS DEPO RESERVATION SYSTEM Page 15


Team Institute Varanasi

Coding

VARANASI BUS DEPO RESERVATION SYSTEM Page 16


Team Institute Varanasi

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
char ch[10][130]={"Super Delux VARANASI- ALAHABAD Express","VARANASI - AZAMGARH
Superfast Express","Turanto Express VARANASI- LUCKNOW","Janta Express VARANASI-
ALAHABAD","Airport Link CANTT-BABATPUR","City Link Express"};
char name[32][100]={'\0'};
char number[32][2]={'\0'};
int num1[32]={0};
inttrno;
void bus();//for list of bus
voidname_number(intbooking,charnumstr[100]);
void booking();//for booking the tickets
intread_number(inttrno);//for reading the number from the file
voidread_name(inttrno);//for reading the name from the file
void status();//for printing the status by user input
void status_1(inttrno);//for printing the status while booking ticket
voidcancle();
void login();

int main()
{

intnum,i;
login();
do{
system("cls");
printf("\n\n\n");
printf("============= VARANASI BUS DEEPO RESERVATION SYSTEM
===============\n\n\n");
printf("\t\t\t\t\t[1]=> View Bus List\n");
printf("\n");
printf("\t\t\t\t\t[2]=> Book Tickets\n");
printf("\n");
printf("\t\t\t\t\t[3]=>Cancle Booking\n");
printf("\n");
printf("\t\t\t\t\t[4]=> Bus Status Board\n");
printf("\n");
printf("\t\t\t\t\t[5]=> Exit\n\n");
printf("======================================================================\n
\n");
printf("\t\t\tEnter Your Choice:: ");
scanf("%d",&num);
switch(num)

VARANASI BUS DEPO RESERVATION SYSTEM Page 17


Team Institute Varanasi

{
case 1:
bus();//for list of bus
break;
case 2:
booking();//for booking the tickets
break;
case 3:
cancle();
break;
case 4:
status();
break;
}
getch();
}while(num != 5);
system("CLS");
printf("\t-------------------------------------------------------------------\n");
printf("\t\t\t\t\tThank You For Using This System\t\t\t\t\t\t\n");
printf("\t-------------------------------------------------------------------\n");
printf("\t\t\t Team Institute Cantt,Varanasi,'O' Level Team ");
getch();
return 0;
}

void bus()
{
system("cls");
printf("\n\n\n");
printf("============= VARANASI BUS DEEPO RESERVATION SYSTEM
===============\n\n\n");
printf("\t\t\t[1] => %s\n",ch[0]);
printf("\n");
printf("\t\t\t[2] => %s\n",ch[1]);
printf("\n");
printf("\t\t\t[3] => %s\n",ch[2]);
printf("\n");
printf("\t\t\t[4] => %s\n",ch[3]);
printf("\n");
printf("\t\t\t[5] => %s\n",ch[4]);
}

void booking()

VARANASI BUS DEPO RESERVATION SYSTEM Page 18


Team Institute Varanasi

{
FILE *f1, *fopen();//for reading the seats from the user.
int i=0;
charnumstr[100];
char str1[80]="32",str2[4],str3[4];
int seat1,seat2,booking=0;
system("cls");
printf("============= VARANASI BUS DEEPO RESERVATION SYSTEM
===============\n\n\n");//for entering bus number
bus();//for seeing buses list leastx
printf("Enter the Bus number:--->");
scanf("%d",&trno);
system("cls");
printf("============= VARANASI BUS DEEPO RESERVATION SYSTEM
===============\n\n\n");//for selecting coach
printf("Your Bus Number is %d ********** %s",trno,ch[trno-1]);
status_1(trno);
if(trno==1)
{
f1 = fopen("tr1.txt","r+");
fgets(str1,80,f1);
fclose(f1);
}else if(trno == 2)
{
f1 = fopen("tr2.txt","r+");
fgets(str1,80,f1);
fclose(f1);
}else if(trno == 3)
{
f1 = fopen("tr3.txt","r+");
fgets(str1,80,f1);
fclose(f1);
}
else if(trno == 4)
{
f1 = fopen("tr4.txt","r+");
fgets(str1,80,f1);
fclose(f1);
}
else if(trno == 5)
{
f1 = fopen("tr5.txt","r+");
fgets(str1,80,f1);
fclose(f1);

VARANASI BUS DEPO RESERVATION SYSTEM Page 19


Team Institute Varanasi

}
seat1=atoi(str1);//covert the string into number
if(seat1 <= 0)
{
printf("There is no blank seat in this bus ");
}else
{
printf("\n\n\n\t\t\t\tAvailable Seats:------>%d\n",seat1);
printf("\n\t\t\t\tNumber of Tickets:----->");
scanf("%d",&booking);
printf("\n");

seat1=seat1-booking;
itoa(trno,numstr,10);
name_number(booking,numstr);
printf("\n\t\t\t\tThe Total booking amount is %d",200*booking);
itoa(seat1, str1, 10);
}
//for reading the seats from the user.
if(trno == 1)
{
f1 = fopen("tr1.txt","w");
fputs(str1,f1);
fclose(f1);
}
else if(trno == 2)
{
f1 = fopen("tr2.txt","w");
fputs(str1,f1);
fclose(f1);
}
else if(trno == 3)
{
f1 = fopen("tr3.txt","w");
fputs(str1,f1);
fclose(f1);
}
else if(trno == 4)
{
f1 = fopen("tr4.txt","w");
fputs(str1,f1);
fclose(f1);
}
else if(trno == 5)

VARANASI BUS DEPO RESERVATION SYSTEM Page 20


Team Institute Varanasi

{
f1 = fopen("tr5.txt","w");
fputs(str1,f1);
fclose(f1);
}
}

voidname_number(intbooking,charnumstr[100])
{
chartempstr[100],tempstr1[12]="status",tempstr2[12]="number";
int number;
FILE *a,*b;
int i=0;
strcat(numstr,".txt");
strcat(tempstr1,numstr);
strcat(tempstr2,numstr);
a = fopen(tempstr1,"a");//for open the file to write the name in the file
b = fopen(tempstr2,"a");//for open the file for writing the number in the file
for(i=0; i<booking; i++)//for entering the person name and seat number in the file
{
printf("===== Enter the details for ticket no %d ==========\n\n\n",i+1);
printf("\t\t\t\tEnter the seat number:--->");
scanf("%d",&number);
printf("\t\t\t\tEnter the name of person:--->");
scanf("%s",name[number-1]);
printf("\n=====================================================\n\n");
printf("\n");
itoa(number, tempstr, 10);
fprintf(a,"%s ",name[number-1]);
fprintf(b,"%s ",tempstr);

}
fclose(a);
fclose(b);
}
intread_number(inttrno)//for putting the numeric value in the array
{
chartempstr[100],tempstr2[12]="number";
FILE *a,*b;
charnumstr[100];
int i=0,j=0,k;
itoa(trno,numstr,10);
strcat(numstr,".txt");
strcat(tempstr2,numstr);

VARANASI BUS DEPO RESERVATION SYSTEM Page 21


Team Institute Varanasi

a = fopen(tempstr2,"a+");//for open the file to write the name in the file


while(!feof(a))
{
number[i][j] = fgetc(a);

if(number[i][j] == ' ')


{
j=0;
i++;
}
else
{
j++;
}
}
k=i;
for(i=0; i<k; i++)
{
num1[i] = atoi(number[i]);
}
fclose(a);
return k;
}
voidread_name(inttrno)//for putting the numeric value in the array
{
char tempstr1[12]="status";
FILE *b;
charnumstr[100];
int i=0,j=0,k=0;
itoa(trno,numstr,10);
strcat(numstr,".txt");
strcat(tempstr1,numstr);
b = fopen(tempstr1,"a+");//for open the file to write the name in the file
while(!feof(b))
{
name[i][j] = fgetc(b);

if(name[i][j] == ' ')


{
j=0;
i++;
}
else
{

VARANASI BUS DEPO RESERVATION SYSTEM Page 22


Team Institute Varanasi

j++;
}

}
name[i][j]='\0';
k=i;
fclose(b);
}

void status()
{
inti,trno,index=0,j;
char tempname[33][10]={"Empty ","Empty ","Empty ","Empty ","Empty ","Empty ","Empty
","Empty ","Empty ","Empty ","Empty ","Empty ","Empty ","Empty ","Empty ","Empty ","Empty
","Empty ","Empty ","Empty ","Empty ","Empty ","Empty ","Empty ","Empty ","Empty ","Empty
","Empty ","Empty ","Empty ","Empty ","Empty ","Empty "};
system("cls");
printf("============= VARANASI BUS DEEPO RESERVATION SYSTEM
===============\n\n\n");

printf("Enter the number of bus:---->");


scanf("%d",&trno);
j=read_number(trno);
read_name(trno);
printf("________________________________________________________________________
_______\n");
printf(" Bus.no-->%d---->%s
\n",trno,ch[trno-1]);
printf("________________________________________________________________________
_______\n");

for(i=0; i<j; i++)


{
strcpy(tempname[num1[i]],name[i]);
}
for(i=0; i<8; i++)
{
printf("\t\t\t\t");
for(j=0; j<4; j++)
{
printf("%d.%s\t",index+1,tempname[index+1]);
index++;
}
printf("\n");

VARANASI BUS DEPO RESERVATION SYSTEM Page 23


Team Institute Varanasi

}
}

void status_1(inttrno)
{ char tempname[33][10]={"Empty ","Empty ","Empty ","Empty ","Empty ","Empty ","Empty
","Empty ","Empty ","Empty ","Empty ","Empty ","Empty ","Empty ","Empty ","Empty ","Empty
","Empty ","Empty ","Empty ","Empty ","Empty ","Empty ","Empty ","Empty ","Empty ","Empty
","Empty ","Empty ","Empty ","Empty ","Empty ","Empty "};
inti,index=0,j;
printf("Your Bus Number is %d ********** %s",trno,ch[trno-1]);
system("cls");
printf("============= VARANASI BUS DEEPO RESERVATION SYSTEM
===============\n\n\n");

j=read_number(trno);
read_name(trno);

for(i=0; i<j; i++)


{
strcpy(tempname[num1[i]],name[i]);
}
for(i=0; i<8; i++)
{
printf("\t\t\t\t");
for(j=0; j<4; j++)
{
printf("%d.%s\t",index+1,tempname[index+1]);
index++;
}
printf("\n");
}
}
voidcancle()
{
intseat_no,i,j;
charnumstr[100],tempstr2[15]="number",tempstr1[15]="status";
FILE *a,*b;
printf("Enter the bus number:---->");
scanf("%d",&trno);
itoa(trno,numstr,10);
strcat(numstr,".txt");
strcat(tempstr1,numstr);
strcat(tempstr2,numstr);
read_number(trno);

VARANASI BUS DEPO RESERVATION SYSTEM Page 24


Team Institute Varanasi

read_name(trno);
status_1(trno);
printf("Enter the seat number:--->");
scanf("%d",&seat_no);

a = fopen(tempstr1,"w+");
b = fopen(tempstr2,"w+");
for(i=0; i<32; i++)
{
if(num1[i] == seat_no)
{
for(j=0; j<32; j++)
{
if(num1[j] != seat_no&& num1[j] != 0)
{
fprintf(b,"%d ",num1[j]);
fprintf(a,"%s",name[j]);
}
else if(num1[j] == seat_no&& num1[j] != 0)
{
strcpy(name[j],"Empty ");
}
}
}
}
fclose(a);
fclose(b);
printf("\n\n");
printf("========================================================================
\n");
printf("\t\t\t\tYour 200 rupees has been Returned\t\t\t\n");
printf("========================================================================
=\n");
}
void login()
{
int a=0,i=0;
charuname[10],c=' ';
charpword[10],code[10];
char user[10]="user";
char pass[10]="pass";
do
{
system("cls");

VARANASI BUS DEPO RESERVATION SYSTEM Page 25


Team Institute Varanasi

printf("\n============= VARANASI BUS DEEPO RESERVATION SYSTEM =============== ");


printf(" \n ENTER USERNAME:-");
scanf("%s", &uname);
printf(" \n ENTER PASSWORD:-");
while(i<10)
{
pword[i]=getch();
c=pword[i];
if(c==13) break;
elseprintf("*");
i++;
}
pword[i]='\0';
//char code=pword;
i=0;
//scanf("%s",&pword);
if(strcmp(uname,"user")==0 &&strcmp(pword,"pass")==0)
{
printf(" \n\n\n WELCOME TO VARANASI BUS DEEPO RESERVATION SYSTEM !!!!
LOGIN IS SUCCESSFUL");
printf("\n\n\n\t\t\t\tPress any key to continue...");
getch();//holds the screen
break;
}
else
{
printf("\n SORRY !!!! LOGIN IS UNSUCESSFUL");
a++;

getch();//holds the screen

}
}
while(a<=2);
if (a>2)
{
printf("\nSorry you have entered the wrong username and password for four
times!!!");

getch();
}
system("cls");
}

VARANASI BUS DEPO RESERVATION SYSTEM Page 26


Team Institute Varanasi

Output

 Empty Bus Ticket Status

 Booked Ticket Status

 Rest Ticket Status

VARANASI BUS DEPO RESERVATION SYSTEM Page 27


Team Institute Varanasi

 Cancelation Ticket Status

VARANASI BUS DEPO RESERVATION SYSTEM Page 28


Team Institute Varanasi

VARANASI BUS DEPO RESERVATION SYSTEM Page 29


Team Institute Varanasi

Conclusion
This project incorporates all requirements of Varanasi Bus Depo Reservation System.
This system has been developed as versatile and uses friendly as possible keeping in
mind the advanced features in this technology.

Using such a project helps the organization in minimizing the time and money
consumed in fulfilling the day-to-day functionality’s and cutting down the expenses
incurred on the same. The real world requirement was satisfied by this system which
provides all services …

Using Turbo C 7 and Code Block IDE, the project was developed. As a whole, the
system was well planned and designed.

VARANASI BUS DEPO RESERVATION SYSTEM Page 30

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy