Index: Phases of System Development Life Cycle (SDLC)
Index: Phases of System Development Life Cycle (SDLC)
1
INTRODUCTION
2
OBJECTIVES IN THE PROJECT
SSCE/RAILWAY MANAGEMENT/CS-PROJECT/2024-25 1 |P a ge
PROJECT ON RAILWAY MANAGEMENT SYSTEM
Introduction
SSCE/RAILWAY MANAGEMENT/CS-PROJECT/2024-25 2 |P a ge
OBJECTIVES IN THE PROJECT
he Railway Management System (RMS) project has several key objectives that aim to
streamline and optimize the management of train schedules, ticket bookings, and
administrative tasks in a railway environment. These objectives focus on enhancing
efficiency, ensuring accurate data handling, and improving user experience.
SSCE/RAILWAY MANAGEMENT/CS-PROJECT/2024-25 3 |P a ge
5. Dynamic Fare Calculation
Objective: To dynamically calculate the fare for each ticket based on the class of
travel (AC, SL, or General).
Goal: Make the fare system transparent and easily understandable, with users being
able to see the fare before confirming the booking.
6. Ticket Cancellation
Objective: To allow users to cancel their booked tickets by entering the PNR
number.
Goal: Provide users with the flexibility to cancel their bookings while ensuring the
system updates the status of the ticket and releases seats accordingly.
SSCE/RAILWAY MANAGEMENT/CS-PROJECT/2024-25 4 |P a ge
10. User-Friendly Interface
Objective: To develop a simple, text-based interface that is intuitive and easy to
navigate.
Goal: Allow users of varying technical backgrounds to interact with the system,
reducing complexity and improving user engagement.
SSCE/RAILWAY MANAGEMENT/CS-PROJECT/2024-25 5 |P a ge
Proposed System
The proposed Railway Management System provides a unified platform to manage all
Essential railway operations digitally. It aims to replace traditional manual
processes with an automated system that enhances accuracy, efficiency, and
scalability.
SSCE/RAILWAY MANAGEMENT/CS-PROJECT/2024-25 6 |P a ge
Phases of System Development Life Cycle
(SDLC)
The System Development Life Cycle (SDLC) is a structured approach used to design,
develop, and maintain software systems. For the Railway Management System (RMS)
project, the SDLC phases can be tailored to ensure that the system is developed
efficiently, effectively, and meets the requirements of users and administrators.
Here are the typical phases of SDLC applied to the Railway Management System:
Objective:
In this phase, the focus is on gathering all the requirements from stakeholders (e.g.,
railway administrators, users, and technical teams).
The goal is to identify what features and functionalities the Railway Management
System should have.
Activities:
Outcome:
2. System Design
Objective:
In the design phase, the technical architecture of the system is defined, which
includes both high-level design (system architecture) and detailed design (modules,
components, and database).
SSCE/RAILWAY MANAGEMENT/CS-PROJECT/2024-25 7 |P a ge
Activities:
Outcome:
3. Implementation (Coding/Development)
Objective:
This phase involves the actual coding of the system based on the design
specifications from the previous phase.
Activities:
Outcome:
Objective:
This phase involves integrating all the individual components and testing the entire
system to ensure it works as intended.
Activities:
System integration: Combining all modules and ensuring that they work together as
a unified system (e.g., making sure the user registration integrates smoothly with
ticket booking and train schedules).
System testing: Testing the system as a whole, checking for bugs, performance
issues, and unexpected behavior. This includes functional testing (e.g., checking
train search, booking process) and non-functional testing (e.g., load and stress
testing).
User acceptance testing (UAT): Involving real users (or testers) to test the system
and ensure it meets the requirements gathered in the first phase.
Bug fixing and optimization: Identifying and fixing any errors, bugs, or
performance bottlenecks discovered during testing.
Outcome:
5. Deployment
Objective:
Activities:
The Railway Management System is fully operational and accessible by users and
admins in the production environment.
Objective:
Activities:
Bug fixes and updates: Addressing any bugs or issues that arise after the system
goes live and implementing any minor improvements or feature requests.
System monitoring: Monitoring the system for any performance or downtime issues
and ensuring that the system is running smoothly (e.g., monitoring server health,
database performance).
User feedback and enhancement: Gathering feedback from users and
administrators to identify areas for improvement and adding new features to enhance
the system.
Security updates: Regularly updating the system and database to address potential
security vulnerabilities, including patching software, improving encryption, and
ensuring user data is protected.
Outcome:
SSCE/RAILWAY MANAGEMENT/CS-PROJECT/2024-25 10 | P a g e
FLOW CHART
+---------------------------- +
| Start Program |
+---------------------------- +
|
v
+---------------------------- +
| Display Main Menu |
+---------------------------- +
|
+------------+ ------------ +
| |
+---v---+ +---v---+
| Login | | Register |
+ ------ + + -------- +
| |
+---v---+ +----v ---- +
| Check | | Store |
| Credentials | New User |
+ ------ + +----------+
| |
+---v---+ +----v -----+
| Valid? | | Success |
+---+---+ + --------- +
| |
+---v---+ v
| User |----------------->+ ----------------------- +
| Login | | Main Menu (New User) |
+-------+ + ---------------------- +
|
+---v--- +
| Dashboard +---v -- +
+----------+ | Admin |
| 1. Search | --------------> Panel |
| 2. Book | + ------ +
| 3. Cancel | |
| 4. Logout | +----v ---+
+------------+ | Admin Panel |
| +--------------+
v
+-----v-----+ + ----------- +
| Book | <--------------->| Train |
| Ticket | | Insert |
+-----+-----+ +---------+
SSCE/RAILWAY MANAGEMENT/CS-PROJECT/2024-25 11 | P a g e
Source Code
import random
import pymysql as con
from tabulate import tabulate
import datetime
[Link]()
[Link]()
[Link]("INSERT INTO users (user_id, name, phone_no, email_id, password) VALUES (%s, %s, %s, .
# User login
def login_user():
dbo = create_db_connection()
co = [Link]()
user_id = input("Enter your User ID: ")
password = input("Enter your Password: ")
[Link]("SELECT * FROM users WHERE user_id = %s AND password = %s", (user_id, password))
user = [Link]()
if user:
print(f"Welcome {user[1]}!")
[Link]()
return user_id
else:
print("Invalid User ID or Password!")
[Link]()
return None
SSCE/RAILWAY MANAGEMENT/CS-PROJECT/2024-25 13 | P a g e
# Train search
def search_trains():
dbo = create_db_connection()
co = [Link]()
origin = input("Enter origin station: ")
destination = input("Enter destination station: ")
if trains:
print("Trains available:")
print(tabulate(trains, headers=["Train No", "Train Name", "Origin", "Destination", "Distance", . . .. .
[Link]()
# Book ticket
def book_ticket(user_id):
dbo = create_db_connection()
co = [Link]()
if ticket_class == 1:
[Link]("SELECT ac_fare FROM train_schedule WHERE train_no = %s", (train_no,))
fare = [Link]()[0]
elif ticket_class == 2:
[Link]("SELECT sl_fare FROM train_schedule WHERE train_no = %s", (train_no,))
fare = [Link]()[0]
elif ticket_class == 3:
[Link]("SELECT gen_fare FROM train_schedule WHERE train_no = %s", (train_no,))
fare = [Link]()[0]
[Link]("INSERT INTO booked_tickets (pnr_no, user_id, train_no, customer_name, age, gender, fare,
status) VALUES (%s, %s, %s, %s, %s, %s, %s, %s)",
(pnr_no, user_id, train_no, customer_name, age, gender, fare, status))
[Link]()
print(f"Ticket booked successfully! Your PNR number is {pnr_no}. Total fare: {fare}")
[Link]()
# Cancel ticket
def cancel_ticket(user_id):
dbo = create_db_connection()
co = [Link]()
pnr_no = int(input("Enter PNR number to cancel: "))
SSCE/RAILWAY MANAGEMENT/CS-PROJECT/2024-25 14 | P a g e
[Link]("SELECT * FROM booked_tickets WHERE pnr_no = %s AND user_id = %s",
. (pnr_no, user_id))
. . .
ticket = [Link]()
if ticket:
[Link]("DELETE FROM booked_tickets WHERE pnr_no = %s", (pnr_no,))
[Link]()
print("Ticket cancelled successfully.")
else:
print("Invalid PNR number or the ticket is not booked by you.")
[Link]()
print("Admin Panel")
print("1. Add new train")
print("2. View all trains")
choice = int(input("Enter your choice: "))
if choice == 1:
train_no = int(input("Enter Train No: "))
train_name = input("Enter Train Name: ")
origin = input("Enter Origin: ")
destination = input("Enter Destination: ")
distance = int(input("Enter Distance: "))
time = input("Enter Journey Time: ")
ac_fare = int(input("Enter AC Fare: "))
sl_fare = int(input("Enter SL Fare: "))
gen_fare = int(input("Enter GEN Fare: "))
days_available = input("Enter Days Available: ")
. journey_time, ac_fare, sl_fare, gen_fare, days_available) VALUES (%s, %s, %s, %s, %s, %s, %s, %s,
. %s, %s)",(train_no, train_name, origin, destination, distance, time, ac_fare, sl_fare, gen_fare,
… . . .. . .. . . .. . .
. days_available))
[Link]()
print("Train added successfully!")
elif choice == 2:
[Link]("SELECT * FROM train_schedule")
trains = [Link]()
print(tabulate(trains, headers=["Train No", "Train Name", "Origin", "Destination", "Distance",
. "Time", "AC Fare", "SL Fare", "GEN Fare", "Days Available"]))
[Link]()
if choice == 1:
user_id = login_user()
if user_id:
while True:
print("1. Search Trains")
print("2. Book Ticket")
print("3. Cancel Ticket")
print("4. Logout")
user_choice = int(input("Enter your choice: "))
if user_choice == 1:
search_trains()
elif user_choice == 2:
book_ticket(user_id)
elif user_choice == 3:
cancel_ticket(user_id)
elif user_choice == 4:
break
else:
print("Invalid choice!")
elif choice == 2:
new_user()
elif choice == 3:
admin_password = input("Enter admin password: ")
if admin_password == "admin123":
admin_panel()
else:
print("Incorrect admin password.")
elif choice == 4:
print("Exiting system.")
break
else:
print("Invalid choice!")
SSCE/RAILWAY MANAGEMENT/CS-PROJECT/2024-25 16 | P a g e
Output
SSCE/RAILWAY MANAGEMENT/CS-PROJECT/2024-25 17 | P a g e
SSCE/RAILWAY MANAGEMENT/CS-PROJECT/2024-25 18 | P a g e
SSCE/RAILWAY MANAGEMENT/CS-PROJECT/2024-25 19 | P a g e
SSCE/RAILWAY MANAGEMENT/CS-PROJECT/2024-25 20 | P a g e
SSCE/RAILWAY MANAGEMENT/CS-PROJECT/2024-25 21 | P a g e
SSCE/RAILWAY MANAGEMENT/CS-PROJECT/2024-25 22 | P a g e
Testing Methodology
To ensure the Railway Management System’s reliability and efficiency, a robust testing
strategy was implemented. The approach combined various testing methods to cover all
aspects of the system:
1. Black-Box Testing:
• Focused on validating system outputs for different user inputs.
• Ensured that features like new user registration and ticket booking worked as
intended.
2. White-Box Testing:
• Evaluated the internal logic and workflows of the system.
• Identified and resolved issues in the code to enhance reliability.
3. Performance Testing:
• Assessed the system’s ability to handle multiple users and large datasets.
• Verified that response times remained within acceptable limits.
4. Security Testing:
• Tested data encryption and access control mechanisms to ensure
confidentiality.
• Simulated potential cyber threats to evaluate the system’s resilience.
Test Scenarios:
• Ensuring smooth data retrieval for users and train records.
• Simulating concurrent user actions to test system stability.
• Evaluating the impact of incorrect inputs and unexpected user behavior.
This comprehensive testing methodology guaranteed a stable, secure, and user-friendly
system.
SSCE/RAILWAY MANAGEMENT/CS-PROJECT/2024-25 23 | P a g e
Hardware and Software Requirements
Hardware Requirements:
Software Requirements:
SSCE/RAILWAY MANAGEMENT/CS-PROJECT/2024-25 24 | P a g e
Bibliography
1. Computer science With Python - Class XI By: Sumita Arora
2. Computer science With Python - Class XII By: Sumita Arora
3. Official Python Documentation: [Link]
4. MySQL Developer Guide: [Link]
5. chatGPT
SSCE/RAILWAY MANAGEMENT/CS-PROJECT/2024-25 25 | P a g e
SSCE/RAILWAY MANAGEMENT/CS-PROJECT/2024-25 26 | P a g e