National Institute of Electronics and
Information Technology
Project Report
On
Tourism System
In partial fulfillment for the award of the degree of
‘O’ LEVEL
Guided by: Submitted by:
Mr. Kaushlendra Thakur Name: Shekh Alakama
Reg No:1139763
(Team Institute, Cantt, Varanasi)
Team Institute Cantt Varanasi
Proforma of the Project Completion Certificate
This is to certify that the Project work done at Tourism
System by Mr Shekh Alakama NIELIT Registration No.
1139763 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)
Tourism System Page 2
Team Institute Cantt 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:
Shekh Alakama
Tourism System Page 3
Team Institute Cantt Varanasi
TITLE OF THE PROJECT
Tourism System Page 4
Team Institute Cantt 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 ....................................................................................................... 13
7. Output ........................................................................................................ 27
8. Conclusion ................................................................................................. 30
Tourism System Page 5
Team Institute Cantt Varanasi
Introduction
Tourism Management System is based on a concept of maintaining tour packages for the
tourists. Before stepping into the main system a user has to pass through login system to
get access, then only he/she can use the features of the system which includes booking
package, previewing ticket, canceling a ticket, viewing tourism brochure. It also contains
a sign-up feature.
Talking about the features of Tourism management system, a user needs a certain id to
get access. For this, the user can simply sign up by providing username and password.
After logging in as a user, there are several options to perform. The user can check for
holiday packages and book. In order to book a package, the user has to select within
given package details and enter the number of people. After the booking is done, he/she
can check for the ticket details which display the total price and ticket of the package. In
total there are 10-holiday packages. Whenever the user wants to cancel the tickets, he/she
can easily cancel it and get the refund.
Tourism System Page 6
Team Institute Cantt Varanasi
Objective and Problem definition
There are certain things like a user can only book one package from one user id. In
order to book more packages, he/she needs to cancel their current bookings.
Each package contains a unique code, which the user must enter during booking
procedures. The last feature of this project is about changing the password. A
user can change his/her password anytime just by providing their current
password (to verify user) and entering a new password. After all these, the user
can also log out of their current id. The system creates an external file to store the
user’s data permanently.
Tourism Management system is developed using C Programming Language and
different variables, strings have been used for the development of it. This project
provides the simplest system for managing tour packages for the tourism sector.
In order to run the project, you must have installed Dev C++ or Code Blocks on
your PC.
Features:
Sign up
Login-Logout
Book Tour Package
Check Tickets
Cancel Tickets
Change Password
Brochure
Tourism System Page 7
Team Institute Cantt 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.
Tourism System Page 8
Team Institute Cantt 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
Tourism System Page 9
Team Institute Cantt Varanasi
System User Interface
1. User Registration and Login
Type username: kaushal
Type password: kaushal85
2. System Interface
Press keys of number for system operation
Tourism System Page 10
Team Institute Cantt Varanasi
3. For Booking Package
Press 1 for Booking package
And type tours code of place
Press Enter keys to continue
4. Check ticket status
Press number keys 2 to get ticket confirmation for Tours place
Tourism System Page 11
Team Institute Cantt Varanasi
5. Ticket Cancelation
Press 4 to cancel ticket
6. Exit of system
Press 8 to exit
Tourism System Page 12
Team Institute Cantt Varanasi
Coding
Tourism System Page 13
Team Institute Cantt Varanasi
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
enum state{menu,loggedin};
enum state currentstate=menu;
typedefstruct user
{
char username[100];
char password[100];
char place[100];
float price;
intnumtick;
struct user *next;
}user;
voidShowBrochure();
user* InitializeList(user*);
user* AddUser(user*);
voidLoginUser(user*);
voidBookTicket(user*);
voidPrintTicket(user*);
voidCancelTicket(user*);
voidChangePassword(user*);
voidLogoutUser();
voidCheckTicket(user*);
voidDisplayAll(user*);
voidWriteToFile(user*);
voidExitProgram();
charcurrentuser[100];
int main()
{
printf("\t\t\t==== || TOURISM SYSTEM || ====\n");
user *h=NULL;
int ch1,ch2;
Tourism System Page 14
Team Institute Cantt Varanasi
h=InitializeList(h);
while (1)
{
if(currentstate==menu)
{
printf("\n\t\t\t\tAdd User - 1\n\t\t\t\tLogin User - 2\n\t\t\t\tBrochure -
3\n\t\t\t\tExit - 4\n\n\t\t\t\tEnter:");
scanf("%d",&ch1);
switch(ch1)
{
case 1:
h=AddUser(h);
break;
case 2:
LoginUser(h);
break;
case 3:
ShowBrochure();
break;
case 4:
ExitProgram();
exit(0);
break;
default:
printf("Not a valid input at this stage\n");
}
}
else if(currentstate==loggedin)
{
system("CLS");
printf("\n\t\t\t\t=========================");
printf("\n\t\t\t\tTOURISM SYSTEM");
printf("\n\t\t\t\t=========================\n");
printf("\n\t\t\t\tBook Package - 1\n\t\t\t\tCheck Ticket - 2\n\t\t\t\tPrint
Ticket - 3\n\t\t\t\tCancel Ticket - 4\n\t\t\t\tChange Password - 5"
"\n\t\t\t\tLogout User - 6\n\t\t\t\tBrochure - 7\n\t\t\t\tExit -
8\n");
scanf("%d",&ch2);
Tourism System Page 15
Team Institute Cantt Varanasi
switch(ch2)
{
case 1:
BookTicket(h);
system("PAUSE");
system("CLS");
break;
case 2:
CheckTicket(h);
system("PAUSE");
system("CLS");
break;
case 3:
PrintTicket(h);
system("PAUSE");
system("CLS");
break;
case 4:
CancelTicket(h);
system("PAUSE");
system("CLS");
break;
case 5:
ChangePassword(h);
system("PAUSE");
system("CLS");
break;
case 6:
LogoutUser(h);
system("PAUSE");
system("CLS");
break;
case 7:
ShowBrochure();
system("PAUSE");
system("CLS");
break;
case 8:
ExitProgram();
exit(0);
Tourism System Page 16
Team Institute Cantt Varanasi
break;
default:
printf("Not a valid input at this stage\n");
}
}
}
return 0;
}
user* InitializeList(user *h)
{
user* t,*ptr,temp;
FILE *fp;
int cc=0,x;
floatff;
fp=fopen("users.txt","r");
if(fp==NULL)
return NULL;
if(fgetc(fp)==EOF)
return NULL;
rewind(fp);
while(fscanf(fp,"%s %s %s %f
%d",temp.username,temp.password,temp.place,&temp.price,&temp.n
umtick)!=EOF)
{
ptr=(user*)malloc(sizeof(user));
strcpy(ptr->username,temp.username);
strcpy(ptr->password,temp.password);
strcpy(ptr->place,temp.place);
ptr->price=temp.price;
ptr->numtick=temp.numtick;
ptr->next=NULL;
if(h==NULL)
h=t=ptr;
else
{
Tourism System Page 17
Team Institute Cantt Varanasi
h->next=ptr;
h=ptr;
}
}
fclose(fp);
return t;
}
voidWriteToFile(user *h)
{
FILE *fp;
fp=fopen("users.txt","w");
while(h!=NULL)
{
fprintf(fp,"%s %s %s %f %d\n",h->username,h->password,h-
>place,h->price,h->numtick);
h=h->next;
}
fclose(fp);
}
voidShowBrochure()
{
system("CLS");
printf("\tPRICE LIST\n=============================\n ");
printf("1. VL - Varanasi to LuckhnowRs 3500 \n 2. VG - Varanasi to
Gujrat - Rs10000 \n 3. VM - Varanasi to Mirjapur- Rs 2000 \n 4. VJ -
Varanasi to Jaipur - Rs 10000\n 5.VH-varanasi to Himanchal - Rs
25000 \n 6.VU-Varanasi to Uttarakhand - Rs 20000\n 7. VN -
Varanasi to Nepal - Rs 35000\n 8.VK - Varanasi to KnyaKumari- Rs
150000\n 9.VS - Varanasi to Kasmir - Rs 200000\n 10.VA-Varansi to
Amritsar 25000\n");
}
voidCheckTicket(user *h)
{
while(h!=NULL)
{
if(!strcmp(h->username,currentuser))
break;
Tourism System Page 18
Team Institute Cantt Varanasi
h=h->next;
}
if(!strcmp(h->place,"\0") || h->price==0.0 || h->numtick==0)
{
printf("You do not have a ticket booked yet\n");
return;
}
float total=0.0;
total=(h->price)*(h->numtick);
printf("You have booked %d tickets for a sum total of Rs %f for tour
code %s\n",h->numtick,total,h->place);
}
user* AddUser(user* h)
{
user *t;
t=h;
user *nw;
nw=(user*)malloc(sizeof(user));
fflush(stdin);
printf("Enter username or email\n");
scanf("%s",nw->username);
while(h!=NULL)
{
if(!strcmp(h->username,nw->username))
{
printf("That email already exists\n");
return t;
}
h=h->next;
}
h=t;
fflush(stdin);
printf("Enter password\n");
scanf(" %[^\n]s",&nw->password);
nw->next=NULL;
strcpy(nw->place,"N/A");
nw->price=0.0;
nw->numtick=0;
Tourism System Page 19
Team Institute Cantt Varanasi
if(h==NULL)
{
h=t=nw;
}
else
{
while(h->next!=NULL)
{
h=h->next;
}
h->next=nw;
}
WriteToFile(t);
return t;
}
voidLoginUser(user* h)
{
char username[100];
char password[100];
fflush(stdin);
printf("\n\n");
printf("\t\tEnter Email/Username:\n\t\t");
scanf("%s",username);
fflush(stdin);
printf("\n\t\tEnter Password:\n\t\t");
scanf(" %[^\n]s",password);
while(h!=NULL)
{
if((!strcmp(h->username,username)) && (!strcmp(h-
>password,password)))
{
currentstate=loggedin;
strcpy(currentuser,username);
printf("\n\t\tLogin successful!\n");
system("PAUSE");
return;
}
Tourism System Page 20
Team Institute Cantt Varanasi
else if((!strcmp(h->username,username)) && (strcmp(h-
>password,password)))
{
printf("Password mismatch\n");
return;
}
h=h->next;
}
printf("Sorry, no such user record was found\n");
}
voidBookTicket(user *h)
{
user *t=h;
char place[100];
while(h!=NULL)
{
if(!strcmp(h->username,currentuser))
break;
h=h->next;
}
if(h==NULL)
return;
if(h->price!=0.0)
{
printf("You must cancel your previous ticket before buying a new
one\n");
return;
}
ShowBrochure();
float
pricelist[]={3500.0,10000.0,2000.0,10000.0,25000.0,20000.0,350000.
0,15000.0,20000.0,20000.0};
fflush(stdin);
printf("\nEnter place code (eg: VL,VG)\n");
scanf(" %[^\n]s",place);
char choice;
fflush(stdin);
printf("\nWould You Like to Confirm Booking?\n[1] - Yes\n[2] -
No\n");
Tourism System Page 21
Team Institute Cantt Varanasi
scanf("%c",&choice);
float price;
if(choice!='1')
return;
if(strcmp(place,"VL")==0)
price=pricelist[0];
else if(strcmp(place,"VG")==0)
price=pricelist[1];
else if(strcmp(place,"VM")==0)
price=pricelist[2];
else if(strcmp(place,"VJ")==0)
price=pricelist[3];
else if(strcmp(place,"VH")==0)
price=pricelist[4];
else if(strcmp(place,"VU")==0)
price=pricelist[5];
else if(strcmp(place,"VN")==0)
price=pricelist[6];
else if(strcmp(place,"VK")==0)
price=pricelist[7];
else if(strcmp(place,"VS")==0)
price=pricelist[8];
else if(strcmp(place,"VA")==0)
price=pricelist[9];
else
{
printf("That tour code doesn't exist\n");
return;
}
printf("Enter the number of tickets you want to book?\n");
scanf("%d",&h->numtick);
if(h->numtick==0)
return;
strcpy(h->place,place);
h->price=price;
WriteToFile(t);
printf("Bookings Done!!\n");
system("PAUSE");
Tourism System Page 22
Team Institute Cantt Varanasi
voidPrintTicket(user *h)
{
while(h!=NULL)
{
if(!strcmp(h->username,currentuser))
break;
h=h->next;
}
if(!strcmp(h->place,"\0") || h->price==0.0 || h->numtick==0)
{
printf("You do not have a ticket booked yet\n");
return;
}
float total=0.0;
total=(h->price)*(h->numtick);
FILE *fp;
char filename[50];
strcpy(filename,h->username);
strcat(filename,"_ticket.txt");
fp=fopen(filename,"w");
if(fp==NULL)
{
printf("Problem opening the file\n");
return;
}
if(fgetc(fp)==EOF)
{
fprintf(fp,"TOURISM TICKET\n===============\n\n");
}
fprintf(fp,"Email ID: %s\nTour Code: %s\nTicket Cost: Rs
%f\nNumber of tickets: %d\nTotal Cost: Rs %f\n",h->username,h-
>place,h->price,h->numtick,total);
fclose(fp);
}
//TMS1353f
voidCancelTicket(user *h)
{
user *t=h;
while(h!=NULL)
Tourism System Page 23
Team Institute Cantt Varanasi
{
if(!strcmp(h->username,currentuser))
break;
h=h->next;
}
int flag=-1;
if(h==NULL)
printf("No such user\n");
if(strcmp(h->place,"VL")==0)
flag++;
else if(strcmp(h->place,"VG")==0)
flag++;
else if(strcmp(h->place,"VM")==0)
flag++;
else if(strcmp(h->place,"VJ")==0)
flag++;
else if(strcmp(h->place,"VH")==0)
flag++;
else if(strcmp(h->place,"VU")==0)
flag++;
else if(strcmp(h->place,"VN")==0)
flag++;
else if(strcmp(h->place,"VK")==0)
flag++;
else if(strcmp(h->place,"VS")==0)
flag++;
else if(strcmp(h->place,"VA")==0)
flag++;
else
{
printf("You haven't booked a tour yet\n");
return;
}
if(flag==0)
{
Tourism System Page 24
Team Institute Cantt Varanasi
printf("Your ticket has been successfully cancelled\nA refund of Rs
%f for Tour Code %s for %d tickets will soon be made to your
original source of purchase\n",h->price,h->place,h->numtick);
strcpy(h->place,"N/A");
h->price=0.0;
h->numtick=0;
WriteToFile(t);
}
}
voidChangePassword(user *h)
{
user *t=h;
charpasscurr[100];
fflush(stdin);
printf("Enter your current password to continue:\n");
scanf(" %[^\n]s",passcurr);
while(h!=NULL)
{
if(!strcmp(h->username,currentuser))
break;
h=h->next;
}
if(h==NULL)
return;
if(!strcmp(passcurr,h->password))
{
printf("Enter new password:\n");
scanf(" %[^\n]s",h->password);
}
WriteToFile(t);
}
voidLogoutUser()
{
if(currentstate==menu || strcmp(currentuser,"\0")==0)
{
printf("You must be logged in to logout\n");
return;
}
Tourism System Page 25
Team Institute Cantt Varanasi
strcpy(currentuser,"\0");
currentstate=menu;
printf("You have been successfully logged out\n");
}
voidExitProgram()
{
printf("Exiting...\nDeveloped By Team Group of
Institution,Varanasi\n\n\nPress \"Enter/Return\" to exit");
charexitprog;
fflush(stdin);
scanf("%c",&exitprog);
}
Tourism System Page 26
Team Institute Cantt Varanasi
Output
1. Broucher
2. Change Password
3. Check Ticket
Tourism System Page 27
Team Institute Cantt Varanasi
4. Print Ticket
Tourism System Page 28
Team Institute Cantt Varanasi
5. New Ticket Booking Output
Tourism System Page 29
Team Institute Cantt Varanasi
Conclusion
This project incorporates all requirements of Tourism 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.
Tourism System Page 30