Sasirekha Computer Project
Sasirekha Computer Project
Sasirekha Computer Project
PROJECT
2018-2019
NAME: R.SASIREKHA
CLASS: X
SECTION: A
INDEX
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
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(“ --
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
***PLATFORM TICKET***
RECORD NUMBER:9421
NAME:TIHALAYA
AMOUNT:Rs.5
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
Acknowledgement
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.