0% found this document useful (0 votes)
44 views

Industrial Training Report: C++: Railway Reservation System

Uploaded by

Hritik Garg
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)
44 views

Industrial Training Report: C++: Railway Reservation System

Uploaded by

Hritik Garg
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/ 36

INDUSTRIAL TRAINING REPORT

C++: RAILWAY RESERVATION SYSTEM

Submitted in partial fulfillment of the


Requirements for the award of
Degree of
Bachelor of Technology
In
Computer Science & Engineering
NNN

Submitted By
Name: _NIVEDITA DAS___
University Reg No.__10315210105____

Submitted to: DR. SURJEET DALAL


Associate professor

Department of Computer Science & Engineering


SRM UNIVERSITY DELHI-NCR, SONIPAT
HARYANA-131029

1
Department of Computer Science and Engineering
SRM UNIVERSITY DELHI-NCR
Plot No.39, Rajiv Gandhi Education City, P.S.Rai,
Sonepat, Haryana – 131029
http://www.srmuniversity.ac.in

DECLARATION

I hereby declare that the Industrial Training Report entitled ("Railway reservation system") is
an authentic record of my own work as requirements of Industrial Training during the period
from 15.6.2017 to 30.7.2016 for the award of degree of B.Tech. (Computer Science &
Engineering & Engineering), SRM University, Delhi-NCR, Haryana, under the guidance.

NIVEDITA DAS
10315210105
Date:

2
Department of Computer Science and Engineering
SRM UNIVERSITY DELHI-NCR
Plot No.39, Rajiv Gandhi Education City, P.S.Rai,
Sonepat, Haryana – 131029
http://www.srmuniversity.ac.in

CERTIFICATE

This is to certify that the project entitled “C++: Railway reservation system” submitted by
Nivedita Reg. No. 10315210105, to the Department of Computer Science & Engineering of
SRM University Delhi-NCR, Sonepat, Haryana, (India) in partial fulfillment of the
requirements for the award of the degree of Bachelor in Technology in Computer Science &
Engineering under the Faculty of Engineering is an authentic record of the work carried out
by her under my supervision. In my opinion, this work fulfills the requirement for which it
has been submitted. This project has not been submitted to any other University or Institution
for any other degree.

Dr. Surjeet Dalal


(Associate Professor)

Dr. Ajay Sharma


HOD CSE (UG)

3
4
Department of Computer Science and
Engineering
SRM UNIVERSITY DELHI-NCR
Plot No.39, Rajiv Gandhi Education City, P.S.Rai,
Sonepat, Haryana – 131029
http://www.srmuniversity.ac.in

ACKNOWLEDGEMENT

I would like to express my special thanks of gratitude to my teacher


Dr. Surjeet Dalal who gave me the golden opportunity to do this wonderful project on the
topic (Railway reservation system), which also helped me in doing a lot of Research and I
came to know about so many new things I am really thankful to them. Secondly I would
also like to thank my parents and friends who helped me a lot in finalizing this project within
the limited time frame.
I owe my deep gratitude to all who took keen interest on our project work and guided us all
along, till the completion of our project work by providing all the necessary information for
developing a good system

5
Table of Contents

S no. Topic Page no.

1 About the Industry 7

2 Introduction to project 8

 Objectives
 Purpose
 Scope
 Need of computerization
 Working

3 Tools & Technology Used 11


 History
 How to install
 Feature
 Applications

4 Snapshots 24

5 Results and Discussions 35

6 Conclusions and Future Scope 36

6
ABOUT THE INDUSTRY

J2K Infosys Computer Education Registered under the society act 1860. They are providing
quality concept based computer education at reasonable rates for the last 12 years. Thousands
of students have already trained professionally and made their successful career in the past
years.

The institute was established in year 2002 by Mr. Rajesh Sharma (Head of the Institute);
Aashish Sharma (Director of the Institute) is Post Graduate in Computers having vast
knowledge in the field of computer education.
Over the past few years the growth of the computer industry has been quite remarkable and
today it is the fastest growing industry, not just the students or housewives, even experienced
professional are helped greatly by upgrading themselves in J2K Infosys Computer Education.
This organization not only provides the platform to build up the bright professional career in
computer field but also provides the placement opportunities in reputed companies.

As Computer knowledge has become primary requirement for everyone, this Institute
provides best Quality Computer Education in most reasonable fee structure to all class of
people. Our motive is to make all class of people Computer literate and take all possible
advantages to make their future much brighter.

This Institute is run by professional teachers & not by businessmen and so far provided
computer education to thousands of students which have helped them in their career. They
prepare our students in such a way so that they can face the interview board with confidence.
The Institute's computer lab is equipped with Internet Broadband facility for the students.
 

7
Introduction to Project

This project is based on railway reservation system. Basically concerned with the reservation
and cancellation of railway tickets. The need of this system arouse because as is the known
fact that India has the largest railway network in the whole world and it is not possible to
handle such a large system manually.
By computerizing it became possible to overcome the limitations and make the system
operations more efficient.
The complexity in handling data and records of such a vast system got reduced and became
easier by computerizing the system.

Being more specific, this online railway reservation system can perform the basic functions
like reservation and cancellation.
The account contains comprehensive information of the user entered during the registration
and allows the user to access their past reservations, cancellations, enquire about trains and
train schedule, seat availability and make afresh reservations.
The user will also be able to update their account details. This includes adding and updating
of train, station, train routes and also managing the user and the passenger details.

6.1.1 1.2 Objectives of the Project


 .To provide some amount of automation in railway mangement.
 .To help railway system in making their business more efficient.
 . An added attraction for their potential customers.
 . It will also show the attitute of the management that they are aware to the newly
introduced technology and ready to adopt them.

1.3 Purpose of the project

Electronically handling of trains’s record to enhance the accuracy, flexibility, Reliability


and to remove the human’s error. To provide accurate information about the addition,
deletion and modified records.
To provide, efficient, accurate, reliable, fast, and robust structure that can handle any number
of passenger’s transactions.

8
1.4SCOPE OF THE PROJECT

This project on Railway Management System is the automation of registration process of


railway system. The system is able to provide much information like passenger’s information,
criminal’s, list of all passengers etc. The system also allows us to add records when a
passenger reserves a ticket.

For data storage and retrieval we use the file-handling facility of C++ Language. It enables us
to add any number of records in our database. But for intrinsic nature of file handling, the
retrieval process is slow when we search a particular record in the database, because record is
searched sequentially.

Need of Computerization
A few factors that direct us to develop a new system are given below -:
1) Faster System
2) Accuracy
3) Reliability
4) Informative
5) Reservations and cancellations from anywhere to any pla

9
WORKING
There are total 6 facilities available in this railway reservation system.

1. Book ticket
2. Cancellation
3. Rates of tickets
4. Train details
5. Update your ticket
6. Ticket status

1. BOOK TICKET
In this the person has to enter his/her details like name, age, train name, boarding
point, destination point. And also enter the type of seat required. Then it shows the
total bill and further payment option.

2. CANCELLATION
To cancel your reserved ticket you have first enter your whole details .then it ask for
your confirmation. And then it cancels it.

3. RATES OF TICKETS
In this it shows the rates of different kinds of seats. Only three options are there is this
system. One is AC first class and the other is first class sleeper, second class chair.

4. TRAIN DETAILS
In this total 4 types of trains are there. And subdivided further. Like in rajdhani trains
it shows various types of trains with their origin and destination.

5. UPDATE
Here you can update your reserved ticket. Only the age cannot be updated.

6. TICKET STATUS
Here you can check your status of the ticket if its b

10
Tools & Technology Used

C++ is a general-purpose programming language. It has imperative, object-


oriented and generic programming features, while also providing facilities for low-
level memory manipulation. It was designed with a bias toward system
programming and embedded, resource-constrained and large systems, with performance,
efficiency and flexibility of use as its design highlights.

 C++ has also been found useful in many other contexts, with key strengths being software
infrastructure and resource-constrained applications, including desktop applications, servers
(e.g. e-commerce, web search or SQL servers), and performance-critical applications
(e.g. telephone switches or space probes). C++ is a compiled language, with implementations
of it available on many platforms.

Many vendors provide C++ compilers, including the Free Software


Foundation, Microsoft, Intel, and IBM. C++ is standardized by the International Organization
for Standardization (ISO), with the latest standard version ratified and published by ISO in
December 2014 as ISO/IEC 14882:2014 (informally known as C++14).The C++
programming language was initially standardized in 1998 as ISO/IEC 14882:1998, which
was then amended by the C++03, ISO/IEC 14882:2003, standard.

The current C++14 standard supersedes these and C++11, with new features and an


enlarged standard library. Before the initial standardization in 1998, C++ was developed
by Bjarne Stroustrup at Bell Labs since 1979, as an extension of the C language as he wanted
an efficient and flexible language similar to C, which also provided high-level features for
program organization. The C++17 standard is due in July 2017, with the draft largely
implemented by some compilers already, and C++20 is the next planned standard thereafter.

11
History
Bjarne Stroustrup, the creator of C++ In 1979, Bjarne Stroustrup, a Danish computer
scientist, began work on "C with Classes", the predecessor to C++. The motivation for
creating a new language originated from Stroustrup's experience in programming for his
Ph.D. thesis. Stroustrup found that Simula had features that were very helpful for large
software development, but the language was too slow for practical use, while BCPL was fast
but too low-level to be suitable for large software development. When Stroustrup started
working in AT&T Bell Labs, he had the problem of analyzing the UNIX kernel with respect
to distributed computing. Remembering his Ph.D. experience, Stroustrup set out to enhance
the Clanguage with Simula-like features.

C was chosen because it was general-purpose, fast, portable and widely used. As well as C
and Simula's influences, other languages also influenced C++, including ALGOL
68, Ada, CLU and ML. Initially, Stroustrup's "C with Classes" added features to the C
compiler, Cpre, including classes, derived classes, strong typing, inlining and default
arguments.

In 1983, "C with Classes" was renamed to "C++" (++ being the increment operator in C),
adding new features that included virtual functions, function name and operator overloading,
references, constants, type-safe free-store memory allocation (new/delete), improved type
checking, and BCPL style single-line comments with two forward slashes (//). Furthermore, it
included the development of a standalone compiler for C++, Cfront.

In 1985, the first edition of The C++ Programming Language was released, which became
the definitive reference for the language, as there was not yet an official standard.[13] The
first commercial implementation of C++ was released in October of the same year.

In 1989, C++ 2.0 was released, followed by the updated second edition of The C++
Programming Language in 1991. New features in 2.0 included multiple inheritance, abstract
classes, static member functions, const member functions, and protected members. In
1990, The Annotated C++ Reference Manual was published. This work became the basis for
the future standard. Later feature additions included templates, exceptions, namespaces,
new casts, and a boolean type.

12
After the 2.0 update, C++ evolved relatively slowly until, in 2011, the C++11 standard was
released, adding numerous new features, enlarging the standard library further, and providing
more facilities to C++ programmers. After a minor C++14 update released in December
2014, various new additions are planned for July 2017 and 2020.
As of 2017, C++ remains the third most popular programming language, behind Java and C.

Etymology

According to Stroustrup: "the name signifies the evolutionary nature of the changes from
C". This name is credited to Rick Mascitti (mid-1983) and was first used in December 1983.
When Mascitti was questioned informally in 1992 about the naming, he indicated that it was
given in a tongue-in-cheek spirit. The name comes from C's +
+ operator (which increments the value of a variable) and a common naming convention of
using "+" to indicate an enhanced computer program.
During C++'s development period, the language had been referred to as "new C" and "C with
Classes" before acquiring its final name.

Language

The C++ language has two main components: a direct mapping of hardware features
provided primarily by the C subset and zero-overhead abstractions based on those mappings.
Stroustrup describes C++ as "a light-weight abstraction programming language [designed] for
building and using efficient and elegant abstractions" and "offering both hardware access and
abstraction is the basis of C++.

Doing it efficiently is what distinguishes it from other languages".C++ inherits most of C's
syntax. The following is Bjarne Stroustrup's version of the Hello world program that uses
the C++ Standard Library stream facility to

Write a message to standard output:


#include <iostream>

Int main ()
{
std::cout << "Hello, world! \n";
Return 0;
}
Within functions that define a non-void return type, failure to return a value before control
reaches the end of the function results in undefined behaviour (compilers typically provide
the means to issue a diagnostic in such a case). The sole exception to this rule is
the main function, which implicitly returns a value of zero.

13
Object storage

As in C, C++ supports four types of memory management: static storage


duration objects, thread storage duration objects, automatic storage duration
objects, and dynamic storage duration objects.

Static storage duration objects are created before main () is entered (see
exceptions below) and destroyed in reverse order of creation after main () exits.
The exact order of creation is not specified by the standard (though there are
some rules defined below) to allow implementations some freedom in how to
organize their implementation. More formally, objects of this type have a
lifespan that "shall last for the duration of the program".

Static storage duration objects are initialized in two phases. First, "static
initialization" is performed, and only after all static initialization is performed,
"dynamic initialization" is performed. In static initialization, all objects are first
initialized with zeros; after that, all objects that have a constant initialization
phase are initialized with the constant expression (i.e. variables initialized with
a literal or constexpr). Though it is not specified in the standard, the static
initialization phase can be completed at compile time and saved in the data
partition of the executable. Dynamic initialization involves all object
initialization done via a constructor or function call (unless the function is
marked with constexpr, in C++11). The dynamic initialization order is defined
as the order of declaration within the compilation unit (i.e. the same file). No
guarantees are provided about the order of initialization between compilation
units.

Thread storage duration objects


Variables of this type are very similar to static storage duration objects. The
main difference is the creation time is just prior to thread creation and
destruction is done after the thread has been joined.

14
C++ provides more than 35 operators, covering basic arithmetic, bit manipulation,
indirection, comparisons, logical operations and others. Almost all operators can
be overloaded for user-defined types, with a few notable exceptions such as member access
(. and.*) as well as the conditional operator. The rich set of overloadable operators is central
to making user-defined types in C++ seem like built-in types.

Overloadable operators are also an essential part of many advanced C++ programming
techniques, such as smart pointers. Overloading an operator does not change the precedence
of calculations involving the operator, nor does it change the number of operands that the
operator uses (any operand may however be ignored by the operator, though it will be
evaluated prior to execution). Overloaded "&&" and "||" operators lose their short-circuit
evaluation property

Templates in C++ provide a sophisticated mechanism for writing generic, polymorphic code
(i.e. parametric polymorphism). In particular, through the curiously recurring template
pattern, it's possible to implement a form of static polymorphism that closely mimics the
syntax for overriding virtual functions. Because C++ templates are type-aware and Turing-
complete, they can also be used to let the compiler resolve recursive conditionals and
generate substantial programs through template metaprogramming. Contrary to some
opinion, template code will not generate a bulk code after compilation with the proper
compiler settings.

15
How to Install C++ Editor
Installation of TC is very simple just download turbo C or C++ and run .exe files

When you install the Turbo C or C++ compiler on your system, then TC directory is
created on the hard disk and various sub directories such as INCLUDE, and LIB etc. are
created under TC.

Figure 1

 INCLUDE: Contain the header files of C and C++.


 LIB: Contain the library files of C and C++.
 BGI: Contain Graphics related files.
 BIN: Contain .exe, .ob. etc. files.

16
TC Editor
TC Editor is very simple and easy to use; here i will give you all tips related to TC Editor
and some shortcut keys related to TC Editor which is very useful at the time of coding.
Turbo C is a most common C language compiler. Below i will discuss all about its
Interfaces.

Figure 2

17
TC Editor
The interface of Turbo C is very simple. When IDE screen appears, the menu bar is
activated. It contains various menus such as;

 File: This menu contains group of commands used for save, edit, print program,
exit from Turbo C editor etc.
 Edit: This menu contains group of commands used for editing C program source
code. Example Copy, Cut, Paste, Undo etc.
 Search: This menu contains group of commands used for searching specific word
as well as replacing it with another one.
 Run: This menu contains group of commands used for running C program.
 Compile: This menu contains group of commands used for compiling C program.
 Debug: This menu contains group of commands used for debugging C program.
 Project: This menu contains group of commands used for opening, closing and
creating projects.
 Options: This menu contains group of commands used for configuring IDE of
Turbo C and setting up directories etc.
 Windows: This menu contains group of commands used for opening, closing
various windows of IDE.
 Help: This menu is used to get help about specific topic of C language. Similarly
to get help about a specific keyword or identifier of C.

Shortcut keys Related to TC Editor


 Alt + x: Close TC Editor.
 Clt + f9 : Run C Program.
 Alt + f9 : Compile C Code.
 Alt + Enter : Get Full Screen or Half Screen TC Editor.
 Clt + y : Delete complete above line of cursor.
 Shift + Right arrow : Select Line of Code.
 Clt + Insert : Copy.
 Shift + Insert : Paste.
 Shift + Delete : Delete.

18
Features of C++
C++ is object oriented programming language and it is a very simple and
easy language, this language have following features.

Figure 3

 Simple
 Portability
 Powerful
 Platform dependent
 Object oriented oriented
 Case sensitive
 Compiler based
 Syntax based language
 Use of Pointers

19
Simple
Every C++ program can be written in simple English language so that it is very easy to
understand and developed by programmer.

Platform dependent
A language is said to be platform dependent whenever the program is execute in the same
operating system where that was developed and compiled but not run and execute on other
operating system. C++ is platform dependent language.

Figure 4

Note: .obj file of C++ program is platform dependent

Portability

It is the concept of carrying the instruction from one system to another system. In C++
Language .cpp file contain source code, we can edit also this code. .exe file contain
application, only we can execute this file. When we write and compile any C++ program
on window operating system that program easily run on other window based system.

Figure 5

20
When we can copy .exe file to any other computer which contain window operating
system then it works properly, because the native code of application an operating system
is same.

Powerful
C++ is a very powerful programming language, it have a wide verity of data types,
functions, control statements, decision making statements, etc.

Object oriented Programming language


This main advantage of C++ is, it is object oriented programming language. It follow
concept of oops like polymorphism, inheritance, encapsulation, abstraction.

Case sensitive
C++ is a case sensitive programming language. In C++ programming 'break and BREAK'
both are different.

If any language treats lower case latter separately and upper case latter separately than
they can be called as case sensitive programming language [Example c, c++, java, .net are
sensitive programming languages.] other wise it is called as case insensitive programming
language [Example HTML, SQL is case insensitive programming languages].

Compiler based
C++ is a compiler based programming language that means without compilation no C++
program can be executed. First we need compiler to compile our program and then
execute.

21
Syntax based language
C++ is a strongly tight syntax based programming language. If any language follow rules
and regulation very strictly known as strongly tight syntax based language. Example C,
C++, Java, .net etc. If any language not follow rules and regulation very strictly known as
loosely tight syntax based language.
Example HTML.

Efficient use of pointers


Pointers is a variable which hold the address of another variable, pointer directly direct
access to memory address of any variable due to this performance of application is
improve. In C++ language also concept of pointer are available.

22
Applications of C++
Mainly C++ Language is used for Develop Desktop application and system software.
Some applications of C++ language are given below.

 For Develop Graphical related application like computer and mobile games.
 To evaluate any kind of mathematical equation use C++ language.
 C++ Language are also used for design OS. Like window xp.
 Google also use C++ for Indexing
 Few parts of apple OS X are written in C++ programming language.
 Internet browser Firefox are written in C++ programming language
 All major applications of adobe systems are developed in C++ programming
language. Like Photoshop, Image Ready, Illustrator and Adobe Premier.
 Some of the Google applications are also written in C++, including Google file
system and Google Chromium.
 C++ is used for design database like MySQL.

23
Snapshots

Screen layout: - Screen layout section describes the flow of all the Input and output window
along with its layout and its functionality.
These are the layouts if the entire project, which will help to know a bit more about this
project. Through these layouts the process of learning will become easy and anyone can
understand it in a better way.
A final step in system performance definition is describing the outputs required by the user.
An actual sketch of the format and contents of the reports (layout) are as follow from the next
page:

24
Figure 6

Figure 7

25
Figure 8

Figure 9

26
Figure 10

Figure 11

27
Figure 12

Figure 13

28
Figure 14

Figure 15

29
Figure 16

Figure 17

30
Figure 18

Figure 19

31
Figure 20

Figure 21

32
Figure 22

Figure 23

33
Figure 24

34
CONCLUSION

We can hereby conclude that:

 The system effectively automated the functions involved in the processes being handled
manually before.

 The cost & benefit analysis shows that the system was quite successful in saving costs for
the bank & generate equivalently huge benefits

 The system is secure & scalable. The system design has been done keeping user-
friendliness and efficiency in mind.

SCOPE OF THE PROJECT

Scope of this project is to replace the manual work of movie shop mgmt. system with the new
advanced computerized system. User does not need much training to use this software, as this
software is very user friendly and easy to use. It replaces all the paper work also. In this
software we can store thousands of records. It replaces all the calculation works also as it
automatically calculate and print the bill. Some main advantages are:-

 Customer numbers are generated automatically by system itself.

 If any invalid entry done by the users which is nature of human being but checks by the
machine so this software gives the error message to the users to indicate about the invalid
entry.

 While transfer of any customer such as incoming customer, it will update both the file and
incoming customer so that if we want to know number of incoming customer, it will be very
easily for us.

35
BIBLIOGRAPHY
REFRENCE BOOKS

E. Balagurusamy, Object Oriented Programming with C++, Tata McGraw-Hill Publishing


house, Copyright 1998.

The ‘C++’ Programming language by Kernighan & Ritchie, Prentice Hall Publishing house,
Copyright 1988.

Teach yourself C++ by Yashwant Kanetkar, BPb Publishing house edition-6th.

Software engineering, K.K. Aggrawal, new age international publisher.

WEB REFERENCES

www.c++programming.com/tutorial.html

www.cplusplus.com/doc/tutorial/

www.coronadoenterprises.com/tutorials/cpp/index.html/

36

You might also like