1.
Introduction
About the project:
Train Ticket Reservation System is a web-based application designed to book, cancel,
and manage train tickets online from Git-Hub(Open-Source project)
It offers :-
[Link] for passengers to view schedules and book tickets.
[Link] for managing train data, fares, and seat availability.
Language and Platform
Language: Java
Used for backend development with Servlets, JDBC, and DAO pattern.
Platform: Web
Runs on IDE;s, and connects to SQL for data management.
Frontend Technologies: HTML, CSS, Bootstrap for UI.
Purpose of the Analysis
Solves a Practical Problem: Automates the traditionally manual and time-consuming
process of booking train tickets, improving user convenience and operational efficiency.
Learning Opportunity: Involves object oriented programming concepts like
Encapsulation, polymorphism, Inheritance, Interface [Link] this we learned how oop
is used for real world problem solving.
[Link] of the System
Main Components of the System
The Train Ticket Reservation System is divided into several functional modules to
ensure clarity.
User Module:
[Link] passengers to search for trains, check availability, book/cancel tickets etc.
[Link] history to manage user login/logout and preserve booking history.
Admin Module:
[Link] access to train management features: add/update/delete trains, modify
fares and seat info, and monitor bookings.
[Link] authentication ensures restricted access to management functions.
Train Management Module:
[Link] operations for train records.
[Link] to the database to store and retrieve train-related data.
Enhances user experience with a clean layout and structured navigation.
Uses of OOP(Object Oriented Programming):
Encapsulation:
In class Train, User, and Booking maximum fields are private and exposed
by getter/setter method where needed.
Interface:
Implementation details are hidden behind interface methods, which means clean
abstraction is included.
Inheritance:
Common behavior for servlets(http servlets) and utility classes is reused to
reduce repetition.
Polymorphism:
Interfaces define consistent methods (e.g., addTrain(), getTrainList()),
which are used in different classes where [Link] enhances flexibility for
modifying database operations.
Abstraction:
Interfaces and abstract classes hide actions like train insertion or booking validation
without revealing inside data from the user and admin.
3. OOP Principles in this project
Principle Explanation in the System
The system models using Java classes like Train, User,
and Booking. Each class defines attributes and behaviors,
Class & Object and objects represent instances.
Example: Train t = new Train
("Express","Dhaka","Rajshahi",250,500.0);
Fields in classes are declared private, exposing data
through public getters and setters methods. This protects
Encapsulation internal data and ensures controlled data manipulation.
Example: getTrainName(), setFare() methods in the
Train class.
Servlets like AdminAddTrain extend HttpServlet class,
inheriting web request methods like doPost() and
Inheritance doGet().
Achieved via method overriding in servlets (e.g.
doPost(),doGet()), and overloading constructors or
Polymorphism methods in many classes for flexible behavior based on
needs.
Interfaces like Serializable define methods without
Abstraction implementation.
Classes are grouped logically into packages such as beans,,
servlets, and utility, enabling separation of concerns
Modularity and easier maintenance. Each module handles a specific
task.
Design Pattern Observation:
Note to be noted:
As the project is real world so one page is not enough for the UML [Link] link is off the
whole diagram.
Diagram Link: [Link]
Reflection:
1. OOP is used well in this project—it keeps things organized, makes the code
reusable, and separates responsibilities clearly. The structure is clean, flexible,
and easy to maintain.
2. The Project has some limitations there they can add features like:
[Link] payment.
[Link] Ticket instant download.
[Link] Selection before payment.
[Link] time Train Location.
3. It helps keep the system flexible and future-ready. They can add new features or
make fixes without disturbing the rest of the code—everything stays neat,
manageable, and easy to grow.
Learning from this activity:
Through this activity, we learned how to apply OOP principles in a real-world system. It
helped us understand how classes, interfaces, and design patterns work together to
create clean, modular code. By exploring the UML and project structure. Overall, it gave
us valuable hands-on experience that increased our understanding of software
development.