Java Report - Final
Java Report - Final
Bus Reservation and Ticketing System is a simple console based application in Java.
The feature of this simple application includes adding passengers record, billing and viewing
total records. In order to add a passenger, the user has to provide passenger’s name,
destination, number of passengers and discount number. Other features include viewing
available destination records, billings. This whole system is not built with the help of
Netbeans IDE.
There’s no external database connectivity in this simple project. For billings, he/she
has to enter passenger’s name. Then the system displays all the informations of the passenger
such as name, destination, fare price, number of passengers and discount amount. It also
shows the total fare amount and the user has to provide the amount to pay. To view records,
the user can simply provide passenger’s name which will display each and every information
including total fare price with paid amount, change and status.
*Project Overview*
The Online Bus Reservation System project aims to design and develop a user-
friendly and efficient web-based application that allows users to search for buses, reserve
seats, and pay for tickets online. The system will provide real-time bus schedule and seat
availability, ensuring a smooth and hassle-free booking experience.
1
*Problem Statement*
The existing manual bus reservation system has several limitations, including:
The Online Bus Reservation System project seeks to address these limitations by
providing a comprehensive and user-friendly online platform for bus ticket booking, thereby
enhancing the overall travel experience for customers.
2
Chapter 2 – Features
Here are the features of an Online Bus Reservation System project using Advanced Java Swing
in detail:
- Users can register with their name, email, password, and contact information
- Users can log in using their email and password
- Passwords are encrypted for secure storage
- Users can reserve seats by selecting the bus and seat numbers
- Users can cancel reservations before the departure time
- Seat availability is updated in real-time
4. Payment Processing
- Users can pay for reservations using a secure payment gateway (e.g. PayPal, Stripe)
- Payment details are encrypted for secure transmission
- Payment confirmation is sent to the user’s email
6. Administrator Dashboard
- MySQL or Oracle Database is used for storing bus schedules, routes, and reservations
- JDBC (Java Database Connectivity) is used for interacting with the database
- Java Swing components are used for the graphical user interface (GUI)
- GUI features include buttons, labels, text fields, tables, and combo boxes
These features provide a comprehensive online bus reservation system with advanced Java
Swing and database management.
4
Chapter 3 – Objective
The main purpose of this study is to automate the manual procedures of reserving a bus
ticket for any journey made through Imo Transport Company (ITC). This system is
said to be an automatic system and customers can select seats by themselves.
Specifically, objectives of this project will consist of:
i) Providing a web-based bus ticket reservation function where a customer can buy
bus ticket through the online system without a need to queue up at the counter to
purchase a bus ticket.
iii) Easing bus ticket payment by obtaining a bank pin after payments is made to the
various designated banks.
v) Admin user privileges in updating and canceling payment, route and vehicle
records
5
6
7
Chapter 4 – Components of the project
Here are the components of an Online Bus Reservation System project using Advanced Java Swing
in detail:
- Column names: “Bus Number”, “Departure Time”, “Arrival Time”, “Fare”, “Available Seats”
- Row data: bus schedule information
8
5. JPanel (Reservation Panel)
- Text: ticket details (bus number, seat number, departure time, arrival time, fare)
9
- Text: “Email Ticket”
- Title: “Loents:
- JLabel (email): “Email:”
- JTextField (email): email address
- JLabel (password): “Password:”
- JPasswordField (password): password
- JButton (login): “Login”
- Title: “Register”
- Components:
- JLabel (name): “Name:”
- JTextField (name): name
- JLabel (email): “Email:”
- JTextField (email): email address
- JLabel (password): “Password:”
- JPasswordField (password): password
- JButton (register): “Register”
10
Chapter 5–Advantages and Disadvantages
Here are the advantages and disadvantages of an Online Bus Reservation System
project using Advanced Java Swing:
Advantages:
1. Convenience: Users can book bus tickets online from anywhere, at any time.
2. Easy to use: User-friendly interface makes it easy for users to navigate and book tickets.
7. Better customer service: Provides a better customer experience through quick and easy
booking.
Disadvantages:
1. Technical issues: Technical problems can occur, such as server downtime or payment
gateway issues.
3. Security risks: Online transactions can be vulnerable to cyber attacks and data breaches.
5. Limited accessibility: Not all users may have access to the internet or be comfortable
using online systems.
7. Upfront costs: Requires upfront costs for development, deployment, and maintenance.
9. Support: Requires ongoing support to address user issues and technical problems.
10. Competition: May face competition from other online bus reservation systems.
By understanding these advantages and disadvantages, you can better plan and develop your
Online Bus Reservation System project using Advanced Java Swing.
12
Chapter 5 – Data Flow Diagram (DFD)
data flow diagram (DFD) is a graphical representation of the “flow” of data through an
information system, modeling its process aspects. A DFD shows what kind of information will be input
to and output from the system, where the data will come from and go to, and where the data will be
stored.
The development of DFD’S is done in several levels. Each process in lower level diagrams
can be broken down into a more detailed DFD in the next level. The Top-level diagram is often called
context diagram. It consist a single process bit, which plays vital role in studying the current system. The
process in the context level diagram is exploded into other process at the first level DFD. Figures to
shows a data flow diagram about the system. Level 0
13
14
Chapter 6 – Usecase Diagram
15
Chapter 7- source code
Import javax.swing.*;
Import java.awt.*;
Import java.awt.event.*;
Import java.util.ArrayList;
Import java.util.HashMap;
Import java.util.Map;
Public EnhancedBusReservationSystem() {
// Initialize bus data
Buses.add(new Bus(101, “Mumbai”, 40, 500, “10:30 AM”));
Buses.add(new Bus(102, “Pune”, 35, 450, “12:00 PM”));
Buses.add(new Bus(103, “Nashik”, 45, 400, “1:30 PM”));
Buses.add(new Bus(104, “Aurangabad”, 30, 550, “3:00 PM”));
// Frame settings
setTitle(“Enhanced Bus Reservation System”);
setSize(800, 600);
setDefaultCloseOperation(EXIT_ON_CLOSE);
setLocationRelativeTo(null);
// Creating Tabs
tabPane = new JTabbedPane();
// Login Panel
JPanel loginPanel = new JPanel(new GridLayout(4, 2, 5, 5));
JLabel usernameLabel = new JLabel(“Username:”);
userNameField = new JTextField(15);
JLabel fullNameLabel = new JLabel(“Full Name:”);
fullNameField = new JTextField(15);
JLabel phoneLabel = new JLabel(“Phone:”);
phoneField = new JTextField(15);
JButton loginButton = new JButton(“Login/Register”);
loginButton.addActionListener(e -> loginUser());
loginPanel.add(usernameLabel);
loginPanel.add(userNameField);
loginPanel.add(fullNameLabel);
loginPanel.add(fullNameField);
loginPanel.add(phoneLabel);
loginPanel.add(phoneField);
loginPanel.add(new JLabel(“”));
loginPanel.add(loginButton);
tabPane.add(“Login/Register”, loginPanel);
18
// Reservation Panel
JPanel reservationPanel = new JPanel(new BorderLayout());
welcomeLabel = new JLabel(“Welcome! Please log in to make
reservations.”);
reservationPanel.add(welcomeLabel, BorderLayout.NORTH);
reservationOptionsPanel.add(busNumberLabel);
reservationOptionsPanel.add(busNumberField);
reservationOptionsPanel.add(new JLabel(“Destination:”));
reservationOptionsPanel.add(destinationCombo);
reservationOptionsPanel.add(sortCombo);
reservationOptionsPanel.add(searchButton);
reservationOptionsPanel.add(reserveButton);
reservationOptionsPanel.add(seatSelectionButton);
reservationOptionsPanel.add(viewHistoryButton);
reservationPanel.add(reservationOptionsPanel,
BorderLayout.CENTER);
add(tabPane);
}
22
Chapter 6 – Conclusion
It can be observed that computer applications are very important in every field of
human endeavor. Here all the information about customer that made reservation can be gotten
just by clicking a button with this new system, some of the difficulties encountered with
the manual system are overcome.
It will also reduce the workload of the staff, reduce the time used for making
reservation at the bus terminal and also increase efficiency. The application also has the ability
to update records in various files automatically thereby relieving the company’s staff the
stress of working .
23
Chapter 7 – Reference
We were discussed about are project and from it we were searched over are syllabus. From the syllabus and
from internet we collected some information about are project
● REFERENCE :-
1.https://github.com/topics/bus-reservation-system
2.https://www.codeproject.com/
***
24