Cloud Based Train Ticketing System-Report

Download as pdf or txt
Download as pdf or txt
You are on page 1of 48

A First Project Report on

Cloud Based Train Ticketing System

Submitted in Partial Fulfillment of the Requirements for


the Degree of Bachelors of Engineering in Computer
Engineering
under Pokhara University

Submitted by:
Ashok Nath, 171204
Richa Mishra,171231
Pooja Bajagain,171222

Date:
02 Jan 2020

Department of Computer Engineering


NEPAL COLLEGE OF
INFORMATION TECHNOLOGY
Balkumari, Lalitpur, Nepal
ACKNOWLEDGEMENT
This project has been successfully completed with collective teamwork of individual
team members. We are thankful to all people who immensely contributed and gave their
idea to the successful writing of this project. Without their guidance this project would
not have out successful. We will never forget the effort of our teachers who instructed
us throughout the completion of this project.

We would like to express our deepest appreciation to our department and entire college
for supporting us in completion of this project. Last but not least we express our
gratitude to our classmate who supported us and gave their views towards our work.
Special Thanks to Stack Overflow and GitHub; the platform that instructed us virtually
throughout the development of the project.

IV
ABSTRACT
Cloud Based Train Ticketing System is cloud-based application for ticket reservation
and validation using web network. This project will help to overcome one of the major
challenges in the current ticketing facility of booking train tickets by standing in the
queue for very long period of time. This will also help users to book tickets for their
journey, search train between two stations and gets details of the particular schedules
including their fare details. The user can use this system by registering on this
application, a valid login user name and password must be required to defend from
frauds.

The technology to build this system are Java/Servlet, JSP as a backend programming
system. The user interface of this application is designed using CSS which is a language
used for describing the presentation of a document written in markup language like
HTML. Data of users is stored in the MySQL database.

The cloud server allows for handling a larger number of users using efficient computing
power which will save the users valuable time. Hence, this project will help users to
reserve their seats, choose the type of coach they wish to travel in, travelling date and
time selection and payment mode, according to their choice at any time and from
anywhere using this system.

Keywords: cloud-based, queue less, train ticket, anytime anywhere.

II
LIST OF ABBREVIATIONS

HTM Hypertext Markup Language

CSS Cascaded Style Sheet

SQL Structured Query Language

JSP Java Server Pages

IDE Integrated Development Environment

GUI Graphical User Interface

JRE Java Runtime Environment

SRS System Requirement Specification

SDK Software Development Kit

RDBMS Relational Database Management System

LOC Lines of Code

Fig Figure

ATM Automated Teller Machine

WWW World Wide Web

TCP Transmission Control Protocol

IP Internet Protocol

Mac Macintosh

GB Gigahertz

RAM Random Access Memory

PNR Passenger Name Record

DoRW Department of Railways

NRC Nepal Railways Corporation

III
TABLE OF FIGURES

Table 1: Tools used for Development of application .............................................. - 6 -


Table 2: Train Table ............................................................................................. - 22 -
Table 3: Station Table .......................................................................................... - 22 -
Table 4: User Table.............................................................................................. - 23 -
Table 5: Admin Table .......................................................................................... - 23 -
Table 6: Destination Table ................................................................................... - 23 -
Table 7: Booking Table........................................................................................ - 24 -
Table 8: System Requirements Specification ....................................................... - 26 -
Table 9: Project Scheduling ................................................................................. - 29 -

IV
TABLE OF CONTENTS
2 INTRODUCTION ............................................................................................................... - 1 -
1.1 PROBLEM STATEMENT ........................................................................................................... - 1 -
1.2 PROJECT OVERVIEW .............................................................................................................. - 1 -
1.3 PROJECT AIM AND OBJECTIVES .............................................................................................. - 2 -
2.1 SCOPE AND LIMITATION ...................................................................................................... - 2 -
2.1.1 Scope ............................................................................................................................ - 2 -
2.1.2 Limitations.................................................................................................................... - 2 -
2.2 SIGNIFICANCE OF STUDY ..................................................................................................... - 3 -
3 METHODOLOGY.............................................................................................................. - 4 -
2.1 SOFTWARE DEVELOPMENT LIFE CYCLE:................................................................... - 4 -
3.1 REQUIREMENT DETERMINATION .......................................................................................... - 5 -
3.2 REQUIREMENT ANALYSIS .................................................................................................... - 5 -
3.3 SYSTEM DESIGN ................................................................................................................. - 5 -
3.4 IMPLEMENTATION ............................................................................................................... - 5 -
3.5 TESTING AND VALIDATION .................................................................................................. - 5 -
3.6 TECHNOLOGY USED ............................................................................................................ - 5 -
3.7 MYSQL AS RELATIONAL DATABASE .................................................................................... - 6 -
3.8 REQUIRED TOOLS TO BE USED ............................................................................................. - 6 -
4 LITERATURE REVIEW.................................................................................................... - 6 -
4.1 INTRODUCTION ................................................................................................................... - 6 -
4.2 NEPAL RAILWAY CORPORATION ........................................................................................... - 7 -
4.3 COMPARISON OF CURRENT SYSTEM WITH PROPOSED SYSTEM .............................................. - 8 -
4.3.1 Description of The Current System ................................................................................ - 8 -
4.3.2 Description of The Proposed System.............................................................................. - 8 -
4.3.3 Architecture of The Proposed System ............................................................................. - 8 -
4.4 ONLINE BOOKING/RESERVATION. ........................................................................................ - 9 -
4.5 RESERVATION INFORMATION SYSTEMS ................................................................................. - 9 -
4.6 COMPONENTS USED IN RESERVATION INFORMATION SYSTEMS .............................................. - 9 -
4.6.1 Hardware...................................................................................................................... - 9 -
4.6.2 Software ..................................................................................................................... - 10 -
4.6.3 Data ........................................................................................................................... - 10 -
4.6.4 People ........................................................................................................................ - 10 -
4.6.5 Procedures.................................................................................................................. - 10 -
4.6.6 Database ..................................................................................................................... - 11 -
4.7 TYPES OF RESERVATIONS IN RESERVATION SYSTEM ............................................................ - 11 -
4.7.1 Guaranteed Reservation: ............................................................................................. - 11 -
4.7.2 Non-guaranteed Reservation ........................................................................................ - 11 -
5 SYSTEM ANALYSIS ........................................................................................................ - 12 -
5.1 ORAL INTERVIEWS ............................................................................................................ - 13 -
5.2 STUDY OF THE MANUAL SYSTEM ....................................................................................... - 13 -
6 REQUIREMENT ANALYSIS........................................................................................... - 13 -
6.1 FUNCTIONAL REQUIREMENTS............................................................................................ - 13 -
6.2 NON-FUNCTIONAL REQUIREMENTS .................................................................................... - 14 -
7 SYSTEM DESIGN ............................................................................................................ - 14 -
7.1 LOGICAL DESIGN .............................................................................................................. - 15 -

II
7.2 CONCEPTUAL DESIGN:....................................................................................................... - 15 -
7.3 PHYSICAL DESIGN ............................................................................................................. - 15 -
7.4 USE CASE DIAGRAM ......................................................................................................... - 15 -
7.5 USE CASE: SYSTEM USERS ................................................................................................ - 16 -
7.6 ALGORITHMS FOR ALL ENTITIES ........................................................................................ - 16 -
7.6.1 User login algorithm ................................................................................................... - 16 -
7.6.2 Purchase ticket algorithm............................................................................................ - 17 -
7.6.3 3.Available algorithm:................................................................................................. - 17 -
7.6.4 Cancelation & rescheduling ........................................................................................ - 17 -
7.6.5 Admin algorithm ......................................................................................................... - 17 -
7.6.6 Create station ............................................................................................................. - 18 -
7.6.7 Create destination ....................................................................................................... - 18 -
7.7 FLOW CHARTS FOR ABOVE ALGORITHMS ........................................................................... - 18 -
7.7.1 Login for User and Administrator/ master ................................................................... - 18 -
7.7.2 Booking ...................................................................................................................... - 19 -
7.7.3 Purchase Ticket........................................................................................................... - 19 -
7.7.4 Delete Train ................................................................................................................ - 20 -
7.7.5 Create Train ............................................................................................................... - 21 -
7.8 DESIGN CLASS DIAGRAM .................................................................................................. - 22 -
7.9 DATABASE TABLE REPRESENTATION .................................................................................. - 22 -
7.9.1 Train table .................................................................................................................. - 22 -
7.9.2 Station table................................................................................................................ - 22 -
7.9.3 User table ................................................................................................................... - 23 -
7.9.4 Admin table ................................................................................................................ - 23 -
7.9.5 Destination table......................................................................................................... - 23 -
7.9.6 Booking table.............................................................................................................. - 24 -
8 IMPLEMENTATIONS ..................................................................................................... - 25 -
8.1 SYSTEM IMPLEMENTATIONS .............................................................................................. - 25 -
9 SYSTEM REQUIREMENT SPECIFICATIONS............................................................. - 26 -
9.1 SRS ................................................................................................................................. - 26 -
10 OUTPUT/RESULTS ..................................................................................................... - 27 -
11 TESTING ...................................................................................................................... - 28 -
11.1 SYSTEM TESTING .............................................................................................................. - 28 -
11.1.1 Unit Testing ............................................................................................................ - 28 -
11.1.2 System testing ......................................................................................................... - 28 -
11.1.3 User acceptance testing .......................................................................................... - 28 -
12 PROJECT TASK AND TIME SCHEDULE................................................................. - 29 -
12.1 PROJECT SCHEDULING ...................................................................................................... - 29 -
12.2 GANTT CHART .................................................................................................................. - 29 -
13 TEAM MEMBERS AND DIVIDED ROLES ............................................................... - 30 -
14 CONCLUSIONS ........................................................................................................... - 31 -
15 FUTURE UPDATES AND VERSIONING................................................................... - 32 -
15.1 INFORMATION PAGE FOR TRAINS AND ROUTES ................................................................... - 32 -
15.2 PNR CHECKING MECHANISM ............................................................................................ - 32 -
15.3 RAILWAY’S OWN PAYMENT SYSTEM .................................................................................. - 32 -
16 BIBLOGRAPHY AND REFERENCES ....................................................................... - 33 -

III
APPENDIX A ............................................................................................................................ - 34 -
LOGIN PAGE FOR USER AND ADMIN ........................................................................................... - 34 -
LOGIN RESPONSE IF USERNAME AND PASSWORD IS WRONG ........................................................ - 34 -
DASHBOARD SEEN BY USER ....................................................................................................... - 35 -
TICKET SEARCH BY USER .......................................................................................................... - 35 -
PAYMENT BY USER .................................................................................................................... - 36 -
ADMIN TRAIN REGISTRATION .................................................................................................... - 37 -
STATION REGISTRATION ............................................................................................................ - 37 -
DESTINATION AND FARE INPUT .................................................................................................. - 38 -
DATABASE SCHEMA DESIGN ...................................................................................................... - 38 -
BOOKING .................................................................................................................................. - 38 -
DESTINATIONS .......................................................................................................................... - 39 -
STATIONS .................................................................................................................................. - 39 -
TRAINS ..................................................................................................................................... - 39 -
USERS ...................................................................................................................................... - 39 -
APPENDIX B ............................................................................................................................ - 40 -
SOURCE CODE FOR USER ........................................................................................................... - 40 -
SOURCE CODE FOR USER ........................................................................................................... - 40 -

IV
1 INTRODUCTION
Railway transport is a means of conveyance of passengers and goods, by way of
wheeled vehicles running on rails (Wikipedia, 2019). It is also commonly referred to as
train transport. An electronic ticket (commonly abbreviated as e-ticket) is a digital
ticket. Electronic ticketing for railway public transport is usually referred to as travel
card or transit pass.

1.1 Problem Statement

People keep on travelling to their destination via local train by booking their seats using
existing system. Under existing system passengers were only provided with a list of
trains between two stations and train number. The train number is only an available
information by they can take an action of choosing the train. They were not able to get
information on their arrival, departure and the route by which particular train will travel.

Passenger were only able to select the seat number and not provided with seat type they
want to select and they sometimes not create a familiar environment during their
journey. During making payments final validation and authorization was one by system
to identify the particular passengers to make deduction for their fare charge to make
final reservation.

1.2 Project Overview

The Train Ticket Reservation System will enable the customer to buy and pay for train
ticket, ask for information online easily and even cancel a reservation. Customer can
buy the ticket over the Internet, 24 hours a day, 7 days a week and the ticket can't be
lost, stolen or left behind. In addition, the online system lets the customers check the
availability of the

ticket, seat available and route before paying for the ticket. Furthermore, one can pay
in cash or pay directly from their bank account using their ATM (Credit card or Visa)
card details. Therefore, this project covers the design and implementation of a cloud-
based train reservation system.

-1-
1.3 Project Aim and Objectives

• Cloud based train ticketing system will help the passengers to book their tickets
for their journey, search train between two stations and get details of particular
train schedules including their fare details after they are successfully logged in .
• The main objective of this login module is to keep each passenger safe which will
not be allowed to make fraud and make their transactions secure.
• After making registration passengers have to enter the source and destination
station name and the system will able to provide the list of all available trains for
particular destination and their arrival and departure time and date.
• Upon selecting particular train, system will able to display the number of seats
available under particular coach type and coach will be either sleeper class, three
tier or two tiers.
• To book their tickets passengers have to select coach type and total number of
passengers and passengers will be provided with choice to select the seat numbers
as per their location they want.
• When all the selection work will be done passengers will be provided with total
fare charges and mode of payment.

1.1 Scope and Limitation


1.1.1 Scope
• This project can help to reduce the number of employees of offline based ticketing
system.
• This can also help to decrease the workload of the employees by efficient cloud
computing technique.
• This project can also be the remedy for the eradication of tradition of standing on
queue to book ticket from the ticketing station.
• This also facilitates the user to know about their seat location, compartment, time
of departure easily.

1.1.2 Limitations
• The main limitation of this system is that it needs internet to register and book
ticket, in context of our country all people are not connected to the internet.
• If the ticket is to be cancelled, this system cannot return the payment on its own
system since the payment gateway is third party.

-2-
1.2 Significance of study

This system facilitates the passengers to enquire about the trains available on the basis
of source and destination, booking and cancellation of tickets, enquire about the status
of the booked ticket, etc. The aim of this study is to design and develop a system and
database maintaining the records of different trains, train status, and passengers. The
record of train includes its number, name, source, destination, and days on which it is
available, whereas record of train status includes dates for which tickets can be booked,
total number of seats available, and number of seats already booked. The database has
been developed and tested on the MySQL.

Cloud Based Ticket Ticketing System enables the customer to buy bus ticket, and ask
for information online easily. Furthermore, staff can sell train ticket using Cloud Based
Train Ticketing System after check bus ticket availability for the customer and print the
train ticket to the customer that queue up in the counter.

-3-
2 METHODOLOGY
Methodology describes the procedures, tools, techniques that were employed to achieve
the specific objectives of the train reservation system.

2.1 2.1 Software Development Life Cycle:

The development of the System was based on the model on Fig known as the waterfall
model. It involved requirement determination, requirement analysis, system design,
implementation, testing and validation. This approach below describes the sequence of
steps involved.

Requirement Determination

Requirement Analysis

System Design

Implementation

Testing and validation

Figure 1: The System Study and Design Model


It can be defined as a process of investigation of a real or planned system to determine
the function of the system, identify the problems of the system, analyzing and
synthesizing the various factors and determining a satisfactory solution. The purpose
of this analysis is for an analyst to look carefully into the manual system and automate
it into computerized system. This was carried out on the existing system. It helped to
show the weaknesses of the existing system.

-4-
2.2 Requirement Determination

This is the initial step of the development of the train ticketing system. In this phase all
the requirements for development of project are collected and recorded in a well-
defined manner.

2.3 Requirement Analysis


This is the second step and after determination of requirements, analysis of the
requirements are carried out in an efficient way.
2.4 System Design
The ticketing system is designed with the necessary tools and all the coding and
designing task is completed in this step.
2.5 Implementation
The designed and developed system needs to be implemented and deployed on the
cloud. This phase deals with implementation and deployment of the project.
2.6 Testing and Validation
The application we developed and designed is used by users. Frequent usage by
number of users may lead to crash the application by any means. After the successful
implementation and deployment of the project it needs to be tested and well-validated.
2.7 Technology Used

The technology used to build this project is

• Java/ Servlets for overall system development.


• JSP for ambient design and strong scripting technology.
• HTML to design the skeleton of the web application.
• CSS for adding charismatic look and designing the application.
• MySQL to store all the data required for users as well as administrator and trains.
• Bootstrap for designing the templates and box view.
• jQuery to easily manipulate the query like retrieving data etc.
• JavaScript as a backend scripting.

-5-
2.8 MySQL as Relational Database

• Scalability and flexibility.


• High Performance.
• High Availability.
• Storing data Protection.
• Lowest total cost of ownership.

2.9 Required Tools To be used

Tools Use

Eclipse IDE For Java, Servlets, JSP

Xampp Server For Apache MySQL

Tomcat Server For running the project

Table 1: Tools used for Development of application

3 LITERATURE REVIEW
3.1 Introduction

Today’s era has been the age of development of knowledge, skills, inventions as well
as different technologies which supports and enhance the standards of human’s livings.

-6-
Technologies with internet have their impacts in today’s digital world. This digitalized
world is changing day by day in order to facilitate many users with its numerous and
efficient potential in least amount of time. Transportation industries seems to appreciate
such rapid development. The Online Train Ticket Reservation System is an online application
that permits users check transport ticket accessibility, purchase transport ticket and pay the
transport ticket on the internet, which eradicate many problems faced by people during offline
ticketing system.

Where reservation of ticket is compulsory and this is very difficult as it consume much
time during the process of ticketing by visiting station when needed. But when this
ticketing system is made available in cloud it became more effective.

3.2 Nepal Railway Corporation

The Nepal Railways Corporation Ltd. is a state-owned company which operates


railways in Nepal. It maintains and operates two railway lines in the country. The Nepal
Government Railway remained in service till 1965 when the construction of the
highway linking the southern border made it redundant. The railway was closed down
1965 subsequently.

The government is preparing to revive the Nepal Railway Company (NRC) with a view
to start offering railways services in Nepal. The NRC used to earlier operate the
Janakpur-Jayanagar railways.

The Department of Railways (DoRW) has started the process to revive the government-
owned entity that had been inactive since 2014 and has already amended the existing
bylaws for the purpose.

According to him, the department has revised the existing laws and also the
organizational structure of Nepal Railway Company.

“Previously, there was only one railway system in the country, but now the scenario
has changed, with the government all set to build many railway services of different
nature across the country.”

The Nepal-India cross-border Janakpur-Jayanagar Railway — the only railway service


of the country — halted its services in 2014. However, both the Nepali and Indian
governments had earlier agreed to reconstruct and resume the service. It will resume its
services after the completion of the reconstruction works.

-7-
The final test operation of the 35-kilometre-long Janakpur-Jayanagar railway was
conducted successfully in November last year, but due to the delay in the railway
carriage procurement process, the DoRW has yet to formally start operating the service.

The government has also started construction of the Bardibas-Nijgadh railway service,
which is about to be completed and will start operations from next year.

(A version of this article appears in print on April 26, 2019 of The Himalayan Times.)

3.3 Comparison of Current System with Proposed System


3.3.1 Description of The Current System
The current system is based on manual system. staff at the bus ticket counter is using
an internal system to sell ticket at the counter. Customers are unable to buy bus ticket
online at this moment and has to go to the counter to buy train ticket. Sometimes,
customer needs to queue up a long queue to buy bus ticket and ask for information.
Besides that, customer is also not allowed buying tickets through telephone and
Transnational’s telephone line is always busy. This brings a lot of inconvenience to the
customers.

3.3.2 Description of The Proposed System

The system is very simple in design and to implement. The system requires very low
system resources and the system will work in almost all configurations. It has got
following features:

• It will ensure data accuracy.


• Records will be efficiently maintained by RDBMS.
• Availability of seats can be enquired easily.
• Minimum time needed for the various processing.
• It will provide better Service.

3.3.3 Architecture of The Proposed System

This process supports existing infrastructure requirements and provides specific


recommendations for hardware and network solutions based on existing and projected
user needs. Application requirements, data resources, and people within an organization
are all important in determining the optimum hardware solution. It is represented using
a three-tier architecture that comprises of user interface, process management and

-8-
Database Management System (RDBMS). It shows the components of the system, the
services they provide and the way they communicate to bring about the system
functionality.

3.4 Online Booking/Reservation.

The widespread use of Internet has led to the emergence of a variety of electronic
services as also known by e-services (e.g. e-ticket, e-payment, e-commerce, e-learning
etc.). Electronic ticket, or e-ticket, is an example of such category of e-services. Users
can get the e-tickets by purchasing them from a web server, or simply receiving from a
vendor, or from another user who previously acquired them. E-tickets can be stored in
desktop computers, smart phones or personal digital assistants for future use. For some
cases, E-tickets are non-transferable example airline e-ticket, it has to be validated to
prevent duplication, and ensure authenticity and integrity. A user first has to relay it to
server for validation before using it.

3.5 Reservation Information Systems

The cloud-based reservations system was one of the earliest changes to improve
efficiency in the transport industry. Transport Reservation System eventually evolved
into the computer reservations system (CRS). Train Reservations System (TRS) is a
computerized system used to store and retrieve information and conduct transactions
related to train travel.

3.6 Components used in Reservation Information Systems

These are complete Information Technology subsystems that make the reservation
Information System operational; they are compatible in nature and the failure of one
component may affect the operation of the others with in the system. They consist of
computer resources, data, people, and procedures used in the modern transport
companies.

3.6.1 Hardware

This is defined as individual physical devices and material used in information


processing. Specifically, it includes not only machines like computers but also data

-9-
media i.e. all tangible objects on which data are recorded from sheets of paper to disks.
Others include keyboards, mouse, printers, scanners etc.

3.6.2 Software

Software includes all sets of information processing instructions and it comprises of


different types of programs that enable the hardware to carryout different tasks.
Software is further categorized into system software and Applications software. System
software is concerned with keeping the computer system working while Application
software is the general purpose or written for a specific task like stock control. It may
be written using a programming language or more general-purpose piece of software
such as database.

3.6.3 Data
According to (Wikipedia,2019), Data (singular datum) are individual units
of information. Clearly no database system can exist without data. The basic factor
upon an organization processing and information needs are founded. Data elements and
relationships must be precisely defined and the definitions must be accurately recorded
in the data dictionary.

3.6.4 People

These are required for the operation of all information systems. They include end-users
and information system specialists. End-users are people who use an Information
System. The reservation information system specialists help in the development and
operation of information system. They include system analysts, programmers,
computer operators and others. People, are probably the component that most influence
the success or failure of information systems

3.6.5 Procedures

These are set of instruction about how to combine the above components in order to
process the information and generate the desired output. They consist of the way how
to log on to the RDBMS, use of different forms and manipulations throughout the
project.

- 10 -
3.6.6 Database

Database is a collection of non-redundant data, which can be shared by different


application systems Wells (2002). Or database is a collection of data as well as
programs required to manage that data. Before the advent of computers, this was written
in books or registers; these could be considered as manual‟ databases. Ever since
computers were introduced as a means of sorting data, the concept and structure of a
database have undergone a change. Database creation and maintenance is a gradual and
continuous procedure being influenced by system software such as database
management systems. Database users state their requirements to the database using the
data definition languages (DDL) and the data manipulation languages (DML) via the
database management systems.

3.7 Types of Reservations in Reservation System


3.7.1 Guaranteed Reservation:
This insures that the company will hold an item for the customer until a specific
time following the customer’s scheduled date. In return, the customer shall
guarantee his/her reservation of an item unless reservation is properly canceled.
In order to guarantee a reservation, customers might opt for one of the following
methods.

• Prepayment guaranteed reservation

• Credit card guaranteed reservation.

• Advance deposit or partial payment

• Travel agent guaranteed reservation

3.7.2 Non-guaranteed Reservation


Insures that the company agrees to hold an item for the customer until a stated
reservation cancellation hour on that day. A reservation agent always makes sure to
encourage their customers to guarantee their reservations especially in the high season.

However, the ticket reservation system we intended will use the guaranteed
Reservation. Where reservations are guaranteed only when a customer make payment
on the site or at the train station.

- 11 -
4 SYSTEM ANALYSIS
It can be defined as a process of investigation of a real or planned system to determine
the function of the system, identify the problems of the system, analyzing and
synthesizing the various factors and determining a satisfactory solution. The purpose
of this analysis is for an analyst to look carefully into the manual system and automate
it into computerized system. This was carried out on the existing system. It helped to
show the weaknesses of the existing system. The researched various methods to collect
information about the current system as shown below.

- 12 -
4.1 Oral Interviews

These were carried out on some customers and staff of the Nepal Railway Corporation
(NRC). These were about how customers book/board the train, how customer data and
information is stored and how trips are scheduled and management is done.

This method had the following advantages;

• We were exposed to firsthand information from the current administrators of the


current system; this helped us to get the feel of the current system.
• We were able to ask follow up questions and this helped us to gain more insight
into the current system.

4.2 Study of the Manual system

Existing boarding and booking system formats were studied and some of the important
features were taken note of and were applied in the implementation of the cloud-based
ticketing system.

5 REQUIREMENT ANALYSIS
The primary goal of this phase was to create a detailed Functional Specification
defining the full set of system capabilities to be implemented.

It involved examination of the collected data. Models such as Data Flow Diagrams
(DFD) and Entity Relationship Diagrams (ERD‟s) were used to model individual
processes and data respectively. Here requirements were classified as functional and
non-functional requirements, the determination and analysis of requirements helped the
us to achieve the second objective.

5.1 Functional Requirements

The following requirements were captured for the intended use of the system.

- 13 -
• User account: The registered user can directly book /reserve the available seats of
train and if there is a new user he/she may register to sees the train details.
• Creation of new user account: When there is a new customer he/she should fill
the form containing field like Username, First name, Last name, phone no. and
Password, Address and Email.
• Checking Availability: To check the available train the user should choose the
origin station and destination station, as well as date of journey.
• Reservation of Seat: After providing all information the system will ask user for
confirmation. After confirming the information, the seats get reserved.
• Canceling of Ticket: To cancel reservation the customer should log into his/her
account and can simply cancel the reservation.

5.2 Non-functional requirements

The application was designed to fulfill the following non-functional requirements.

• Performance Requirements: Performance of the system is dependent on the


bandwidth of the internet and also the hardware itself.
• Security Requirements: There is only one authorized person who can see the
confidential Information. The information of the customer is only available for the
administrator.
• Software Quality Attributes: The system is very user friendly, interoperable and
flexible such that a simple operator can use the application.

6 SYSTEM DESIGN
The ticketing system is designed with the necessary tools and all the coding and
designing task is completed in this step. This shows the application of system theory to
product development by defining the architecture, components, modules, interfaces and
data for a system to satisfy specified requirements. The goal of design phase was not
just to produce a design for the system; instead it was to find the best possible design
within the limitations imposed by the requirements and the physical as well as the social
development in which the system was to operate. The system design process was
divided into logical, conceptual and physical design.

- 14 -
6.1 Logical design

The logical model of the system was developed indicating all the vital steps the system
development went through. Here, we used case tools like flow charts and data flow
diagrams. Conceptual design was a description of the proposed system in terms of a set
of integrated ideas and concepts about what it should do, behave, and look like, that
was understandable by the users in the manner intended.

6.2 Conceptual design:

This was a description of the proposed system in terms of a set of integrated ideas and
concepts about what it should do, behave, and look like, that will be understandable by
the users in the manner intended. The process begun with identifying the entities
required by the users and then identifying all the important relationships that exist
between the entities.

6.3 Physical design

It was the physical realization of logical design. Tables, forms and reports were created
and relationships defined among these tables and security constrains set during the
physical design we translated the expected schemas into actual database structures.

• Entities to tables

• Relationship to foreign key constraints

• Attributes to columns

• Primary unique identifiers to primary key constraints

• Unique identifiers to unique key constraints

• Attributes to columns.

6.4 Use Case Diagram

Use case diagram visually represents what happens when a user interacts with a system;
it captures the functional aspects of a system.

- 15 -
Figure 2: Use Case Diagram for Admin and User
6.5 Use Case: System Users

• Administrator: This is the person charged with responsibility of updating


system content
• Customer (Registered user): The person who accesses the system from the
user point of view.

6.6 Algorithms for all entities


6.6.1 User login algorithm
If (username==username in database && password==password in database)

Login successful (“go to dashboard”);

else

Login unsuccessful (“re-enter un & pw”);

- 16 -
6.6.2 Purchase ticket algorithm

Select the required information from the dropdown and search the ticket availability.

If (ticket is available)

Pay the bill and confirm ticket

else

Select for the next date and time.

6.6.3 3.Available algorithm:

Fetch the bookendI from database with coach_type, time,train_Id,date,station_from


and stationTo.

If (bookingId is associated with to any user)

Search another date with same details

else

Change the coach_type and search with same details

6.6.4 Cancelation & rescheduling

If a booking is done by user he/she wants to cancel.

If (booking_Id is associated with current user)

Cancel it.

else

No booking_id is associated to book it.

6.6.5 Admin algorithm

If (un=username && pw=password)

Login successful (“go to dashboard);

else

Login unsuccessful (“re-enter un & pw”);

Create train

Input traincode, name, coachtype, total_seat_capacityof the trains to be saved

- 17 -
Click save.

6.6.6 Create station

Input name ,contact and address of the train station

Click save

Delete train

Choose the train to be deleted

Hit delete button

6.6.7 Create destination

Select the train, station_from and station_to it runs

Fill all the info like time, station_to, unit_fare, total_seat_capacity, seat_range it has

Save all

To add new, simply tap add new.

6.7 Flow Charts for Above Algorithms


6.7.1 Login for User and Administrator/ master

- 18 -
6.7.2 Booking

6.7.3 Purchase Ticket

- 19 -
6.7.4 Delete Train

- 20 -
6.7.5 Create Train

- 21 -
6.8 Design Class Diagram

Figure 3: Class Design Class Diagram

6.9 Database Table Representation


6.9.1 Train table
Field Name Type Size
Id Int 10
Code Varchar 30
Name Varchar 50
Total seat Int 5
Type Varchar 50
Table 2: Train Table

6.9.2 Station table


Field Name Type Size
Id Int 30
Name Varchar 50
Address Varchar 70
Contact Varchar 20
Table 3: Station Table

- 22 -
6.9.3 User table
Field Name Type Size
Id Int 30
Name Varchar 150
Phone Varchar 13
Address Varchar 200
Password Varchar 150
Rule Varchar 10
Reg_date Datetime
Last_activity Datetime
Table 4: User Table
6.9.4 Admin table
Field Name Type Size
Id Int 30
Name Varchar 150
Phone Varchar 13
Address Varchar 200
Password Varchar 150
Rule Varchar 10
Reg_date Datetime
Last_activity Datetime
Table 5: Admin Table
6.9.5 Destination table
Field Name Type Size
Id Int 100
Station_from Int 20
Station_to Int 20
Train_id Varchar 20
Time Varchar 30
Status Varchar 20
Fare Varchar 5
Last_activity Datetime
Last_modify_by Int 30
Table 6: Destination Table

- 23 -
6.9.6 Booking table
Field Name Type Size
Id Int 150
Destination_id Int 50
Booking_date Varchar 30
Journey_date Varchar 30
Train_id Int 30
Seat_numbers Varchar 150
Passenger_id Int 50
Number_of_seat Int 5
Payment_status Varchar 10
Status Varchar 10
Note Varchar 250
Table 7: Booking Table

- 24 -
7 IMPLEMENTATIONS
7.1 System Implementations

The designed and developed system needs to be implemented and deployed on the
cloud. This phase deals with implementation and deployment of the project.

• The Cloud Base Train Ticketing System provides the following types of easy-
to-use, interactive, and intuitive graphical and telephonic interfaces.
• It provides an easy-to-use, intuitive Graphical User Interface (GUI) as part of
the Administrator’s working desktop environment.
• It also provides an interactive Graphical User Interface, on the World Wide Web
for the general users.

The system working scenario is as follows:

• The user should register himself/herself in order to proceed to book ticket


service.
• The user needs to input all the required particular details during the registration
process.
• Upon successful login, the user will be registered officially to the web service
and he can login using his username and password

- 25 -
8 SYSTEM REQUIREMENT SPECIFICATIONS
A software requirements specification (SRS) is a description of a software system to
be developed. It is modeled after business requirements specification (CONOPS), also
known as a stakeholder requirements specification.

8.1 SRS

SN COMPONENT REQUIREMENT

1 Operating System Linux, Windows NT, and Mac as well


as android.
2 Computer and Processor Minimum 1.5 GHz or faster x86 or
x64-bit processor

3 Memory
2 GB RAM for 32-bit
2 GB RAM for 64-bit

4 Internet Connectivity Yes

5 Server Space I Terabyte of storage space

6 RAM 10 GB of RAM

7 Browsers Windows Internet Explorer 8, 9, or 10


Mozilla Firefox 10.x+
Apple Safari 5 (Mac)
Google Chrome 17.x

8 Hardware acceleration Graphics hardware acceleration


requires DirectX10 graphics card

9 Monitor Resolution 1024 x 768 or Higher

Yes
10 Graphics

Table 8: System Requirements Specification

- 26 -
9 OUTPUT/RESULTS
The complete output of this application will help in the following:

• The complete output of this application will help in the following:


• Passengers doesn't have to stand on queue for tickets.
• It helps passengers to access and book tickets easily.
• It can be a safe way to payment a ticket.
• Passengers time can be saved.
• User seats can be secured from other users.
• The perfect timing of railway can avoid rushes and hurries.
• Passengers can plan their journey according to their will.
• It can be Hassel less and Stress-free method to book tickets

- 27 -
10 TESTING
The application we developed and designed is used by users. Frequent usage by number
of users may lead to crash the application by any means. After the successful
implementation and deployment of the project it needs to be tested and well-validated.

10.1 System Testing

This involved testing the system in order to correct errors or remove defects that arose.
This stage involved testing the source code to make sure that it produced the expected
and desired results when subjected to a set of predefined conditions. It was subdivided
into three major phases, that is,

• unit testing,
• system testing and
• user acceptance testing.

10.1.1 Unit Testing

Under unit testing, specific parts of the source code were tested. Emphasis was put on
the website-database connections to ensure that information sent by a user from the web
page form reaches the systems database.

10.1.2 System testing

System testing involved putting the entire software to test in order to find out whether
or not the functional requirements of the system had been efficiently and effectively
integrated and satisfied.

10.1.3 User acceptance testing

Finally, User acceptance testing was done; this was a key factor for the success of the
system performance. The system under consideration was tested for user acceptance by
constantly keeping in touch with the system users.

- 28 -
11 PROJECT TASK AND TIME SCHEDULE
11.1 Project Scheduling

We have planned this project according to the following schedule which is the analysis
part of the project.

START DATE END DATE PROJECT STATES AND OBJECTIVE

August 03 August 11 Project Proposal

August 12 August 30 Planning, thinking about ticketing system


and learning technology

October 1 October 11 Construct document, choose tools, and


environment

October 12 November15 Start designing and implementation

November 16 December 03 Developing, testing and enhancement


running with writing report

December 02 December 23 Final revision of the report and testing on


constructing levels

January 02 Project submission

Table 9: Project Scheduling

11.2 Gantt Chart

- 29 -
12 TEAM MEMBERS AND DIVIDED ROLES
We divide work among the team members as categorized below:

NAME ROLE RESPONSIBILITIES


Ashok Nath • Project Manager • Review and approve all
• System Developer project deliverables
• System/UI Designer • Day to day responsibility to
• End User keep project on track
Documentation • Define and execute
development requirement
• Develop documentation
• Test system interfaces

Pooja Bajagain • Database expert • Develop User-friendly


• Security Expert Interface
• System /UI Designer • Test system Interface
• End User • Define database scheme and
Documentation security issues
• Develop documentation

Richa Mishra • System/UI Designer • Define and execute


• Department Process development requirement
Expert • Participate in analysis,
• End User requirement, gathering and
Documentation preparation of specification
• Identify improvement
opportunities
• Develop Documentation

- 30 -
13 CONCLUSIONS
Before modern computing, the reservation system was done using manual means. This
means that a person about to travel had to spend a lot of unnecessary time waiting in
queues in order to book their tickets. The manual process of reservation was also prone
to human errors, which lead to a lot of dissatisfaction amongst travelers.

Nowadays competition is so fierce between transport industries that there are lot of
discounts and a lot of luxuries given to customers that will give an edge to that particular
industry. The online train reservation automates these processes of booking railways
tickets online, thus reducing the time wasted as well as the errors that are involved in
the manual process. People will argue that online reservation system are expensive, and
create unfair competition between industries that don’t use them.

From the research view, online train reservation is one the best innovation that has taken
place in the rail industry and those companies that have not yet embraced online
reservation system ought to lose out, they may sight additional costs, maintenance cost
and the cost of development as their drawbacks but business is more than any other
occupation, it is a continual dealing with the future; and continual calculation, an
instinctive exercise in foresight.

World Wide Web and the Internet is here and transport companies for the future will
seize this opportunity to develop online reservation systems and prosper.

- 31 -
14 FUTURE UPDATES AND VERSIONING
14.1 Information Page for Trains and Routes
For the better and efficient information to the users this project can be included with an
information page that may help users to know about trains and railways. The awareness
information can be listed and circulated through the page.

14.2 PNR Checking Mechanism


Most of the railways in other countries are acting upon this method to verify the
passengers, their date of journey, time and other important information of booking
through this method. This method can also be implemented in this project to help the
passengers easily and safely make transaction on the system.

14.3 Railway’s Own Payment System

Since fare is managed through the third party in this project that is credit card or
direct bank transfer. The dependency on the third party can be limited and less
efficient than the direct pay system. So, in order to make better and easier payment,
own payment system like load fund to the system by depositing in the banks or virtual
currency like wallets load can be implemented.

- 32 -
15 BIBLOGRAPHY AND REFERENCES
[1] “The Java 6 EE Tutorial -Servlet Lifecycle”
https://docs.oracle.com/javaee/6/tutorial/doc/bnafi.html[Accessed: 10-Oct -2019]

[2] “The Java 6 EE Tutorial -Java Server Pages Documents” [Online] Available :
https://docs.oracle.com/javaee/5/tutorial/doc/bnajo.html [Accessed: 31-Oct-2019]

[3] “The CSS Styling” [Online] https://www.w3schools.com/html/html_css.asp


[Accessed: 1 -Sept-2019]

[4]. “The HTML Introduction and Use”


https://www.w3schools.com/html/html_intro.asp [Online] [Accessed: 12-Sept-2019]
[5] “MYSQL 8.0 Reference Manual” [Online]
https://dev.mysql.com/doc/refman/8.0/en/ [Accessed on 15 Sept 2019]

[6] “Use Case Diagrams” [Accessed on 23 December 2019]

https://creately.com/diagram/example/ijo1loq62/Use%20Case%20Diagram%20Railw
ay%20Reservation [Accessed On 15 December 2019]

[7] MYSQL Connector JAR [Downloaded ]


https://www.mysql.com/products/connector/ [Accessed On 12 Oct 2019]

[8] GitHub repositories of Railway Ticketing System [Embedded]


https://github.com/topics/railway-management
[Accessed Till project Completion]
[9] Stack Overflow [Codes and Problems Troubleshooting]
https://stackoverflow.com/
[9] Map Interface In Java [Tutorials]
https://www.geeksforgeeks.org/map-interface-java-examples/

[10] Java Tutorials https://www.tutorialspoint.com/java/java_pdf_version.htm

- 33 -
APPENDIX A
Login Page for User and Admin

Figure 4: Login Page for Users and Admin


Login Response If Username and password is Wrong

Figure 5: Login response if username and password is wrong

- 34 -
Dashboard seen by User

Figure 6: Dashboard seen by user

Ticket Search by User

Figure 7:Ticket Search by User

- 35 -
Figure 8: Ticket Searching Process
Payment by User

Figure 9: Payment by user

- 36 -
Admin Train Registration

Figure 10:Admin Train Registration


Station Registration

Figure 11:Station registration

- 37 -
Destination and Fare Input

Figure 12: Destination Fare Details


Database Schema Design

Figure 13: Database Schema Design


Booking

Figure 14: Booking database

- 38 -
Destinations

Figure 15:Destination Database


Stations

Figure 16:Stations
Trains

Figure 17:Trains
Users

Figure 18:Users

- 39 -
APPENDIX B
Source Code for User
public class SignUpActoin extends HttpServlet {
private static final long serialVersionUID = 1L;
ArrayList<String> formData;
protected void doGet(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException {
response.setContentType("text/html");
PrintWriter out = response.getWriter();
format = new ArrayList<String>();
String name = request.getParameter("name");
String email = request.getParameter("email");
String password = request.getParameter("password");
out.println("<br>Name" + name);
out.println("<br>Email" + email);
out.println("<br>Passord" + password);
HttpSession session = request.getSession();
formData.add(name);
formData.add(email);
formData.add(password);
session.setAttribute("formData", formData );
out.println("<br> <a href='SessionTest '>View Session
Data</a>");
}
}

Source Code for User


public class Stations implements DatabaseModel {
String tableName;
public String id, name, contact, address;
Database db;
public Stations() {
id = name = contact= address = "";
db = new Database();
this.tableName = "stations";
}
public Station getStation(String staionId) {
Station station = new Station();
String sqlQuery = "SELECT * FROM "+this.GetTableName()+"
WHERE id='"+staionId+"'";
ResultSet result;
try {
result = this.db.statement.executeQuery(sqlQuery);
while(result.next()) {
station.name =
result.getString("name").toString();
station.id =
result.getString("id").toString();
station.address =
result.getString("address").toString();
station.contact =
result.getString("contact").toString();
}
} catch (SQLException e) {
e.printStackTrace();
} return station;}

- 40 -

You might also like