Sasirekha Computer Project

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 90

COMPUTER

PROJECT
2018-2019

NAME: R.SASIREKHA
CLASS: X
SECTION: A
INDEX

S.No TOPIC Pg.No


1. Introduction to java
2. History of java
3. Introduction to topic
4. Flowchart
5. Algorithm
6. Program
7. Output
8. Variables used
9. Conclusion to topic
10. Conclusion to java
11. Acknowledgement
12. Bibliography
Introduction

JAVA was developed by Sun Microsystems


Inc in 1991, later acquired by Oracle
Corporation. It was developed by James
Gosling and Patrick Naughton. It is a simple
programming language. Writing, compiling
and debugging a program is easy in java. It
helps to create modular programs and
reusable code.
Java terminology
Before we start learning Java, lets get
familiar with common java terms.
Java Virtual Machine (JVM)
This is generally referred as JVM. Phases
are as follows: we write the program, then
we compile the program and at last we run
the program.
1) Writing of the program is of course done
by java programmer like you and me.
2) Compilation of program is done by javac
compiler, javac is the primary java compiler
included in java development kit (JDK). It
takes java program as input and generates
java bytecode as output.
3) In third phase, JVM executes the
bytecode generated by compiler. This is
called program run phase.
So, now that we understood that the
primary function of JVM is to execute the
bytecode produced by compiler. Each
operating system has different JVM,
however the output they produce after
execution of bytecode is same across all
operating systems. That is why we call
java as platform independent language.
bytecode
As discussed above, javac compiler of JDK
compiles the java source code into bytecode
so that it can be executed by JVM. The
bytecode is saved in a .class file by
compiler.
Java Development Kit(JDK)
While explaining JVM and bytecode, I have
used the term JDK. Let’s discuss about it. As
the name suggests this is complete java
development kit that includes JRE (Java
Runtime Environment), compilers and
various tools like JavaDoc, Java debugger
etc.
In order to create, compile and run Java
program you would need JDK installed on
your computer.
Java Runtime Environment(JRE)
JRE is a part of JDK which means that JDK
includes JRE. When you have JRE installed
on your system, you can run a java program
however you won’t be able to compile it.
JRE includes JVM, browser plugins and
applets support. When you only need to run
a java program on your computer, you
would only need JRE.
These are the basic java terms that confuses
beginners in java. For complete java
glossary refer this link:
Main Features of JAVA
Java is a platform independent language
Compiler(javac) converts source code (.java
file) to the byte code(.class file). As
mentioned above, JVM executes the
bytecode produced by compiler. This byte
code can run on any platform such as
Windows, Linux, Mac OS etc. Which means a
program that is compiled on windows can
run on Linux and vice-versa. Each operating
system has different JVM, however the
output they produce after execution of
bytecode is same across all operating
systems. That is why we call java as
platform independent language.
Java is an Object Oriented language
Object oriented programming is a way of
organizing programs as collection of
objects, each of which represents an
instance of a class.
4 main concepts of Object Oriented
programming are:
1. Abstraction
2. Encapsulation
3. Inheritance
4. Polymorphism

Simple
Java is considered as one of simple language
because it does not have complex features
like Operator overloading, Multiple
inheritance, pointers and Explicit memory
allocation.
Robust Language
Robust means reliable. Java programming
language is developed in a way that puts a
lot of emphasis on early checking for
possible errors, that’s why java compiler is
able to detect errors that are not easy to
detect in other programming languages.
The main features of java that makes it
robust are garbage collection, Exception
Handling and memory allocation.
Secure
We don’t have pointers and we cannot
access out of bound arrays (you get
ArrayIndexOutOfBoundsException if you
try to do so) in java. That’s why several
security flaws like stack corruption or
buffer overflow is impossible to exploit in
Java.
Java is distributed
Using java programming language we can
create distributed applications.
RMI(Remote Method Invocation) and
EJB(Enterprise Java Beans) are used for
creating distributed applications in java. In
simple words: The java programs can be
distributed on more than one systems that
are connected to each other using internet
connection. Objects on one JVM (java virtual
machine) can execute procedures on a
remote JVM.
Multithreading
Java supports multithreading.
Multithreading is a Java feature that allows
concurrent execution of two or more parts
of a program for maximum utilisation of
CPU.
Portable
As discussed above, java code that is
written on one machine can run on another
machine. The platform independent byte
code can be carried to any platform for
execution that makes java code portable.
INTRODUCTION TO RAILWAY RESERVATION
Indian Railways requires reservations on all
classes of travel except general class. There
are a few ways you can go about making a
reservation -- online, or in person at a travel
agency or Indian Railways booking counter

The Indian Railways (IR) carries about 5.5


lakhs passengers in reserved
accomodation every day.The
Computerised Passenger Reservation
System(PRS) facilates the booking and
cancellation of tickets from any of the
4000 terminals(i.e. PRS bookin window all
over the countries). These tickets can be
booked or cancelled for journeys
commencin in any part of India and
ending in any other part, with travel time
as long as 72hours and distance upto
several thousand kilometers. The
project of PRS was launched on 15th
November 1985, over Northern Railway
with the installation of Integrated
Multiple Train Passenger Reservation
System(IMPRESS), an online transaction
processing system developed by Indian
Railways in association with Computer
Maintenance Corporation Ltd., at New
Delhi. The objective was to provide
reserved accomodations on any train
from any counter,preparation of train
charts and accounting of the money
collected. The application was
implemented in 1987
Mumbai,Chennai,Kolkata,Secunderabad
subsequently.

RAILWAY RESERVATION METHODS

COUNTER BOOKING: This is the oldest


method of booking the tickets. The
reservation counters are there at
railway department from where people
can get the tickets to their respective
destinations.

Railway passengers frequently need to


know about their ticket reservation
status, ticket availability on a particular
train or for a place,train arrival or
departure details, special trains etc..
Customer information centers at the
railway stations are unable to serve
such queries at peak periods. The
number of the reservation counters
available to the passengers and
customers are very less. On most of the
reservation systems there are long
queues, so it takes a long time for any
individual to book the ticket. As now
there are no call centers facilities
available to solve the queries of the
passengers.
ANALYSIS

In Online Railway Reservation


System,for booking the tickets online
the intended user has to enter details
like username and password. Once the
username and passwords are verified
then he is allowed to enter the main
system wherein he can select the
destination, date and no of tickets. For
the purchase of the tickets he is asked
for payment details (like credit card
details etc). The user is also provided
with a provision of canceling the
reservation where in the entire amount
is credited back to his account. The
analysis part also comprises of the UML
diagrams that boost the program.
History of Java

James Gosling, Mike Sheridan,


and Patrick Naughton initiated the Java
language project in June 1991. Java was
originally designed for interactive
television, but it was too advanced for
the digital cable television industry at
the time. The language was initially
called Oak after an oak tree that stood
outside Gosling's office. Later the project
went by the name Greenand was finally
renamed Java, from Java coffee. Gosling
designed Java with a C/C++-style syntax
that system and application
programmers would find familiar.
Sun Microsystems released the first
public implementation as Java 1.0 in
1996. It promised "Write Once, Run
Anywhere" (WORA), providing no-cost
run-times on popular platforms. Fairly
secure and featuring configurable
security, it allowed network- and file-
access restrictions. Major web
browsers soon incorporated the ability
to run Java applets within web pages,
and Java quickly became popular. The
Java 1.0 compiler was re-written in
Java by Arthur van Hoff to comply
strictly with the Java 1.0 language
specification.[32] With the advent of Java
2(released initially as J2SE 1.2 in
December 1998 – 1999), new versions
had multiple configurations built for
different types of
platforms. J2EE included technologies
and APIs for enterprise applications
typically run in server environments,
while J2ME featured APIs optimized for
mobile applications. The desktop
version was renamed J2SE. In 2006, for
marketing purposes, Sun renamed
new J2 versions as Java EE, Java ME,
and Java SE, respectively.
In 1997, Sun Microsystems approached
the ISO/IEC JTC 1 standards body and
later the Ecma International to
formalize Java, but it soon withdrew
from the process. Java remains a de
facto standard, controlled through
the Java Community Process. Sun
generated revenue from Java through
the selling of licenses for specialized
products such as the Java Enterprise
System.
On November 13, 2006, Sun released
much of its Java virtual machine (JVM)
as free and open-source software,
(FOSS), under the terms of the GNU
General Public License (GPL). On May 8,
2007, Sun finished the process, making
all of its JVM's core code available
under free software/open-source
distribution terms, aside from a small
portion of code to which Sun did not
hold the copyright.
Sun's vice-president Rich Green said
that Sun's ideal role with regard to Java
was as an "evangelist". Following Oracle
Corporation's acquisition of Sun
Microsystems in 2009–10, Oracle has
described itself as the "steward of Java
technology with a relentless
commitment to fostering a community
of participation and transparency".This
did not prevent Oracle from filing a
lawsuit against Google shortly after that
for using Java inside the Android SDK .
On April 2, 2010, James Gosling resigned
from Oracle.
In January 2016, Oracle announced that
Java runtime environments based on
JDK 9 will discontinue the browser
plugin.
PROGRAM
import java.io.*;
class Train_Reservation
{
public static void main(String
args[])throws IOException
{
DataInputStream in=new
DataInputStream(System.in);
{
System.out.print(“***WELCOME TO
CHENNAI STATION***”);
System.out.println();
System.out.println(“Chennai is a
city in the state of Tamil Nadu,
located in the region of India.
Chennai Central, erstwhile Madras
Central, is the main railway
terminus in the city
of Chennai, Tamil Nadu, India.It
is one of the most important hubs
in the South. It is connected
to Moore Market Complex railway
station and Chennai Park railway
station, and is adjacent
to Chennai Egmore railway station.
Chennai Central connects the city
to all northern cities of India,
including Kolkata, Mumbai and New
Delhi.
The 142-year-old building of the
railway station, one of the most
prominent landmarks of Chennai,
was designed by architect George
Harding.[6] The station is also a
main hub for the Chennai Suburban
Railway system. It lies adjacent
to the current headquarters of
the Southern Railway and the Ripon
Building. During the British Raj,
the station served as the gateway
to South India, and the station is
still used as a landmark for the
city and the state.
About 350,000 passengers use the
terminus every day.[7] Chennai
Egmore, Coimbatore
Junction and Chennai Central are
the most profitable stations of
Southern Railways.[8] As per a
report published in 2007 by
the Indian Railways, Chennai
Central and Secunderabad were
awarded 183 points out of a
maximum of 300 for cleanliness,
the highest in the country.
Total 269 passenger trains
Start/End/PassThrough Chennai
Central. Total 644 Stations are
directly connected to Chennai
Central via these 269 passenger
trains.
”);

System.out.println(“MENU:”);
System.out.println(“
1.TICKET RESERVATION
2.PLATFORM TICKET
3.EXIT”);
System.out.println(“ENTER YOUR
CHOICE:”);
int c=Integer.parseInt
(in.readLine());

switch(c)
{

case 1:
System.out.println();
System.out.println(“**TRAIN TICKET
RESERVATION COUNTER***”);
System.out.println();
System.out.println(“ENTER NUMBER
OF PERSONS:”);
int p=Integer.parseInt
(in.readLine());

int age=0;
int reservationnum=0;

for(int i=0;i<p;i++)
{
System.out.println(“ENTER THE
NAME:”);
String people=in.readLine();

System.out.println(“ENTER THE
AGE:”);
age=Integer.parseInt(in.readLine());

System.out.println(“GENDER OF THE
PERSON:”);
String gender=in.readLine();
}
System.out.println(“START
STATION:”);
String sstation=in.readLine();

System.out.println(“DESTINATION
STATION:”);

String dstation=in.readLine();

System.out.println();

System.out.println(“***TRAIN
NAME:***”);

System.out.println();

System.out.println(“1.COIMBATORE
EXPRESS”);

System.out.println();
System.out.println(“DETAILS:”);
System.out.println(“Train no 12679
is a train running between Chennai
and Coimbatore. Chennai is located
in the state of Tamil Nadu and
Coimbatore is located in the state
of Tamil Nadu. The two cities are
located at a distance of 497km.
The train leaves Chennai at 14:30
on day-1 and reaches Coimbatore at
22:15 on day-1. It takes 7Hrs
45Mins to reach from its source to
the destination some of the major
stations that the train passes
through on its way are KATPADI
JUNCTION,SALEM JUNCTION and
TIRUPPUR. In a week, Coimbatore
Express operates on Monday,
Tuesday Wednesday,
Thursday,Friday,Saturday and
Sunday.
It offers facilities like
pantry.”);

System.out.println(“2.HYDERABAD
EXPRESS”);

System.out.println();
System.out.println(“DETAILS:”);
System.out.println(“Train no 12603
is a train running between Chennai
and Hyderabad. Chennai is located
in the state of Tamil Nadu and
Hyderabad is located in the state
of Telangana. The two cities are
located at a distance of 715km.
The train leaves Chennai at 16:45
on day-1 and reaches Hyderabad at
05:45 on day-2. It takes 13Hrs to
reach from its source to the
destination some of the major
stations that the train passes
through on its way are
SECUNDERABAD
JUNCTION, and HYDERABAD DECCAN. In
a week, Hyderabad Express operates
on Monday, Tuesday Wednesday,
Thursday,Friday,Saturday and
Sunday.”);

System.out.println(“3.SHATABDI
EXPRESS”);

System.out.println();
System.out.println(“DETAILS:”);
System.out.println(“Train no 12007
is a train running between Chennai
and Mysore. Chennai is located in
the state of Tamil Nadu and Mysore
is located in the state of
Karnataka. The two cities are
located at a distance of 500km.
The train leaves Chennai at 6:00
on day-1 and reaches Mysore at
13:00 on day-1. It takes 7Hrs to
reach from its source to the
destination some of the major
stations that the train passes
through on its way are BANGALORE
CY JUNCTION and MYSORE JUNCTION.
In a week, Shatabdi Express
operates on Monday,Tuesday
,Thursday,Friday,Saturday and
Sunday.
It offers facilities like
pantry,free over ride and food
choice”);

System.out.println(“4.TIRUPATHI
EXPRESS”);

System.out.println();
System.out.println(“DETAILS:”);
System.out.println(“Train no 16053
is a train running between Chennai
and Tirupathi. Chennai is located
in the state of Tamil Nadu and
Tirupathi is located in the state
of Andhra Pradesh. The two cities
are located at a distance of
151km. The train leaves Chennai at
14:10 on day-1 and reaches
Tirupathi at 17:40 on day-1. It
takes 3Hrs 30Mins to reach from
its source to the destination some
of the major stations that the
train passes through on its way is
Tirupathi. In a week, Tirupathi
Express operates on Monday,Tuesday
,Thursday,Friday,Saturday and
Sunday.”);

System.out.println(“5.MUMBAI
EXPRESS”);

System.out.println();
System.out.println(“DETAILS:”);
System.out.println(“Train no 11042
is a train running between Chennai
and Mumbai. Chennai is located in
the state of Tamil Nadu and Mumbai
is located in the state of
Maharastra. The two cities are
located at a distance of 1284km.
The train leaves Chennai at 11:55
on day-1 and reaches Mumbai at
13:35 on day-2. It takes 25Hrs
40Mins to reach from its source to
the destination some of the major
stations that the train passes
through on its way are KALYAN
JUNCTION,PUNE JUNCTION and DADAR
JUNCTION. In a week, Mumbai
Express operates on
Monday,Tuesday,Wednesday
,Thursday,Friday,Saturday and
Sunday.”);

System.out.println(“6.KOCHUVELI
EXPRESS”);

System.out.println();
System.out.println(“DETAILS:”);
System.out.println(“Train no 06011
is a train running between Chennai
and Kochuveli. Chennai is located
in the state of Tamil Nadu and
Kocuveli is located in the state
of Kerala. The two cities are
located at a distance of 916km.
The train leaves Chennai at 21:00
on day-1 and reaches Mysore at
12:35 on day-2. It takes 15Hrs
35Mins to reach from its source to
the destination some of the major
stations that the train passes
through on its way are COIMBATORE
JUNCTION, KOLLAM JUNCTION and
TRISHUR. In a week, Kochuveli
Express operates on Friday and
Sunday”);

System.out.println(“7.BHUBANESWAR
EXPRESS”);

System.out.println();
System.out.println(“DETAILS:”);
System.out.println(“Train no 12829
is a train running between Chennai
and Bubaneshwar. Chennai is
located in the state of Tamil Nadu
and Bubaneshwar is located in the
state of Orissa. The two cities
are located at a distance of
1223km. The train leaves Chennai
at 21:10 on day-1 and reaches
Bubaneshwar at 17:35 on day-2. It
takes 20Hrs 25Mins to reach from
its source to the destination some
of the major stations that the
train passes through on its way
are VIJAYAWADA JUNCTION and
VISHAKAPATANAM. In a week,
Bhubaneswar Express operates on
Friday.”);

System.out.println(“8.CHARMINAR
EXPRESS”);

System.out.println();
System.out.println(“DETAILS:”);
System.out.println(“Train no 12759
is a train running between Chennai
and Hyderabad. Chennai is located
in the state of Tamil Nadu and
Hyderabad is located in the state
of Telangana. The two cities are
located at a distance of 790km.
The train leaves Chennai at 18:10
on day-1 and reaches Mysore at
8:00 on day-2. It takes 13Hrs
50Mins to reach from its source to
the destination some of the major
stations that the train passes
through on its way are VIJAYAWADA
JUNCTION, SECUNDERBAD JUNCTION and
WARANGAL. In a week, Charminar
Express operates on Monday,
Tuesday, Wednesday , Thursday,
Friday, Saturday and Sunday”);

System.out.println(“9.NAGERCOIL
EXPRESS”);

System.out.println();
System.out.println(“DETAILS:”);
System.out.println(“Train no 12689
is a train running between Chennai
and Nagercoil. Chennai is located
in the state of Tamil Nadu and
Nagercoil is located in the state
of Tamil Nadu. The two cities are
located at a distance of 927km.
The train leaves Chennai at 18:15
on day-1 and reaches Nagercoil at
11:05 on day-2. It takes 16Hrs
15Mins to reach from its source to
the destination some of the major
stations that the train passes
through on its way are KATPADI
JUNCTION and TIRUCHCHIRAPALLI
JUNCTION. In a week, Nagercoil
Express operates on Friday, and
Sunday.”);
System.out.println(“10.MANGALORE
EXPRESS”);

System.out.println();
System.out.println(“DETAILS:”);
System.out.println(“Train no 12685
is a train running between Chennai
and Mangalore. Chennai is located
in the state of Tamil Nadu and
Mangalore is located in the state
of Karnataka. The two cities are
located at a distance of 889kms.
The train leaves Chennai at 17:00
on day-1 and reaches Mysore at
19:05 on day-2. It takes 16Hrs
5mins to reach from its source to
the destination some of the major
stations that the train passes
through on its way are KATPADI
JUNCTION,SALEM JUNCTION and
TRIPUR. In a week, Mangalore
Express operates on Monday,Tuesday
,Thursday,Friday,Saturday and
Sunday.”);
System.out.println(“11.SAPTAGIRI
EXPRESS”);

System.out.println();
System.out.println(“DETAILS:”);
System.out.println(“Train no 16058
is a train running between Chennai
and Tirupathi. Chennai is located
in the state of Tamil Nadu and
Tirupathi is located in the state
of Andhra Pradesh. The two cities
are located at a distance of
151km. The train leaves Chennai at
21:35 on day-1 and reaches
Tirupati at 01:15 on day-2. It
takes 3Hrs 40Mins to reach from
its source to the destination some
of the major stations that the
train passes through on its way
are TRIVELLORE and RENIGUNTA
JUNCTION. In a week, Sapthagiri
Express operates on
Monday,Tuesday, Wednesday
,Thursday,Friday,Saturday and
Sunday.”);

System.out.println(“12.ERNAKULAM
EXPRESS”);

System.out.println();
System.out.println(“DETAILS:”);
System.out.println(“Train no 06345
is a train running between Chennai
and Ernakulam. Chennai is located
in the state of Tamil Nadu and
Ernakulam is located in the state
of Kerala. The two cities are
located at a distance of 702km.
The train leaves Chennai at 15:15
on day-1 and reaches Mysore at
3:00 on day-2. It takes 11Hrs
45Mins to reach from its source to
the destination some of the major
stations that the train passes
through on its way are KATPADI
JUNCTION,COIMBATORE JUNCTION and
TRISHUR. In a week, Ernakulam
Express operates on Friday.”);

System.out.println(“13.WESTCOAST
EXPRESS”);

System.out.println();
System.out.println(“DETAILS:”);
System.out.println(“Train no 16627
is a train running between Chennai
and Mangalore. Chennai is located
in the state of Tamil Nadu and
Mangalore is located in the state
of Karnataka. The two cities are
located at a distance of 908km.
The train leaves Chennai at 11:30
on day-1 and reaches Mangalore at
04:20 on day-2. It takes 16Hrs
50Mins to reach from its source to
the destination some of the major
stations that the train passes
through on its way KATPADI
JUNCTION,COIMBATORE JUNCTION and
TIRUPPUR. In a week, Westcoast
Express operates on
Monday,Tuesday,
Wednesday,Thursday,Friday,Saturday
and Sunday”);

System.out.println(“14.BRINDAVAN
EXPRESS”);

System.out.println();
System.out.println(“DETAILS:”);
System.out.println(“Train no 12639
is a train running between Chennai
and Bangalore. Chennai is located
in the state of Tamil Nadu and
Bangalore is located in the state
of Karnataka. The two cities are
located at a distance of 362km.
The train leaves Chennai at 7:50
on day-1 and reaches Bangalore at
14:00 on day-1. It takes 6Hrs
10min to reach from its source to
the destination some of the major
stations that the train passes
through on its way are KATPADI
JUNCTION BANGALORE CY JUNCTION and
BANGALORE CANT. In a week,
Brindavan Express operates on
Monday,Tuesday, Wedneday
,Thursday,Friday,Saturday and
Sunday. It offers only facilities
pantry”);

System.out.println(“15.HOWRAH
MAIL”);

System.out.println();
System.out.println(“DETAILS:”);
System.out.println(“Train no 12840
is a train running between Chennai
and Kolkatta. Chennai is located
in the state of Tamil Nadu and
Kolkatta is located in the state
of West Bengal. The two cities are
located at a distance of 1662km.
The train leaves Chennai at 23:40
on day-1 and reaches Kolkatta at
04:10 on day-3. It takes 28Hrs to
reach from its source to the
destination some of the major
stations that the train passes
through on its way are VIJAYAWADA
JUNCTION and HOWRAH JUNCTION. In a
week, Howrah Mail Express operates
on Monday,Tuesday, Wednessday
,Thursday,Friday,Saturday and
Sunday”);

System.out.println(“16.PINAKINI
EXPRESS”);

System.out.println();
System.out.println(“DETAILS:”);
System.out.println(“Train number
12712 is a train running between
Chennai and Vijayawada. Chennai
is located in the state of Tamil
Nadu and Vijayawada is located in
the state of Andhra Pradesh.The
two cities are located at a
distance of 431kms.The train
12712 is named as PINAKINI EXP.
It leaves Chennai at 00:00 on day
1 and reaches Vijayawada at 21:10
on day 1.It takes 21 hrs 10 mins
to reach from its source to the
destination.
Some of the major stations that
the train passes through on its
way are VIJAYAWADA JUNCTION. In a
week, PINAKINI EXP operates on
Monday, Tuesday, Wednesday,
Thursday, Friday, Saturday,
Sunday.It offers facilities like
Pantry.”);

System.out.println(“17.KAVERI
EXPRESS”);
System.out.println();
System.out.println(“DETAILS:”);
System.out.println(“Train number
16021 is a train running between
Chennai and Mysore. Chennai is
located in the state of Tamil
Nadu and Mysore is located in the
state of Karnataka.The two cities
are located at a distance of
500kms.The train 16021 is named
as KAVERI EXPRESS. It leaves
Chennai at 00:00 on day 1 and
reaches Mysore at 06:50 on day
2.It takes 30 hrs 50 mins to
reach from its source to the
destination.
Some of the major stations that
the train passes through on its
way are KATPADI JUNCTION,
BANGALORE CY JUNCTION, and
BANGALORE CANT. In a week, KAVERI
EXPRESS operates on Monday,
Tuesday, Wednesday, Thursday,
Friday, Saturday, Sunday.”);
System.out.println(“18.LALBAGH
EXPRESS”);

System.out.println();
System.out.println(“DETAILS:”);
System.out.println(“Train number
12607 is a train running between
Chennai and Bangalore. Chennai is
located in the state of Tamil
Nadu and Bangalore is located in
the state of Karnataka.The two
cities are located at a distance
of 362kms.The train 12607 is
named as LALBAGH EXPRESS. It
leaves Chennai at 00:00 on day 1
and reaches Bangalore at 21:35 on
day 1.It takes 21 hrs 35 mins to
reach from its source to the
destination. Some of the major
stations that the train passes
through on its way are KATPADI
JUNCTION, BANGALORE CY JUNCTION,
and BANGALORE CANT. In a week,
LALBAGH EXPRESS operates on
Monday, Tuesday, Wednesday,
Thursday, Friday, Saturday,
Sunday.
It offers facilities like
Pantry.”);

System.out.println(“19.GUWAHATI
EXPRESS”);

System.out.println();
System.out.println(“DETAILS:”);
System.out.println(“Train number
15629 is a train running between
Chennai and Guwhati. Chennai is
located in the state of Tamil
Nadu and Guwhati is located in
the state of Assam. The two
cities are located at a distance
of 2790kms.The train 15629 is
named as GUWHATI EXPRESS. It
leaves Chennai at 23:30 on day 1
and reaches Bangalore at 4:35 on
day 3.It takes 29 hrs 35 mins to
reach from its source to the
destination.Some of the major
stations that the train passes
through on its way are KATPADI
JUNCTION, VIJAYAWADA JUNCTION and
VISHAKAPATANAM CANT. In a week,
GUWHATI EXPRESS operates on
Wednesday, Thursday, Friday.It
offers facilities like Pantry.”);

System.out.println(“20.CHERAN
EXPRESS”);

System.out.println();
System.out.println(“DETAILS:”);
System.out.println(“Train number
12673 is a train running between
Chennai and Coimbatore. Chennai
is located in the state of Tamil
Nadu and Coimbatore is located in
the state of Tamil Nadu.The two
cities are located at a distance
of 497kms.The train 12673 is
named as CHERAN EXPRESS. It
leaves Chennai at 22:10 on day 1
and reaches Coimbatore at 06:05
on day 2.It takes 7 hrs 55 mins
to reach from its source to the
destination.
Some of the major stations that
the train passes through on its
way are SALEM JUNCTION, TIRUPPUR,
and COIMBATORE JUNCTION. In a
week, CHERAN EXPRESS operates on
Monday, Tuesday, Wednesday,
Thursday, Friday, Saturday,
Sunday.”);

System.out.println(“21.PATALIPUTRA
EXPRESS”);

System.out.println();
System.out.println(“DETAILS:”);
System.out.println(“Train number
22639 is a train running between
Chennai and Alleppey. Chennai is
located in the state of Tamil
Nadu and Alleppey is located in
the state of Kerala.The two
cities are located at a distance
of 759kms.The train 22639 is
named as ALLEPPEY EXP. It leaves
Chennai at 00:00 on day 2 and
reaches Alleppey at 10:30 on day
2.It takes 10 hrs 30 mins to
reach from its source to the
destination.Some of the major
stations that the train passes
through on its way are KATPADI
JUNCTION, SALEM JUNCTION, and
THRISUR. In a week, ALLEPPEY EXP
operates on Monday, Tuesday,
Wednesday, Thursday, Friday,
Saturday, Sunday.”);

System.out.println(“22.RAJDHANI
EXPRESS”);

System.out.println();
System.out.println(“DETAILS:”);
System.out.println(“Train number
12433 is a train running between
Chennai and New Delhi. Chennai is
located in the state of Tamil
Nadu and New Delhi is located in
the state of Delhi.The two cities
are located at a distance of
2175kms.The train 12433 is named
as RAJDHANI EXP. It leaves
Chennai at 06:10 on day 1 and
reaches New Delhi at 10:25 on day
2.It takes 28 hrs 15 mins to
reach from its source to the
destination.Some of the major
stations that the train passes
through on its way are VIJAYAWADA
JUNCTION, NAGPUR, and H
NIZAMUDDIN. In a week, RAJDHANI
EXP operates on Friday, Sunday.
It offers facilities like Pantry,
Free Override, and Food
Choice.”);

System.out.println(“23.ANDAMAN
EXPRESS”);

System.out.println();
System.out.println(“DETAILS:”);
System.out.println(“Train number
16031 is a train running between
Chennai and Jammu. Chennai is
located in the state of Tamil
Nadu and Jammu is located in the
state of Jammu & Kashmir.The two
cities are located at a distance
of 2798kms.The train 16031 is
named as ANDAMAN EXPRESS. It
leaves Chennai at 05:15 on day 1
and reaches Jammu at 13:10 on day
3.It takes 55 hrs 55 mins to
reach from its source to the
destination.Some of the major
stations that the train passes
through on its way are NEW DELHI,
VIJAYAWADA JUNCTION, and NAGPUR.
In a week, ANDAMAN EXPRESS
operates on Wednesday, Thursday,
Sunday.”);

System.out.println(“24.LUCKNOW
EXPRESS”);

System.out.println();
System.out.println(“DETAILS:”);
System.out.println(“Train number
16093 is a train running between
Chennai and Lucknow. Chennai is
located in the state of Tamil
Nadu and Lucknow is located in
the state of Uttar Pradesh.The
two cities are located at a
distance of 2089kms.The train
16093 is named as LUCKNOW EXP. It
leaves Chennai at 05:15 on day 1
and reaches Lucknow at 20:35 on
day 2.It takes 39 hrs 20 mins to
reach from its source to the
destination.Some of the major
stations that the train passes
through on its way are KANPUR
CENTRAL, VIJAYAWADA JUNCTION, and
LUCKNOW NR. In a week, LUCKNOW
EXP operates on Tuesday,
Saturday.”);

System.out.println(“25.TRIVENDRAM
EXPRESS”);

System.out.println();
System.out.println(“DETAILS:”);
System.out.println(“Train number
12695 is a train running between
Chennai and Trivandrum. Chennai
is located in the state of Tamil
Nadu and Trivandrum is located in
the state of Kerela.The two
cities are located at a distance
of 922kms.The train 12695 is
named as Trivandrum Express. It
leaves Chennai at 15:25 on day 1
and reaches Trivandrum at 07:35
on day 2.It takes 16 hrs 10 mins
to reach from its source to the
destination.Some of the major
stations that the train passes
through on its way are KATPADI
JUNCTION, SALEM JUNCTION, and
THRISUR. In a week, Trivandrum
Express operates on Monday,
Tuesday, Wednesday, Thursday,
Friday, Saturday, Sunday.”);

System.out.println(“26.VISHAKA
EXPRESS”);

System.out.println();
System.out.println(“DETAILS:”);
System.out.println(“Train number
22870 is a train running between
Chennai and Vishakhapatnam.
Chennai is located in the state
of Tamil Nadu and Vishakhapatnam
is located in the state of Andhra
Pradesh.The two cities are
located at a distance of
781kms.The train 22870 is named
as VISAKAPATNAM EX. It leaves
Chennai at 21:10 on day 1 and
reaches Vishakhapatnam at 10:25
on day 2.It takes 13 hrs 15 mins
to reach from its source to the
destination.Some of the major
stations that the train passes
through on its way are VIJAYAWADA
JUNCTION, VISHAKAPATNAM, and
ELURU. In a week, VISAKAPATNAM EX
operates on Tuesday.”);

System.out.println(“27.GRAND
TRUNK EXPRESS”);

System.out.println();
System.out.println(“DETAILS:”);
System.out.println(“Train number
12615 is a train running between
Chennai and New Delhi. Chennai is
located in the state of Tamil
Nadu and New Delhi is located in
the state of Delhi.The two cities
are located at a distance of
2188kms.
The train 12615 is named as GRAND
TRUNK EXP. It leaves Chennai at
19:15 on day 1 and reaches New
Delhi at 07:10 on day 3.It takes
35 hrs 55 mins to reach from its
source to the destination.
Some of the major stations that
the train passes through on its
way are NEW DELHI, VIJAYAWADA
JUNCTION, and NAGPUR. In a week,
GRAND TRUNK EXP operates on
Monday, Tuesday, Wednesday,
Thursday, Friday, Saturday,
Sunday.”);

System.out.println(“28.DORONTO
EXPRESS”);

System.out.println();
System.out.println(“DETAILS:”);
System.out.println(“Train number
12269 is a train running between
Chennai and New Delhi. Chennai is
located in the state of Tamil
Nadu and New Delhi is located in
the state of Delhi.The two cities
are located at a distance of
2175kms.The train 12269 is named
as DURONTO EXPRESS. It leaves
Chennai at 06:40 on day 1 and
reaches New Delhi at 10:35 on day
2.It takes 27 hrs 55 mins to
reach from its source to the
destination.Some of the major
stations that the train passes
through on its way are H
NIZAMUDDIN. In a week, DURONTO
EXPRESS operates on Monday,
Friday.It offers facilities like
Food Choice.
”);

System.out.println(“29.MADGOAN
EXPRESS”);

System.out.println();
System.out.println(“DETAILS:”);
System.out.println(“Train number
06001 is a train running between
Chennai and Goa. Chennai is
located in the state of Tamil
Nadu and Goa is located in the
state of Goa.The two cities are
located at a distance of 788kms.
The train 06001 is named as
MADGAON EXP. It leaves Chennai at
21:00 on day 1 and reaches Goa at
11:00 on day 2.It takes 14 hrs 0
mins to reach from its source to
the destination.
Some of the major stations that
the train passes through on its
way are KATPADI JUNCTION, SALEM
JUNCTION, and MUMBAI CST. In a
week, MADGAON EXP operates on
Sunday.

System.out.println(“30.MAS
GARIBRATH EXPRESS”);

System.out.println();
System.out.println(“DETAILS:”);
System.out.println(“Train number
12612 is a train running between
New Delhi and Chennai. New Delhi
is located in the state of Delhi
and Chennai is located in the
state of Tamil Nadu.The two
cities are located at a distance
of 2176kms.
The train 12612 is named as MAS
GARIB RATH. It leaves New Delhi
at 00:00 on day 1 and reaches
Chennai at 20:15 on day 2.It
takes 44 hrs 15 mins to reach
from its source to the
destination.
Some of the major stations that
the train passes through on its
way are VIJAYAWADA JUNCTION,
NAGPUR, and CHENNAI CENTRAL. In a
week, MAS GARIB RATH operates on
Monday.”);

System.out.println(“31.MAS DURONTO
EXPRESS”);

System.out.println();
System.out.println(“DETAILS:”);
System.out.println(“Train number
12270 is a train running between
New Delhi and Chennai. New Delhi
is located in the state of Delhi
and Chennai is located in the
state of Tamil Nadu.The two
cities are located at a distance
of 2176kms.
The train 12270 is named as MAS
DURONTO EXP. It leaves New Delhi
at 15:50 on day 1 and reaches
Chennai at 20:10 on day 2.It
takes 28 hrs 20 mins to reach
from its source to the
destination.
Some of the major stations that
the train passes through on its
way are CHENNAI CENTRAL. In a
week, MAS DURONTO EXP operates on
Tuesday, Saturday.
It offers facilities like Food
Choice.”);

System.out.println(“32.MYSORE
EXPRESS”);

System.out.println();
System.out.println(“DETAILS:”);
System.out.println(“Train number
22682 is a train running between
Chennai and Mysore. Chennai is
located in the state of Tamil
Nadu and Mysore is located in the
state of Karnataka.The two cities
are located at a distance of
500kms.
The train 22682 is named as
MYSORE EXPRESS. It leaves Chennai
at 23:30 on day 1 and reaches
Mysore at 08:20 on day 2.It takes
8 hrs 50 mins to reach from its
source to the destination.
Some of the major stations that
the train passes through on its
way are KATPADI JUNCTION,
BANGALORE CY JUNCTION, and
BANGALORE CANT. In a week, MYSORE
EXPRESS operates on Thursday.”);

System.out.println(“33.JAN
SHATABDI EXPRESS”);

System.out.println();
System.out.println(“DETAILS:”);
System.out.println(“Train number
12051 is a train running between
Mumbai and Goa. Mumbai is located
in the state of Maharashtra and
Goa is located in the state of
Goa.The two cities are located at
a distance of 716kms.
The train 12051 is named as Jan
Shatabdi Express. It leaves
Mumbai at 05:25 on day 1 and
reaches Goa at 13:50 on day 1.It
takes 8 hrs 25 mins to reach from
its source to the destination.
Some of the major stations that
the train passes through on its
way are THANE, MADGAON, and
RATNAGIRI. In a week, Jan
Shatabdi Express operates on
Monday, Tuesday, Wednesday,
Thursday, Friday, Saturday,
Sunday.
It offers facilities like
Pantry.”);

System.out.println(“ENTER TRAIN
NAME:”);
String train=in.readLine();

System.out.println(“CLASS(A.C./
SLEEPER/CHAIR CAR):”);
String class1=in.readLine();
System.out.println(“DATE OF
JOURNEY:”);
String date1=in.readLine();

reservationnum=(int)(Math.random);
System.out.println();

int f=0,

if(train.equalsIgnoreCase(“
Coimbatore express”)==true||
train.equalsIgnoreCase(“Hyderabad
express”)==true||
train.equalsIgnoreCase(“Shatabdi
express”)==true||
train.equalsIgnoreCase(“Tirupathi
express”)==true||
train.equalsIgnoreCase(“Jan
Shatabdi express”)==true)
{

if(class1.equalsIgnoreCase(“A.C.”)
==true)
{
if(age[i]<5)
{
f=0;
}
if(age[i]<13)
{
f=750;
}
if(age<65)
{
f=1500;
}
else
{
f=900;
}
}

if(class1.equalsIgnoreCase
(“SLEEPER”)==true)
{
if(age[i]<5)
{
f=0;
}
if(age[i]<13)
{
f=500;
}
if(age[i]<65)
{
f=1000;
}
else
{
f=600;
}
}

if(class1.equalsIgnoreCase
(“CHAIR CAR”)==true)
{
If(age[i]<5)
{
f=0;
}
if(age[i]<13)
{
f=250;
}
if(age[i]<65)
{
f=500;
}
else
{
f=300;
}
}
}

if(train.equalsIgnoreCase(“
Mumbai express”)==true||
train.equalsIgnoreCase(“kouchveli
express”)==true||
train.equalsIgnoreCase(“Bhubaneswa
r express”)==true||
train.equalsIgnoreCase(“Charminar
express”)==true||
train.equalsIgnoreCase(“Nagercoil
express”)==true)
{

if(class1.equalsIgnoreCase(“A.C.”)
==true)
{
if(age[i]<5)
{
f=0;
}
if(age[i]<13)
{
f=250;
}
if(age[i]<65)
{
f=500;
}
else
{
f=300;
}
}

if(class1.equalsIgnoreCase
(“SLEEPER”)==true)
{
if(age[i]<5)
{
f=0;
}
if(age[i]<13)
{
f=150;
}
if(age[i]<65)
{
f=300;
}
else
{
f=180;
}
}

if(class1.equalsIgnoreCase
(“CHAIR CAR”)==true)
{
if(age[i]<5)
{
f=0;
}
if(age[i]<13)
{
f=100;
}
if(age[i]<65)
{
f=200;
}
else
{
f=120;
}
}
}

if(train.equalsIgnoreCase(“
Mangalore express”)==true||
train.equalsIgnoreCase(“Saptagiri
express”)==true||
train.equalsIgnoreCase(“Ernakulum
express”)==true||
train.equalsIgnoreCase(“West coast
express”)==true||
train.equalsIgnoreCase(“Brindavan
express”)==true)
{

if(class1.equalsIgnoreCase(“A.C.”)
==true)
{
if(age[i]<5)
{
f=0;
}
if(age[i]<13)
{
f=700;
}
if(age[i]<65)
{
f=1400;
}
else
{
f=840;
}
}

if(class1.equalsIgnoreCase
(“SLEEPER”)==true)
{
if(age[i]<5)
{
f=0;
}
if(age[i]<13)
{
f=400;
}
if(age[i]<65)
{
f=800;
}
else
{
f=480;
}
}

if(class1.equalsIgnoreCase
(“CHAIR CAR”)==true)
{
if(age[i]<5)
{
f=0;
}
if(age[i]<13)
{
f=200;
}
if(age[i]<65)
{
f=400;
}
else
{
f=240;
}
}
}

if(train.equalsIgnoreCase(“
howrah express”)==true||
train.equalsIgnoreCase(“pinakini
express”)==true||
train.equalsIgnoreCase(“Kaveri
express”)==true||
train.equalsIgnoreCase(“Lalbagh
express”)==true||
train.equalsIgnoreCase(“Guwahati
express”)==true)

if(class1.equalsIgnoreCase(“A.C.”)

==true)
{
if(age[i]<5)
{
f=0;
}
if(age[i]<13)
{
f=600;
}
if(age[i]<65)
{
f=1200;
}
else
{
f=720;
}
}

if(class1.equalsIgnoreCase
(“SLEEPER”)==true)
{
if(age[i]<5)
{
f=0;
}
if(age[i]<13)
{
f=300;
}
if(age[i]<65)
{
f=600;
}
else
{
f=360;
}
}

if(class1.equalsIgnoreCase
(“CHAIR CAR”)==true)
{
if(age[i]<5)
{
f=0;
}
if(age[i]<13)
{
f=150;
}
if(age[i]<65)
{
f=300;
}
else
{
f=180;
}
}
}

if(train.equalsIgnoreCase(“
Cheran express”)==true||
train.equalsIgnoreCase(“Pataliputr
a express”)==true||
train.equalsIgnoreCase(“Rajdhani
express”)==true||
train.equalsIgnoreCase(“Andaman
express”)==true||
train.equalsIgnoreCase(“lucknow
express”)==true)

if(class1.equalsIgnoreCase(“A.C.”)
==true)
{
if(age[i]<5)
{
f=0;
}
if(age[i]<13)
{
f=400;
}
if(age[i]<65)
{
f=800;
}
else
{
f=480;
}
}

if(class1.equalsIgnoreCase
(“SLEEPER”)==true)
{
if(age[i]<5)
{
f=0;
}
if(age[i]<13)
{
f=250;
}
if(age[i]<65)
{
f=500;
}
else
{
f=300;
}
}

if(class1.equalsIgnoreCase
(“CHAIR CAR”)==true)
{
if(age[i]<5)
{
f=0;
}
if(age[i]<13)
{
f=100;
}
if(age[i]<65)
{
f=200;
}
else
{
f=120;
}
}
}
if(train.equalsIgnoreCase(“
Trivendram express”)==true||
train.equalsIgnoreCase(“mas
duronto express”)==true||
train.equalsIgnoreCase(“vishaka
express”)==true||
train.equalsIgnoreCase(“Grand
trunk express”)==true||
train.equalsIgnoreCase(“doronto
express”)==true||
train.equalsIgnoreCase(“madgoan
express”)==true||
train.equalsIgnoreCase(“mas gari
brath express”)==true||
train.equalsIgnoreCase(“mysore
express”)==true)
{

if(class1.equalsIgnoreCase(“A.C.”)
==true)
{
if(age[i]<5)
{
f=0;
}
if(age[i]<13)
{
f=432;
}
if(age[i]<65)
{
f=890;
}
else
{
f=560;
}
}

if(class1.equalsIgnoreCase
(“SLEEPER”)==true)
{
if(age[i]<5)
{
f=0;
}
if(age[i]<13)
{
f=200;
}
if(age[i]<65)
{
f=560;
}
else
{
f=405;
}
}
if(class1.equalsIgnoreCase
(“CHAIR CAR”)==true)
{
if(age[i]<5)
{
f=0;
}
if(age[i]<13)
{
f=50;
}
if(age[i]<65)
{
f=150;
}
else
{
f=150;
}
}
}

totalamt=totalamt+f;
}
}
}
System.out.println();

System.out.println(“**RESERVATION
TICKET**”);
System.out.println(“DATE:“+date1+”
RESERVATION

NUMBER:”+reservationnum);

System.out.println(“ NAME
AGE GENDER”);

for(int i=0;i<=p;i++)
{
System.out.println(people[i]+”
“+age[i]+” “+gender[i]);
}

System.out.println();
System.out.println(“START
STATION“+station)

System.out.println(“DESTINATION
STATION:”+dstation);

System.out.println();
System.out.println(“TOTAL AMOUNT:”
+totalamt);

System.out.println();

System.out.println(“ ***WISH YOU A


HAPPY AND SAFE JOURNEY***”);

System.out.println(“ --
COURTESY:CHENNAI RAILWAY STATION);
break;

case 2:
int recordnum=0;

recordnum=(int)(Math.random());

System.out.println(“ENTER YOUR
NAME:”);
String name5=in.readLine();
System.out.println();

System.out.println(“***PLATFORM
TICKET***”);

System.out.println(“RECORD
NUMBER:”+recordnum);

System.out.println();

System.out.println(“NAME:”+name5);

System.out.println();

System.out.println(“AMOUNT:Rs.5”);

System.out.println();

System.out.println(“VALID FOR
3(THREE) HOURS”);
System.out.println(“**************
***********);

break;

default:
System.out.println(“INVALID
ENTRY”);

}
}
}
}
OUTPUT

***WELCOME TO
CHENNAI STATION***
Chennai is a city in the state of
Tamil Nadu, located in the region
of India.
Chennai Central, erstwhile Madras
Central, is the main railway
terminus in the city
of Chennai, Tamil Nadu, India.It
is one of the most important hubs
in the South. It is connected
to Moore Market Complex railway
station and Chennai Park railway
station, and is adjacent
to Chennai Egmore railway station.
Chennai Central connects the city
to all northern cities of India,
including Kolkata, Mumbai and New
Delhi.
The 142-year-old building of the
railway station, one of the most
prominent landmarks of Chennai,
was designed by architect George
Harding.[6] The station is also a
main hub for the Chennai Suburban
Railway system. It lies adjacent
to the current headquarters of
the Southern Railway and the Ripon
Building. During the British Raj,
the station served as the gateway
to South India, and the station is
still used as a landmark for the
city and the state.
About 350,000 passengers use the
terminus every day.[7] Chennai
Egmore, Coimbatore
Junction and Chennai Central are
the most profitable stations of
Southern Railways.[8] As per a
report published in 2007 by
the Indian Railways, Chennai
Central and Secunderabad were
awarded 183 points out of a
maximum of 300 for cleanliness,
the highest in the country.
Total 269 passenger trains
Start/End/PassThrough Chennai
Central. Total 644 Stations are
directly connected to Chennai
Central via these 269 passenger
trains.

MENU
1.TICKET RESERVATION
2.PLATFORM TICKET
3.EXIT
ENTER YOUR CHOICE:
2

ENTER YOUR NAME:


TIHALAYA

***PLATFORM TICKET***

RECORD NUMBER:9421
NAME:TIHALAYA
AMOUNT:Rs.5

VALID FOR 3(THREE)HOURS


**************************
VARIABLES USED

c - choice
p – number of persons
age – age
reservationnum – reservation number
people – name of the person
gender – gender of the person
sstation – start station
dstation – destination station
train – name of the train
class1 –coaches of the train
date1 –date of journey
f – fare
recordnum – record number
name5 – name of the passenger
totalamt – total amount to be paid
CONCLUSION TO TOPIC

To think of life without railways is a


very primitive state of existence.
Railways, as we know them did not exist
in any part of the world before the year
1825. In was only in 1825 that the first
train ran between Stockton and
Darlington in England. The first rail
engine was driven by George
Stephenson, the famous inventor of the
steam locomotive. Later, France, USA,
Germany, Holland, Russia, Italy, Spain,
Austria and other important nations
also came into the path of railways. The
first railway line in India between
Boribunder (Bombay) and Thane was
opened to traffic on 16 April 1853, 28
years after the world’s first train made
its initial successful run. The plans for
the introduction and extension of
railways were formulated by Lord
Dalhousie. The construction of railways
in India was undertaken to achieve a
number of objectives both, commercial
and political. The basic purpose was to
collect raw materials from different
parts for export to Britain. It was also
used to sell British manufactures in
every part of the country. Another
compulsion for railway extension was
the need to move troops safely and
speedily from one part of the country to
another during times of emergencies.
The British suffered heavily during the
revolt of 1857. The subsidiary objectives
of railway development included famine
prevention and opening up of coal fields.
198 The first railways in India were
constructed and worked by Private
Railway companies. They were
guaranteed a fixed rate of exchange and
gained a specific return on the capital
invested by them. East India Railway
Company, Madras Railway Company,
Bombay- Baroda and Central India
Railway Company, Bengal - Nagpur
Railway Company and Great Indian
Peninsula Railway Company played
important role for the construction of
railway lines across the length and
breadth of our country. But public
opinion both in India and England was
highly critical of the terms and
conditions which were characterized as
unduly generous for the British
investors at the expense of the people of
India. It was felt that private companies
with a State guarantee of profits were
not likely to observe economy in the
outlay. The share holders got their
guaranteed profits properly, even if the
companies were extravagant and
wasteful in construction. Accordingly
the contracts with the working
companies were terminated after 1925
and the management of the companies
was taken over directly by the
Government.
Conclusion
Java has significant advantages not
only as a commercial language but
also as a teaching language. It allows
students to learn object-oriented
programming without exposing them to
the complexity of C++. It provides the
kind of rigorous compile-time error
checking typically associated with
Pascal. It allows instructors to
introduce students to GUI
programming, networking, threads,
and other important concepts used in
modern-day software.
Java might well be a language that
most computer science departments
could agree to use as an introductory
language. If so, we'll all benefit from
once again having a single dominant
language in CS1.

Acknowledgement

I would like to express my special


thanks of gratitude to my teacher Miss
Ambika as well as our principal Sister
Lourdes Bernard who gave me the
golden opportunity to do this wonderful
project on the topic TRAIN
RESERVATION which also helped me
in doing a lot of Research
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.
BIibliography

www.javapint.com
www.cleartrip.com
www.wikepedia.com
www.scribd.com
FLOWCHART

START

SWITCH

TEST
CASE 1 STATEMENT 1
CONDITION 1

false true

TEST
CONDITION 2

true

STATEMENT

break

STATEMENT 2 break
CASE 2
CASE 3 DEFAULT

END

ALGORITHM

Step 1: Start
Step 2: Enter your choice for
train reservation or platform
ticket or exit
Step 3: For case 1, if the
condition is true the program
flows to another condition else it
will be an invalid entry; and if
the second condition is true the
output will be displayed else it
will be an invalid entry.
Step 4: For case 2 the user will
enter the input and directly the
output will be displayed.
Step 5: For case 3 ,the program
will end without displaying any
output.

Step 6: If the user enters a wrong


choice other than what is
mentioned it will be displayed as
invalid entry by default.
Step 7: Stop

You might also like