CSC (Ip)
CSC (Ip)
S.N PAGE
DESCRIPTION
O NO
02 INTRODUCTION 02
07 SOURCE CODE 13
08 OUTPUT 28
09 CONCLUSION 34
1
ABOUT THE PROJECT:
INTRODUCTION
is full of completions and the only winner of this race is the one
2
This program is one example of how one shop can be
blank values.
3
SYSTEM DEVELOPMENT LIFE CYCLE (SDLC)
4
reviewing the output of each phase to ensure the system is
being built to deliver the needed functionality.
5
components, or the decision to use an incremental
delivery versus a complete, onetime deployment.
Construction of executable prototypes is encouraged to
evaluate technology to support the business process. The
System Boundary Document serves as an important
reference document to support the Information
Technology Project Request (ITPR) process.
The ITPR must be approved by the State CIO before the
project can move forward.
PLANNING PHASE
6
necessary to coordinate activities and manage project risks
effectively. The depth and formality of project plans should be
commensurate with the characteristics and risks of a given
project. Project plans refine the information gathered during
the initiation phase by further identifying the specific activities
and resources required to complete a project.
7
performance, security, and maintainability requirements for the
system.
The requirements are defined in this phase to a level of
detail sufficient for systems design to proceed. They need to be
measurable, testable, and relate to the business need or
opportunity identified in the Initiation Phase. The requirements
that will be used to determine acceptance of the system are
captured in the Test and Evaluation MasterPlan.
DESIGN PHASE
8
that developers use to script programs during the development
phase.
Program designs are constructed in various ways. Using a
top-down approach, designers first identify and link major
program components and interfaces, then expand design
layouts as they identify and link smaller subsystems and
connections.
Using a bottom-up approach, designers first identify and
link minor program components and interfaces, then expand
design layouts as they identify and link larger systems and
connections.
Contemporary design techniques often use prototyping
tools that build mock-up designs of items such as application
screens, database layouts, and system architectures. End
users, designers, developers, database managers, and network
administrators should review and refine the prototyped designs
in an iterative process until they agree on an acceptable
design.
Audit, security, and quality assurance personnel should be
involved in the review and approval process. During this phase,
the system is designed to satisfy the functional requirements
identified in the previous phase. Since problems in the design
phase could be very expensive to solve in the later stage of the
software development, a variety of elements are considered in
the design to mitigate risk. These include:
9
Developing a conversion plan to migrate current data to
the new system.
Determining the operating environment.
Defining major subsystems and their inputs and outputs.
Allocating processes to resources.
Preparing detailed logic specifications for each software
module. The result is a draft System Design Document
which captures the preliminary design for the system.
Everything requiring user input or approval is documented
and reviewed by the user. Once these documents have
been approved by the Agency CIO and Business Sponsor,
the final System Design Document is created to serve as
the Critical/Detailed Design for the system.
This document receives a rigorous review by Agency
technical and functional representatives to ensure that it
satisfies the business requirements. Concurrent with the
development of the system design, the Agency Project
Manager begins development of the Implementation Plan,
Operations and Maintenance Manual, and the Training
Plan.
DEVELOPMENT PHASE
The development phase involves converting design
specifications into executable programs. Effective
development standards include requirements that
programmers and other project participants discuss design
specifications before programming begins. The procedures
help ensure programmers clearly understand program
10
designs and functional requirements. Programmers use
various techniques to develop computer programs.
The large transaction oriented programs associated
with financial institutions have traditionally been developed
using procedural programming techniques. Procedural
programming involves the line-by-line scripting of logical
instructions that are combined to form a program. Effective
completion of the previous stages is a key factor in the
success of the Development phase. The Development phase
consists of:
11
Testing at the development facility by the contractor and
possibly supported by end users
12
incorporated. Operations continue as long as the system can be
effectively adapted to respond to the organization’s needs.
When modifications or changes are identified, the system may
re-enter the planning phase.
SOURCE CODE
import mysql.connector as sc
import numpy as np
def R_Homepage():
print('*********************************')
print("********************************")
13
print("4. SEARCH TRAIn DETAILS")
print("5.TICKET BOOKING")
if op==1:
AddTrain()
elif op==2:
UpdateTrain()
elif op==3:
RemoveTrain()
elif op==4:
SearchTrain()
elif op==5:
TicketBooking()
elif op==6:
CancelTicket()
elif op==7:
SearchBooking()
elif op==8:
Report()
else:
print("Invalid option")
14
#Definition for the Login ()
def Login():
print("\n\n\n\n")
print("***************************")
print("*****************************")
pas=input("Enter password:")
print("SUCCESSFUULY LOGGED!!!!!!")
R_Homepage()
else:
print("INCORRECT CREDENTIALS")
Login()
def AddTrain():
print("\n\n\n\n")
print("***************************")
print("*****************************")
15
T_name=input("Enter Train NAme:")
T_noofsleeper=int(input("Enter no of sleepers"))
T_noofgeneral=int(input("Enter no of general"))
T_priceac=int(input("Amount of AC ticket"))
conn=sc.connect(host="localhost",user="root",password="mgm",database="ip1
2")
mycursor=conn.cursor()
mycursor.execute(query)
conn.commit()
conn.close()
def UpdateTrain():
16
print("\n\n\n\n")
print("***************************")
print("*****************************")
conn=sc.connect(host="localhost",user="root",password="mgm",database="ip1
2")
mycursor=conn.cursor()
mycursor.execute(query)
conn.commit()
conn.close()
17
#Definition for the RemoveTrain() function
def RemoveTrain():
print("\n\n\n\n")
print("***************************")
print("*****************************")
conn=sc.connect(host="localhost",user="root",password="mgm",database="ip1
2")
mycursor=conn.cursor()
mycursor.execute(query)
conn.commit()
conn.close()
def SearchTrain():
print("\n\n\n\n")
print("***************************")
print("*****************************")
18
print("SEARCH TRAIN DETAILS")
conn=sc.connect(host="localhost",user="root",password="mgm",database="ip1
2")
mycursor=conn.cursor()
mycursor.execute(query)
myrecord=mycursor.fetchall()
for x in myrecord:
print(x)
conn.close()
def TicketBooking():
print("\n\n\n\n")
print("***************************")
print("*****************************")
conn=sc.connect(host="localhost",user="root",password="mgm",database="ip1
2")
mycursor=conn.cursor()
mycursor.execute(query)
myrecord=mycursor.fetchall()
19
print("TID\t\tTname\t\tSTARTINGPOINT\t\tENDLOC\t\tSTARTTIME\t\
tENDTIME\t\tNOOFAC\t\tNOOFsleeper\t\tNOOFgeneral\t\tPRICEAC\t\
tPRICESLEEPER\t\tPRICEGENERAL\t\t\n")
for x in myrecord:
print(x[0],'\t\t',x[1],"\t\t",x[2],"\t\t",x[3],"\t\t",x[4],"\t\t",x[5],"\t\t",x[6],"\t\
t",x[7],"\t\t",x[8],"\t\t",x[9],"\t\t",x[10],"\t\t",x[11],"\n")
conn.close()
startloc=input("Starting location")
conn=sc.connect(host="localhost",user="root",password="mgm",database="ip1
2")
fare=0
mycursor=conn.cursor()
mycursor.execute(query)
myrecord=mycursor.fetchall()
for x in myrecord:
if typeticket=="AC":
fare=x[9]
n=x[6]-1
20
query2="update train set noofAC={} where Tid='{}'".format(n,Tid)
elif typeticket=="Sleeper":
fare=x[10]
n=x[7]-1
elif typeticket=="General":
fare=x[11]
n=x[8]-1
mycursor.execute(query2)
conn.commit()
conn.close()
if age>=60 or age<=10:
fare=fare-fare*50/100
else:
fare=fare
conn=sc.connect(host="localhost",user="root",password="mgm",database="ip1
2")
mycursor=conn.cursor()
mycursor.execute(query)
conn.commit()
21
conn.close()
def SearchBooking():
print("\n\n\n\n")
print("***************************")
print("*****************************")
conn=sc.connect(host="localhost",user="root",password="mgm",database="ip1
2")
mycursor=conn.cursor()
mycursor.execute(query)
myrecord=mycursor.fetchall()
for x in myrecord:
print(x)
else:
conn.close()
def CancelTicket():
22
print("\n\n\n\n")
print("***************************")
print("*****************************")
conn=sc.connect(host="localhost",user="root",password="mgm",database="ip1
2")
mycursor=conn.cursor()
mycursor.execute(query1)
myrecord=mycursor.fetchall()
for x in myrecord:
tid=x[0]
tickettype=x[5]
mycursor.execute(query3)
myrecord2=mycursor.fetchall()
for x in myrecord2:
if tickettype=="AC":
acno=x[6]+1
elif tickettype=="Sleeper":
slno=x[7]+1
23
query4="update train set noofsleeper={} where
Tid='{}'".format(slno,tid)
elif tickettype=="GEneral":
gno=x[8]+1
mycursor.execute(query)
conn.commit()
mycursor.execute(query4)
conn.commit()
conn.close()
def Report():
print("\n\n\n\n")
print("***************************")
print("*****************************")
print("1. Report BAsed on Type of seat and no of seats avilable in each type")
if op==1:
24
print("\n\n\n\n")
print("***************************")
print("*****************************")
mycursor=conn.cursor()
mycursor.execute(query)
myrecord=mycursor.fetchall()
x=["AC","Sleeper","General"]
y=[]
y1=0
y2=0
y3=0
for i in myrecord:
y1=i[6]
y2=i[7]
y3=i[8]
y.append(y1)
y.append(y2)
y.append(y3)
plt.bar(x,y)
25
elif op==2:
print("\n\n\n\n")
print("***************************")
print("*****************************")
conn=sc.connect(host="localhost",user="root",password="mgm",database="ip1
2")
mycursor=conn.cursor()
mycursor.execute(query)
myrecord=mycursor.fetchall()
x=["AC","Sleeper","General"]
y=[]
y1=0
y2=0
y3=0
for i in myrecord:
y1=i[9]
y2=i[10]
y3=i[11]
y.append(y1)
y.append(y2)
y.append(y3)
26
plt.bar(x,y)
elif op==3:
print("\n\n\n\n")
print("***************************")
print("*****************************")
conn=sc.connect(host="localhost",user="root",password="mgm",database="ip1
2")
mycursor=conn.cursor()
mycursor.execute(query)
myrecord=mycursor.fetchall()
x=[]
y=[]
for i in myrecord:
x.append(i[0])
y.append(i[1])
plt.bar(x,y,width=0.5)
ply.xlabel("type of seat")
27
Login()
OUTPUT
Login Section:
Home page:
28
Update Train Details
29
Search Train Details
Ticket Booking:
30
Cancellation of Ticket Booking:
Report Section:
31
Report Based on Price
32
33
CONCLUSION
This project was completed on time and is found working effectively under all
circumstances that may arise in real environment. The program objective
specifies on the requirement is believed to be met. Using the facilities and
functionalities of python and mysql , the program has been developed in neat
manner.
This program is simple and user friendly. The speed and accuracy are
maintained in proper way. Testing of the program has given good result.
34
HARDWARE AND SOFTWARE REQUIREMENTS
ATHALON(3800+- 4200+
DUALCORE)
0R MSI
K9MM-V VIAK8M800+8237R
ATHALON
SOFTWARE REQUIREMENTS:
I. Windows OS
II. Python 3.7, MySql, PyMySql
35
1. Informatics Practices - Class XI & XII By :
SumitaArora
2. Computer science With Python - Class XI & XII By :
SumitaArora
Website: https://www.w3resource.com***
3. www.w3schools.com
4. https://www.scribd.com
5. https://www.slideshare.net
6. https://en.wikipedia.org
7. https://www.geeksforgeeks.org/
36