Computer Project

You might also like

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

RAILWAY RESERVATION SYSTEM

INTRODUCTION.
The railway reserva on system is basically a data-base based project
done with help of python language. This project is very use full for the
people to book or cancel train ckets by si ng at home with one cell
phone in their hand This project can be modified for various
reserva ons.
OBJECTIVES OF THE PROJECT.
The objec ve of this project is to let the students apply the
programming knowledge into a real-world situa on/problem and
exposed the students how programming skills helps in developing a
good so ware
 Write programs u lizing modem so ware tools.

 Apply object oriented programming principles effec vely when developing


small to medium sized projects

 Write effec ve procedural code to solve small to medium sized probles.

 Students will demonstrate a breadth of knowledge in computer science, as


exemplified in the areas of systems, theory and so ware development

 Students will demonstrate ability to conduct a research or applied


Computer Science project, requiring wri ng and presenta on skills which
exemplify scholarly style in computer science
ACKNOWLEDGEMENT
Apart from the efforts of me, the success of any project depends largely
on the encouragement and guidelines of many others. I take this
opportunity to express my gra tude to the people who have been
instrumental in the successful comple on of this project
I express deep sense of gra tude to almighty God for giving me
strength for the successful comple on of the project.
I express my hear elt gra tude to my parents for constant
encouragement while
carrying out this project.
I gratefully acknowledge the contribu on of the individuals who
contributed in bringing this project up to this level, who con nues to
look a er me despite my flaws,
I express my deep sense of gra tude to the luminary The Principal (Sir
Pljush Kan Sarkar), Tripureswari , Vidyamandir ,Agartala who has been
con nuously mo va ng and extending their helping hand to us.
My sincere thanks to MR. HRISHIKESH PAUL, Master In-charge, A guide,
Mentor all the above a friend, who cri cally reviewed my project and
helped in solving each and every problem, occurred during
implementa on of the project
The guidance and support received from all the members who
contributed and who are contribu ng to this project, was vital for the
success of the project. I am grateful for their constant support and
help.
Cer ficate
This research was par ally supported by our computer teacher Sir
Hrishikesh Paul. We thank our friends who provided insight and
exper se that greatly assisted the research, although they may not
agree with all of the Interpreta ons of this paper.

We thank sir Hrishikesh Paul for assistance with (The Project On


Railway Reserva on System), and for comments that greatly improved
the manuscript.

We would also like to show our gra tude to the Pijush Kan Sarkar for
sharing their pearls of wisdom with us during the course of this
research, and we thank 3" anonymous" reviewers for their insights. We
are also immensely grateful for their comments on an earlirer version
of the manuscript, although any errors are our own and should not
tarnish the reputa ons of these esteemed persons.

Signature of Teacher

Signature of Examiner

Signature of Principal
Gandhigram, Agartala
Tripura (west),PIN – 799012
CBSE AFFILIATED SCHOOL
SESSION : 2023 -24
SUBJECT : COMPUTER ASSIGNMENT

Submi ed By: Submi ed To :


Name : Rashmi sen Hrishikesh Paul
Class : XII
Roll No :
Stream : Science
TABLE OF CONTANTS (T.O.C)

SER DESCRIPTION PAGE NO

01 ACKNOWLEDGEMENT 1

02 INTRODUCTION 2

03 OBJECTIVES OF THE PROJECT 2

04 PROPOSED SYSYTEM 3

05 SYSTEM DEVELOPMENT LIFE CYCLE 4


06 FLOW CHART 5

07 SOURCE CODE 6 – 12

08 OUTPUT 12 – 13

09 HARDWARE AND SOFTWARE 14


REQUIREMENTS
10 CONCLUSION 15

11 BIBLIOGRAPHY 16
PROPOSED SYSTEM

Today one cannot afford to rely on the fallible human beings of be


really wants to stand against today's merciless compe on where not
to wise saying "to err is human no longer valid, it's outdated to
ra onalize your mistake So, to keep pace with me, to bring about the
best result without malfunc oning and greater efficiency so to replace
the unending heaps of flies with a much sophis cated hard disk of the
computer.

One has to use the data management so ware that has been an ascent
in atomiza on various organisa ons. Many so ware products working
are now in markets, which have helped in making the organiza ons
work easier and efficiently. Data management ini ally had to maintain
a lot of ledgers and a lot of paper work has to be done but now
so ware product on this organiza on has made their work faster and
easier. Now only this so ware has to be loaded on the computer and
work can be done

This prevents a lot of me and money. The work becomes fully


automated and any informa on regarding the organiza on can be
obtained by clicking the bu on. Moreover, now it's an age of
computers of and automa ng such an organiza on gives the be er
look.
SYSTEM DEVELOPMENT LIFE CYCLE (SDLC)
The System Development Life Cycle assed in the Construc on of the
Server Appliance

Planning

Support Analysis

Implementation Design

The systems development life cycle is a project management technique


that divides complex projects into smaller, more easily managed
segments or phases. Segmen ng projects allows managers to verify the
successful comple on of project phases before alloca ng resources to
subsequent phases

So ware development projects typically include ini a on, planning,


design, development, tes ng, implementa on, and maintenance
phases. However, the phases may be divided differently depending on
the organiza on involved.

For example, ini al project ac vi es might be designated as request.


requirements-defini on, and planning phases, or ini a on, concept-
development, and planning phases End users of the system under
development should be involved in reviewing the output of each phase
to ensure the system is being built to deliver the needed func onality
FLOW CHART

1. COMMANDED PROGRAM WILL BE EXECUTED


IN THE PYTHON IDLE

2. AS THE PYTHON AND MYSQL ARE


CONNECTED THE COMMAND WILL BE SENT TO
MYSQL

3. THE REQUIRED DATA WILL BE TAKEN FROM


THE DATABASE.

4. THEN THE DATA WILL BE SEND TO THE


PYTHON IDLE.
SOURCE CODE
import mysql.connector as ch
conn-ch.connect(host 'localhost,user "root",passwd 'root' database
"train")

cur conn.cursor()
i-100
def railsmenu():
print("Railway Reserva on")
print("1.Train Detail")
print("2.Reserva on of Ticket")
print("3.Cancella on of Ticket")
print("4.Display PNR status")
print("5.Quit")
print("6.For adding in train detal"]

n-int(input("Enter your choice"])


if(n==1):
train_detail()
elif(n==2):
reserva on()
elif(n==3):
cancel()
elif(n==4):
display PNR()
elif(n==5):
return("exit")
elif (n==6):
train()
else:
print("wrong choice")
def train_detail():
a=str(input("Enter your star ng point;"))
b=str(input("Enter your des na on; "))
I.append (a).
I.append(b)

Sql="select train no,cost,via, me_of_departure,date,available from


train detail where star ng points and des na on"
cur.execute(sql.1)
I=Ien(f)
for j in range(0,1):
print("informa on u need resp as train_no,cost,via, me of
departure,date
availaible j+1,”:”,f[j])
print(railsmenu())
def reserva on):
print("1. Enter YOUR INFORMATION AS FOLLOWS:")
I=[]
I]=[]
[2=[]
global i
I.append(i)
a str(input("Enter passenger's name:"))
I.append(a)

b-str(input("Enter your age:"))


I.append(b)

c=strfinput("Enter your gender M/F/O:")}


I.append(c)

d=strfinput("Enter train_no:"))
I.append(d)
I1.append(d)
I2.append(d)
e="select star ng point,des na on from train detail where train_no-%
cur.execute(e,II)
f-cur.fetchall()
w=f[0]
x=w[0]
tw[1]
print(x)
print(t)

I.append(x)
I.append(t)
g=insert into

user_informa on(unique_id,uname age, gender, train_no,star ng


point,des na o n)values(%s, %,%,9%,%8,968,7%)
cur.execute(g.l)
conn.commit[]
print("informa on uploaded")

Z="select cost from train detail where train_no%s"


cur.execute(z,11)
n=cur.fetchall[]
print("you have to pay.",n)
mn str(input("would you like to confirm your seat(y/n):"))
l3-[]
l4-[]
pop="reserved"
dop="not reserved"
l3.append(pop)
l4.append(dop)

l5=13+11
l6=14+11
if mn="y":
print("your cket is confirmed")
print("in case of cancella on your unique id is "i-1)
mysql="update user_informa on set reserva on %s where train_no=%
cur.execute(mysql,l5)
conn.commit()
print('your cket is confirmed)
elif mn==”n”
print (your cket is not reserved")
mysql"update user informa on set reserva ons where train nou
eur execute(mysql.i6)
conn.commit
else:
print("wrong op on)
print(railsmenu])

print(railsmenu()
def cancel():
l=[]
q="not reserved"
l.append(q)
a=int(input("Enter Value Of Your Unique_id Provided:"))
l.append(a)
b="update user_informa on set reserva ons where unique_id=%s"
cur.execute(b.l)
conn.commit()
print("YOUR TICKET IS CANCELLED")
railsmenu()
def displayPNR():
l=[]
a=int(input("Enter Value Of Your Unique_id Provided:"}}
l.append(a)
sql="select * from user_informa on where unique_id=%s"
cur.execute(sql,1)
f=cur.fetchall[]
print("your current reserva on status is:"f
railsmenu()
def train)
print("Train Details)
ch= "y "
while (ch== "y ")
l=[]
thum int(input("Enter Train, no: ")
l.append(tnum)
ael-float(input("Enter Train cost: ")
l.append(ac1]
ac2-str(input("Enter Star ng point Of Train:"))
l.append(ac2)
ac3 str(input("Enter train's des na on:"))
l.append(ac3)
Slp=str(input("Enter via:"}}
l.append(slp)
e=str(input("Enter me of departure of train:"}}
l.append(e)
F=str(input("Enter the date of train board:"}}
l.append()
sql="insert into train_detail values(%s,%,%s, %,%s, %s,%s}"
print(sql.1)
cur.execute(sql,l)
conn.commit()
print("inser on completed")
print("Do you want to insert more train Detail")
ch-input("Enter y/n")
print("\n' *10)
print("=====================================================
=======")
railsmenu()
#def exit():
#return
print(railsmenu())
MYSQL tables used in project:

create database train,

use train;

create table train_detail


(train_no int(10) not null,
cost int(10),
star ng point varchar(50).
des na on varchar(60).
via varchar(90).
me_of_departure varchar(40).
date_available varchar(88)).

create table user_informa on


(unique_id int(30) primary key.
uname varchar(40) not null,
age int(90).
gender varchar(50),
train_no int(90).
star ng point varchar(50).
des na on varchar(60));
ConClusion

The main aim of developing reserva on system is to provide all


informa on that is required by the users. Users friendliness is a must
that is the user must get the details without complicated searching
procedures. Other important requirement of so ware and data
security extensibility and maintainability. All the features are included
in this web applica on.

The project greatly helped in understanding the various bases in


website development and exposure to a new developer pla orm MS
visual studio. Net and data base my SQL server.
BIBLIOGRAPHY: -

- Computer science with python - Class XII By: Sumita Arora.

- A project on railway reserva on system.

You might also like