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

Jeet10b'Scomputer Project

Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

Jeet10b'Scomputer Project

Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 25

COMPUTER

APPLICATION
PROJECT WORK
SESSION: 2023-2024

TOPIC – TRAIN
RESERVATION
SYSTEM
NAME : JEET KUMAR DAWN
CLASS : 10”B”
ROLL NO. : 21

JEET KUMAR DAWN


10”B”
21 Page 1
SUBJECT : COMPTER APPLICATION

ACKNOWLEDGEMEN
T
I would like to express my special thanks of
gratitude to my teacher “ MR. GAUTAM
GORAI ” as well as our principal “
FR.DR.P.ANTHONY RAJ .S.J ” who gave me
the golden opportunity to do this wonderful
project on the topic “ TRAIN 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.
JEET KUMAR DAWN
10”B”
21 Page Page 2
CONTENT
S.L NO. TOPICS PAGE NO.
1 Introduction 4
to JAVA
2 Introduction 5
to Topic
3 Coding 6-13
4 Output 14-21
5 Variable 22
Description
6 Conclusion 23-24
7 Bibliography 25

JEET KUMAR DAWN


10”B”
21 Page Page 3
INTRODUCTION TO
JAVA
JAVA was developed by James Gosling at
Sun Microsystems Inc in the year 1995, later
acquired by Oracle Corporation. It is a
simple programming language. Java makes
writing, compiling, and debugging
programming easy. It helps to create
reusable code and modular programs.
Java is a class-based, object-oriented
programming language and is designed to
have as few implementation dependencies
as possible. A generalpurpose programming
language made for developers to write once
run anywhere that is compiled Java code
can run on all platforms that support Java.

JEET KUMAR DAWN


10”B”
21 Page Page 4
Java applications are compiled to byte code
that can run on any Java Virtual Machine.

INTRODUCTION TO
TOPIC
Indian Railway reservation system is a
system where a traveler reserves his seat
before travelling. This facility has many
windows and categories , which provides an
ease to passengers. By giving a few details
and some payments , a traveler an choose
among their favorite coaches between
general, sleeper or AC coaches.
Passengers who wish to travel in Indian
railways train must reserve his seat in
advance for all classes of travel except for
general. Unreserved coaches. The railways

JEET KUMAR DAWN


10”B”
21 Page Page 5
reservation facility allows you to travel in
the train aand travel class of your choice
with a breth\set allotted against your name.

CODING OF THE
TRAIN RESERVATION
SYSTEM
import java.util.*;
class train
{
public static void main(String args[])
{
Scanner sc=new Scanner (System.in);
int amont1;
int totamount;
JEET KUMAR DAWN
10”B”
21 Page Page 6
System.out.println("********WELCOME
TO INDIAN RAILWAYS********");
System.out.println("Enter your
name:");
String name=sc.nextLine();
System.out.println("Enter your mobile
number :");
long mobno=sc.nextLong();
System.out.println("Enter the total
number of passenger inclding yourself:");
int tno=sc.nextInt();
System.out.println("Enter the names
of all the passengers and the details to be
needed :");
for(int i=1;i<=tno;i++)
{

JEET KUMAR DAWN


10”B”
21 Page Page 7
System.out.println("Enter the
name :");
String name1=sc.nextLine();
System.out.println("Enter the
age:");
int age=sc.nextInt();
}
System.out.println("Enter your
destination :");
String Destination=sc.nextLine();
System.out.println("Enter the amount
for one seat :");
int seatamt=sc.nextInt();
System.out.println("Enter '1' to select
1AC coach. ");

JEET KUMAR DAWN


10”B”
21 Page Page 8
System.out.println("Enter '2' to select
2AC coach. ");
System.out.println("Enter '3' to select
3AC coach. ");
System.out.println("Enter '4' to select
sleeper coach. ");
int op=sc.nextInt();
switch(op)
{
case 1:
System.out.println("You have
selected 1AC coach. ");
System.out.println("Additional
amount needed is Rs.700.00");
amont1=seatamt+700;
totamount=(seatamt+700)*tno;
JEET KUMAR DAWN
10”B”
21 Page Page 9
System.out.println("Total amount
for one person : "+amont1);
System.out.println("Total amount
for all the passengers : "+totamount);
break;
case 2:
System.out.println("You have
selected 2AC coach. ");
System.out.println("Additional
amount needed is Rs.500.00");
amont1=seatamt+500;
totamount=(seatamt+500)*tno;
System.out.println("Total amount
for one person : "+amont1);
System.out.println("Total amount
for all the passengers : "+totamount);

JEET KUMAR DAWN


10”B”
21 Page Page 10
break;
case 3:
System.out.println("You have
selected 3AC coach. ");
System.out.println("Additional
amount needed is Rs.250.00");
amont1=seatamt+250;
totamount=(seatamt+250)*tno;
System.out.println("Total amount
for one person : "+amont1);
System.out.println("Total amount
for all the passengers : "+totamount);
break;
case 4:
System.out.println("You have
selected sleeper coach. ");
JEET KUMAR DAWN
10”B”
21 Page Page 11
System.out.println("No Additional
amount is needed .");
amont1=seatamt;
totamount=seatamt*tno;
System.out.println("Total amount
for one person : "+amont1);
System.out.println("Total amount
for all the passengers : "+totamount);
break;
}
System.out.println("For the
payment purpose a OTP will be sent to your
registered mobile number");
System.out.println("through
which you can make the payment .");
System.out.println("");

JEET KUMAR DAWN


10”B”
21 Page Page 12
System.out.println("Enter the six-
digit pin for proceeding payment :");
int pin=sc.nextInt();
System.out.println("Your
payment had been sucessfully
completed .");
System.out.println("Your seat has
been sucessfully reserved .");
System.out.println("We wish you
a HAPPY JOURNEY to "+Destination);
System.out.println("******THANK
YOU FOR CHOOSING INDIAN
RAILWAY******");
}
}

JEET KUMAR DAWN


10”B”
21 Page Page 13
OUTPUT OF THE
SOFTWARE
********WELCOME TO INDIAN
RAILWAYS********
Enter your name:
JEET KUMAR DAWN
Enter your mobile number :
8767989457
Enter the total number of passenger
inclding yourself:
4
Enter the names of all the passengers and
the details to be needed :
Enter the name :

JEET KUMAR DAWN


10”B”
21 Page Page 14
JEET KUMAR DAWN
Enter the age:
15
Enter the name :
KINGSHUK DAWN
Enter the age:
10
Enter the name :
DIPEN KUMAR DAWN
Enter the age:
45
Enter the name :
MITHU DAWN
Enter the age:
38
JEET KUMAR DAWN
10”B”
21 Page Page 15
Enter your destination :
MUMBAI
Enter the amount for one seat :
700
Enter '1' to select 1AC coach.
Enter '2' to select 2AC coach.
Enter '3' to select 3AC coach.
Enter '4' to select sleeper coach.
1
You have selected 1AC coach.
Additional amount needed is Rs.700.00
Total amount for one person : 1400
Total amount for all the passengers : 5600
For the payment purpose a OTP will be sent
to your registered mobile number

JEET KUMAR DAWN


10”B”
21 Page Page 16
through which you can make the payment .

Enter the six-digit pin for proceeding


payment :
237593
Your payment had been sucessfully
completed .
Your seat has been sucessfully reserved .
We wish you a HAPPY JOURNEY to
******THANK YOU FOR CHOOSING INDIAN
RAILWAY******

2
You have selected 2AC coach.
Additional amount needed is Rs.500.00
Total amount for one person : 1000
JEET KUMAR DAWN
10”B”
21 Page Page 17
Total amount for all the passengers : 1000
For the payment purpose a OTP will be sent
to your registered mobile number
through which you can make the payment .

Enter the six-digit pin for proceeding


payment :
236723
Your payment had been sucessfully
completed .
Your seat has been sucessfully reserved .
We wish you a HAPPY JOURNEY to
******THANK YOU FOR CHOOSING INDIAN
RAILWAY******

3
JEET KUMAR DAWN
10”B”
21 Page Page 18
You have selected 3AC coach.
Additional amount needed is Rs.250.00
Total amount for one person : 750
Total amount for all the passengers : 750
For the payment purpose a OTP will be sent
to your registered mobile number
through which you can make the payment .

Enter the six-digit pin for proceeding


payment :
902390
Your payment had been sucessfully
completed .
Your seat has been sucessfully reserved .
We wish you a HAPPY JOURNEY to

JEET KUMAR DAWN


10”B”
21 Page Page 19
******THANK YOU FOR CHOOSING INDIAN
RAILWAY******

4
You have selected sleeper coach.
No Additional amount is needed .
Total amount for one person : 500
Total amount for all the passengers : 500
For the payment purpose a OTP will be sent
to your registered mobile number
through which you can make the payment .

Enter the six-digit pin for proceeding


payment :
984530

JEET KUMAR DAWN


10”B”
21 Page Page 20
Your payment had been sucessfully
completed .
Your seat has been sucessfully reserved .
We wish you a HAPPY JOURNEY to
******THANK YOU FOR CHOOSING INDIAN
RAILWAY******

VARIABLE
DESCRIPTION
JEET KUMAR DAWN
10”B”
21 Page Page 21
DATA VARIAB DESCRIPTION
TYPE LE
String For storing the name
Name
long mob For storing the mobile
number
int tno For storing the total no. of
passengers
int i For conducting loop
String name1 For storing the name of
the passengers
int age For storing the age
String Destinati For storing the
on destination
int seatamt For storing the amount of
one seat
int op For storing the no. of
option
int amont1 For storing the amount
and option
int totamou For storing the total
nt amount
int pin For storing the pin
JEET KUMAR DAWN
10”B”
21 Page Page 22
CONCLUSION
Java is a popular programming language,
created in 1995. It is owned by Oracle, and more
than 3 billion devices run Java. It is used for:
Mobile applications (specially Android apps)
Desktop applications.
Java is a multi-platform, object-oriented, and
network-centric language that can be used as
a platform in itself. It is a fast, secure, reliable
programming language for coding everything from
mobile apps and enterprise software to big data
applications and server-side technologies.
Developers use Java to construct applications
in laptops, data centres, game consoles,
scientific supercomputers, cell phones, and
other devices. Java is the world's third most

JEET KUMAR DAWN


10”B”
21 Page Page 23
popular programming language, after Python and
C – according to the TIOBE index, which
evaluates programming language popularity.

JEET KUMAR DAWN


10”B”
21 Page Page 24
BIBLIOGRAPHY
While doing this project I have taken help
from :
1) my computer sir Mr. Gautam Gorai
2) my computer book

JEET KUMAR DAWN


10”B”
21 Page Page 25

You might also like