Railway Reservation System

21
RAILWAY RESERVATION SYSTEM Submitted in the partial fulfillment of the Degree of Bachelor of Technology (Integrated-MBA) In Computer Science and Engineering SUBMITTED BY:- GUIDED BY: Name –KAMESH Miss Sukhdilpreet Kaur Regd. NO-10801816 Rollno R246A02

Transcript of Railway Reservation System

Page 1: Railway Reservation System

RAILWAY RESERVATION SYSTEM

Submitted in the partial fulfillment of the Degree of Bachelor of Technology (Integrated-MBA)

InComputer Science and Engineering

SUBMITTED BY:- GUIDED BY:Name –KAMESH Miss Sukhdilpreet Kaur

Regd. NO-10801816 Rollno R246A02

SUBMITTED TO

Department of Computer Science and Engineering Lovely Professional University Phagwara

Page 2: Railway Reservation System

ACKNOWLEDGEMENT

I take this opportunity to present my votes of thanks to all those guidepost who really acted as lightening pillars to enlighten our way throughout this project that has led to successful and satisfactory completion of this study.We are really grateful to our HOD Mr. Rohit Dhand for providing us with an opportunity to undertake this project in this university and providing us with all the facilities. We are highly thankful to Miss Sukhdilpreet Kaur for her active support, valuable time and advice, whole-hearted guidance, sincere cooperation and pains-taking involvement during the study and in completing the assignment of preparing the said project within the time stipulated.Lastly, We are thankful to all those, particularly the various friends , who have been instrumental in creating proper, healthy and conductive environment and including new and fresh innovative ideas for us during the project, their help, it would have been extremely difficult for us to prepare the project in a time bound framework.

Name –KAMESH SHARMA

Regd.No-10801816,Rollno.R246A02

Page 3: Railway Reservation System

TABLE OF CONTENTS

1. Introduction2. Proposed system

i. Descriptionii. System requirements

3. Requirement Analysis4. System Design5. Source code6. Testing7. Future scope of project

Page 4: Railway Reservation System

INTRODUCTION

In the existing system, most of the records are maintained on paper. It becomes very inconvenient to modify the data. In the existing system, here is a possibility that the same data in different registers may have different values which means the entries of the same data do not match. This inconsistent state does not supply the concrete information which poses a problem in the case information related to particular search record.Our project is very useful. User is no longer required to check his register in search of records, as now it can be searched over the software by choosing some options. The user need not to type in most of the information. He/she is just required to enter the desired options. On the whole it liberates the user from keeping lengthy manual records. In a nutshell, it abates the work load of an organization.

In today’s world, no one likes to perform calculations on calculator or manually when computer is there. Every one wants his/her work to be done

by computer automatically and displaying the result for further manipulations.

Page 5: Railway Reservation System

PROPOSED SYSTEM

The following documentation is a project the “RAILWAY RESERVATION SYSTEM”. It is a detailed summary of all the drawbacks of the old system and how the new proposed system overcomes these shortcomings. The new system takes into account the various factors while designing a new system. It keeps into the account the Economical bandwidth available for the new system. The foremost thing that is taken care of is the Need and Requirements of the User.

DESCRIPTION

Before developing software we keep following things in mind that we can develop powerful and quality softwarePROBLEM STATEMENT

o Problem statement was to design a module:o Which is user friendlyo Which will restrict the user from accessing other user’s data.o Which will help user in viewing his data and privileges.o Which will help the administrator to handle all the changes.

FUNCTIONS TO BE PROVIDED:The system will be user friendly and completely menu driven so that the users shall have no problem in using all options.

o The system will be efficient and fast in response.o The system will be customized according to needs.**Write according to you projecto (View o Add o Deleteo Modify)

SYSTEM REQUIRMENTSOperating system: MS Windows XP or Windows VistaLanguage: C LanguageProcessor: Pentium IV Processor

Page 6: Railway Reservation System

RAM: 512 MB Hard disk: 5 GB

Page 7: Railway Reservation System

REQUIREMENT ANALYSIS

This process is adopted when management of the system development, Personnel decide that the particular system needs improvement. The system development life cycle is the set of activities, carried out by the analyst, designers and users to develop and implement a system. The systems that are present in the nature follow common life cycle pattern. For example consider the raining system. Initially the rain falls into the river, river flows into sea, the sea water evaporates to form vapors, the vapors form clouds which again bring rain. Similarly consider a man made system initially a system is analyzed, designed and made operational by the efforts of system analysis. After successful operation or a number of users, the system becomes less and less effective by change in the environment. So these changes have to be incorporated in to the system by minor modifications. So the general activities from the life cycle of the system are given below:

Select ion and identification of the system to be studied Preliminary study Defining the system Design and development of the system Implementation of the system

Page 8: Railway Reservation System

SYSTEM DESIGN

Then we began with the design phase of the system. System design is a solution, a “HOW TO” approach to the creation of a new system. It translates system requirements into ways by which they can be made operational. It is a translational from a user oriented document to a document oriented programmers. For that, it provides the understanding and procedural details necessary for the implementation. Here we use Flowchart to supplement the working of the new system. The system thus made should be reliable, durable and above all should have least possible maintenance costs. It should overcome all the drawbacks of the Old existing system and most important of all meet the user requirements.

WELCOME TO RAILWAY RESERVATION SYSTEM

Enter your choice ?

1.VIEW ALL TRAIN RESERVE A SEAT CANCEL A SEAT EXIT

Do you want to continue? NO

START

STOP

Page 9: Railway Reservation System

SOURCE CODE

#include <stdio.h>#include <conio.h>#include<string.h>

struct air{ char name[20];

int phno; char address[50];

int ticketno;

}s;void view();

void reserve();void cancel();void form();void menu()

{ int ch;clrscr();

printf("\tRAILWAY RESERVATION SYSTEM");printf("\n\n1.VIEW ALL TRAINS");

printf("\n\n2.RESERVE A TICKET");printf("\n\n3.CANCEL A TICKET");

printf("\n\n4.exit ");printf("\nEnter your choice(1,2,3or4)");

scanf("%d",&ch);switch(ch)

{ case 1: view(); getch(); menu(); break;

case 2: reserve(); getch(); menu(); break;

case 3: cancel(); getch(); menu(); break;

Page 10: Railway Reservation System

case 4:exit(); break;

default:printf("\nenter a valid choice");}}

void view(){ clrscr();

printf("CODE ROUTE TIMINGS "); printf("\n1021 Delhi to Mumbai 06:30 ");

printf("\n1024 Delhi to kolkata 12:00 "); printf("\n1098 Delhi to Amritsar 14:30 "); printf("\n1987 Delhi to Banglore 18:00 "); printf("\n1576 Delhi to chennai 20:00 ");

getch();

}

void form(){

printf("\nEnter the name"); scanf("%s",&s.name);

printf("\nEnter the phone number"); scanf("%d",&s.phno);

printf("\n Enter the address"); scanf("%s",&s.address);

printf("\n\Enter the seat no"); scanf("%d",&s.ticketno);

printf("Your ticket is confirmed"); getch();

}void reserve()

{ int code,total_seats=100,reserved=0,class; clrscr();

if(reserved<total_seats) { reserved++;

printf("Enter the train code"); scanf("%d",&code);

if(code==1021||code==1024||code==1098||code==1987||code==1576) { clrscr();

printf("\n 1.first class(fare Rs1500 )");

Page 11: Railway Reservation System

printf("\n 2.second class(fare Rs800)"); printf("\n 3.sleeper class(fare Rs500)");

scanf("%d",&class); if(class==1)

{clrscr();

printf("Your fare is Rs.1500"); form(); menu();

} else if(class==2)

{clrscr();printf("\nYour fare is Rs.800");

form(); menu();

} else if(class==3)

{clrscr(); printf("\n Your fare is Rs.500");

form(); menu();

} else

{ clrscr(); printf("Enter vali choice(1,2or 3)");

menu(); }

getch();}

else printf("WARNING!YOU HAVE ENTERED THE WRONG CODE");

}}

void cancel(){int ticket; char ch; clrscr();

printf("enter the ticket no");scanf("%d",&ticket);

Page 12: Railway Reservation System

if(ticket==s.ticketno) { printf("your ticket is cancelled");

getch(); }

else {printf("ticket no is invalid");

getch(); menu();

}}void main()

{clrscr();

printf("\n WELCOME TO RAILWAY RESERVATION SYSTEM");getch();menu();

}ng of your project

Page 13: Railway Reservation System

TESTING

Testing is the major control measure used during software development. Its basic function is to detect errors in the software. During requirement analysis and design, the output is a document that is usually textual and no executable. After the coding phase, computer programs are available that can be executed for testing purpose. This implies that testing not only, has to uncover errors introduced during coding, but also errors introduced during previous phase. Thus the goal of testing is to uncover the requirements, design and coding errors in the programs. So after testing the outputs of my project are as follows:

WELCOME TO THE RAILWAY RESERVATION SYSTEM

RAILWAY RESERVATION SYSTEM

1.VIEW ALL TRAINS

2.RESERVE A TICKET

3.CANCEL A TICKET

4.EXIT

ENTER YOUR CHOICE(1,2,3OR4)1

Page 14: Railway Reservation System

CODE ROUTE TIMINGS

1021 DELHI TO MUMBAI 06:30

1024 DELHI TO KOLKATA 12:00

1098 DELHI TO AMRITSAR 14:30

1987 DELHI TO BANGLORE 18:00

1576 DELHI TO CHENNAI 20:00

Page 15: Railway Reservation System

RAILWAY RESERVATION SYSTEM

1.VIEW ALL TRAINS

2.RESERVE A TICKET

3.CANCEL A TICKET

4.EXIT

ENTER YOUR CHOICE(1,2,3OR4)2

ENTER THE TRAIN CODE1987

1.FIRST CLASS (FARE RS1500)2.SECOND CLASS (FARE RS 800)3.SLEEPER CLASS(FARE RS 500)1

YOUR FARE IS RS.1500.

ENTER THE NAME KAMESH

ENTER THE PHONE NUMBER 9888914737

ENTER THE ADDRESS L.P.U.

ENTER THE SEAT NO. 23

YOUR TICKET IS CONFIRMED.

Page 16: Railway Reservation System

RAILWAY RESERVATION SYSTEM

1.VIEW ALL TRAINS

2.RESERVE A TICKET

3.CANCEL A TICKET

4.EXIT

ENTER YOUR CHOICE(1,2,3OR4)3

ENTER THE TICKET NO. 23

YOUR TICKRT IS CANCELLED.

Page 17: Railway Reservation System

RAILWAY RESERVATION SYSTEM

1.VIEW ALL TRAINS

2.RESERVE A TICKET

3.CANCEL A TICKET

4.EXIT

ENTER YOUR CHOICE(1,2,3OR4) 4

Page 18: Railway Reservation System

FUTURE SCOPE OF THE PROJECT

Our project will be able to implement in future after making some changes and modifications as we make our project at a very low level. So the modifications that can be done in our project are:

** write down the modifications that can be made in your project

With the help of this project we are not able to calculate number of reserved and unreserved seats.so we have to make a project to calculate numbers of seats.