0% found this document useful (0 votes)
66 views66 pages

Airline Management System 1

The document is a project report on the 'Airline Management System' submitted by Ritika Rawat for the Bachelor of Computer Application degree at Uttaranchal University. It outlines the objectives, system analysis, design, and implementation details of a Java-based software application aimed at automating airline operations such as flight scheduling, ticket booking, and passenger management. The report emphasizes the need for a centralized, user-friendly system to enhance operational efficiency and customer experience in the airline industry.

Uploaded by

ritika4404
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
66 views66 pages

Airline Management System 1

The document is a project report on the 'Airline Management System' submitted by Ritika Rawat for the Bachelor of Computer Application degree at Uttaranchal University. It outlines the objectives, system analysis, design, and implementation details of a Java-based software application aimed at automating airline operations such as flight scheduling, ticket booking, and passenger management. The report emphasizes the need for a centralized, user-friendly system to enhance operational efficiency and customer experience in the airline industry.

Uploaded by

ritika4404
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 66

PROJECT REPORT

ON
“ AIRLINE MANAGEMENT SYSYTEM”

Submitted in the Partial Fulfillment for the Award of Degree

Bachelor of Computer Application(BCA)

UTTARANCHAL UNIVERSITY

SESSION 2024 – 2025

Under the Supervision of Submitted By


Faculty Name : Mr. Dharmendra Kumar Ritika Rawat
Uttaranchal School of Computing Sciences (USCS) BCA 4TH Semester
UU2309000282

ACKNOWLEDGEMENT

The most awaited moment of any endeavor is successful completion, but nothing can be done
successfully if done alone. Success is the outcome of the contribution and consistent help of
various persons and we thank those who helped us in the successful completion of this project.

Primarily I would like to thank Prof. (Dr) Sonal Sharma, Director of USCS for providing a
healthy and encouraging cumetto study.

I profusely thankful to the department of computing Science, and Dr. Sameer Dev Sharma,
HOD, and my Project Mentor Mr.Dharmendar kumar.He has been generous enough to provide
me an opportunity and accepting my candidature for the most valuable guidance and affordable
treatment given to us at every stage to boost my morale

Date Ritika Rawat

UU2209000282
DECLARATION

I hereby declare that the project report titled “AIRLINE MANAGEMENT SYSTEM” is
submitted by Ritika Rawat to “Uttaranchal School of computing sciences”. The project was
done under the guidance of Mr Dharmendra Kumar . I further declare that the work reported in
this project has not been submitted and will not be submitted, either in part or in full, for the
award of any other degree or diploma in this university or any other university or institute

Date Ritika Rawat


UU2209000282
CERTIFICATE OF ORIGINALITY

This is to certify that the project entitled “AIRLINE MANAGEMENT SYSTEM” by Ritika
Rawat for the award of the degree of Bachelor of computer applications from Uttaranchal
University, Dehradun. The results embodied in this project have not been submitted to any
other University or Institution for the record of any degree

Under the guidance of:


Mr.Dharmendra kumar
Assistant Professor
USCS Uttaranchal University Dehradun
TABLE OF CONTENT

S.no TOPIC

1. ACKNOWLEDGMENT 2

2. DECLARATION 3

3. CERTIFICATE OF ORIGINALITY 4

4. INTRODUCTION 5

5. OBJECTIVE 6

6. SYSTEM ANALYSIS 7

• EXISTING SYSTEM
• PRPOSED SYSTEM 8
• HARDWARE REQUIREMENT 9
• SOFTWARE REQUIREMENT 10

7. SYSTEM DESIGN 11

● Logical design 11-12


● Database design 13-15
8. Flowchart 16

9. DATA FLOW DIAGRAM 17-18

10 ERD(Entity relationship diagram) 19

11 ● Coding backend implementation 20-21


● Coding frontened implementation 22-57

12 screenshots 58-63

13 Future scope 64

14 conclusion 65

15 bibliography 66
INTRODUCTION

The Airline Management System is a Java-based software application.

● It is developed to automate and streamline airline operations.


● Handles core functionalities, including:
o Flight scheduling
o Ticket booking and reservation
o Passenger check-in and boarding
o Crew and staff management
o Report generation and data analysis
● Ensures:
o High performance
o System reliability
o Scalability for future expansion

Airline Management System involves the administration of airports and airlines. Includes
strategic planning and management of operations related to:

● Airport functioning
● Airline services
● Commercial and operational priorities

Covers a broad overview of the airline industry and its key functions.

Also recognized as a branch of study that focuses on:

● Managing airline and airport operations


● Understanding market dynamics and financial structures
● Operational planning and logistics
Aims to create awareness about:

● Airline marketing strategies


● Financial management
● Operational procedures
● Aircraft selection criteria
● Impact of airport-related decisions

Helps airlines by providing partial automation in their management systems.

Enhances business efficiency through digital and streamlined processes.

Improves the customer experience, becoming an added attraction for potential customers.
OBJECTIVE
● The main objective of the Airline Management System is to automate and
streamline the core operations of an airline, such as flight scheduling, ticket
booking, passenger check-in, and staff management, thereby reducing the reliance on
manual processes.
● It aims to minimize human errors and ensure accuracy in data processing by
providing a reliable and consistent system that handles complex operations through
automated workflows.
● The system is designed to act as a centralized platform that integrates all
departments, enabling efficient communication and real-time data sharing among
administrators, airline staff, and passengers.
● One of the key goals is to enhance the operational efficiency of the airline by
reducing response time, improving coordination, and optimizing resource usage such
as aircrafts, crew members, and gates.
● The project seeks to offer a user-friendly and intuitive interface to ensure that all
types of users—whether technical or non-technical—can easily navigate the system
and perform necessary tasks without confusion or delay.
● It also focuses on improving the customer experience by allowing passengers to
check flight availability, book tickets online, receive notifications, and perform
check-ins digitally, thereby increasing customer satisfaction.
● Another objective is to ensure data security and controlled access by implementing
secure login systems, role-based permissions, and encrypted transactions to protect
sensitive information related to passengers, flights, and operations.
● The system should also support report generation and analytics, providing airline
management with insights into operations, finances, and customer behavior, helping
them make informed and strategic business decisions.
● Finally, the system reflects the airline’s commitment to embracing new
technologies, showcasing a modern and progressive attitude that can serve as an
added advantage in attracting tech-savvy customers and staying competitive in the
aviation market.
● Flight scheduling
● Ticket booking and cancellation
● Passenger check-in
● Crew and aircraft management
● Report generation
● To enhance the efficiency of airline operations through faster processing and real-
time updates.
● To offer a user-friendly interface for different users including administrators, staff,
and customers.
● To improve customer experience by enabling online bookings, updates, and digital
check-in services.

SYSTEM ANALYSIS

EXISTING SYSTEM

● Many airline operations are still manual or semi-automated, leading to inefficiencies


and errors.
● Ticket booking and cancellations often lack integration, causing delays and data
mismatch.
● Flight scheduling and crew management are handled in disconnected systems, leading
to poor coordination.
● Passenger information is stored in separate databases, reducing consistency and real-
time access.
● Real-time updates for flights and operations are often unavailable or delayed.
● Limited automation for customers, with poor support for online check-in, ticketing, and
self-service.
● Security issues due to outdated access control and data protection methods.
● Reporting and analytics features are basic and do not support strategic decision-making.
● Existing systems are often not scalable for growing airline needs.
● Overall, current systems are inefficient, outdated, and unable to meet modern
demands.
PROPOSED SYSTEM

● A fully automated Airline Management System built using Java for enhanced
performance and portability.
● Provides a centralized platform for managing flights, bookings, check-ins, staff, and
reports.
● Supports real-time updates for flight schedules, availability, and passenger information.
● Offers user-friendly interfaces for admins, staff, and customers.
● Enables online ticket booking, cancellation, and check-in, improving customer
convenience.
● Ensures data security and role-based access control for safe operations.
● Integrates flight scheduling, crew assignment, and aircraft management into a single
system.
● Generates detailed reports for management insights and decision-making.
● Designed with MVC architecture, making the system modular, scalable, and easy to
maintain.
● Reflects a modern and tech-savvy approach, adapting to digital transformation in the
aviation industry.
HARDWARE AND SOFTWARE

Hardware Requirements:
Processor: Intel i3 or equivalent (minimum)

RAM: 4 GB (minimum), 8 GB or more (recommended)

Storage: 100 MB for the SQLite database and application files

Display: Standard monitor for user interface (optional)

Input Devices: Keyboard and mouse for data input

Operating System: Windows, macOS, or Linux (any system capable of running Python)

Software Requirements:
Java JDK 8 or above – Core programming language

Java Swing / JavaFX – For GUI development

JDBC – For database connectivity

MySQL – Database management system

Eclipse / IntelliJ / NetBeans – Java IDEs

Apache Tomcat – Web server (if web-based)


HTML, CSS, JavaScript – For web-based frontend (optional)

Servlets & JSP – For server-side logic (if web-based)

Windows / Linux / macOS – Supported operating systems

SYSTEM DESIGN

LOGICAL DESIGN

1. Actors

● Admin/User — interacts with the GUI.

🔹 2. Main Modules / Screens

1. Login Screen
2. Home Screen
3. Details Module
4. Tickets Module

🔹 3. Processes & Subsystems


Module Processes / Actions Description

- Submit
Login - Reset Validate credentials, reset input fields, or exit program.
- Close

- Navigate to Details or
Home Page Main control hub after successful login.
Tickets
Module Processes / Actions Description

- Add Customer
- Flight Details
Manages core operations like booking, managing flights, and
Details - Book Flights
customers.
- Journey Details
- Cancel Ticket

Tickets - Generate Boarding Pass Displays ticket data retrieved by PNR number.

🔹 4. Entities / Logical Data Components


Entity Attributes (Examples)

Admin Username, Password

Customer Name, Nationality, Gender, Address, Phone

Flight Flight Code, Flight Name, Source, Destination, Date

Reservation PNR, Flight Code, Customer ID, Booking Date, Status

Boarding Pass PNR, Customer Info, Flight Info, Date

5. Logical Flow Description

[Admin]
|
v
[Login Screen]
|
+--> Submit --> Validate Admin → Success → [Home Screen]
| |
| +--> Failure → Show Error
|
+--> Reset --> Clear username/password fields
+--> Close --> Exit system
|
v
[Home Screen]
|
+--> [Details Module]
| |
| +--> Add Customer
| +--> Flight Details
| +--> Book Flights
| +--> Journey Details
| +--> Cancel Ticket
|
+--> [Tickets Module]
|
+--> Boarding Pass (fetch by PNR)

DATABASE DESIGN

1. admin Table

Used for login authentication.

Column Data Type Constraints


Name
username VARCHAR(50) PRIMARY KEY

password VARCHAR(100) NOT NULL

2. customer Table
Column Name Data Type Constraints

id INT PRIMARY KEY, AUTO_INCREMENT

name VARCHAR(100) NOT NULL

nationality VARCHAR(50)

gender VARCHAR(10)

address VARCHAR(255)

phone VARCHAR(15)
🔹 3. flight Table
Column Name Data Type Constraints

flightcode VARCHAR(20) PRIMARY KEY

flightname VARCHAR(100) NOT NULL

source VARCHAR(50) NOT NULL

destination VARCHAR(50) NOT NULL

ddate DATE NOT NULL

🔹 4. reservation Table
Column Name Data Type Constraints

pnr VARCHAR(20) PRIMARY KEY

customer_id INT FOREIGN KEY → customer(id)

flightcode VARCHAR(20) FOREIGN KEY → flight(flightcode)

booking_date DATE NOT NULL

status VARCHAR(20) e.g., Booked / Cancelled

🔹 5. journey Table
Column Name Data Type Constraints

journey_id INT PRIMARY KEY, AUTO_INCREMENT

pnr VARCHAR(20) FOREIGN KEY → reservation(pnr)

seat_no VARCHAR(10)

travel_class VARCHAR(20) e.g., Economy, Business

gate VARCHAR(10)
🔹 6. boarding_pass Table (optional, or could be generated from reservation +
flight + customer)
Column Name Data Type Constraints

pass_id INT PRIMARY KEY, AUTO_INCREMENT

pnr VARCHAR(20) FOREIGN KEY → reservation(pnr)

issue_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP

🔹 Relationships Overview

● One admin logs in — not connected to other entities.


● One customer can have many reservations.
● One reservation is linked to one flight.
● One journey is tied to one reservation.
● A boarding pass is linked to one reservation.

🧩 Optional Enhancements

● Add email, passport_no in customer


● Add fare, duration, airline in flight
● Use ENUM types or lookup tables for values like status, gender, travel_class.

.
FLOWCHART
DATA FLOW DIAGRAM
DFD Level 0

Admin

[1] Login Page (Submit)

| Home Page |

| Details | | Tickets |

Level 1 Data Flow Diagram


ERD (Entity-Relationship Diagram)
Backend Implementation

MYSQL

MySQL is an open-source relational database management system (RDBMS). A relational


database organizes data into one or more data tables in which data types may be related to each
other; these relations help structure the data. SQL is a language programmers use to create, modify
and extract data from the relational database, as well as control user access to the database. In
addition to relational databases and SQL, an RDBMS like MySQL works with an operating system
to implement a relational database in a computer's storage system, manages users, allows for
network access and facilitates testing database integrity and creation of backups.

Table cancellation:

create table cancellation(pnr_no varchar(10), cancellation_no varchar(10), cancellation_date


DATE, fli_code varchar(15));

Table flight:

create table flight(f_code varchar(10), f_name varchar(20), src varchar(30), dst varchar(30));

Table login:

create table login(username varchar(20), password varchar(20));

Table passenger:

create table passenger(pnr_no varchar(10), address varchar(30), nationality varchar(15), name


varchar(20), gender varchar(10), ph_no varchar(15), passport_no varchar(20), fl_code
varchar(10));

Table payment:

create table payment(pnr_no varchar(10), ph_no varchar(15), cheque_no varchar(15), card_no


varchar(20), paid_amt varchar(10), pay_date DATE);

Table reservation:
create table reservation(pnr_no varchar(10), ticket_id varchar(10), f_code varchar(10), jny_date
DATE, jny_time varchar(10), src varchar(20), dst varchar(20));

Table sector:

create table sector(flight_code varchar(20), capacity varchar(10), class_code varchar(5),


class_name varchar(20));

Frontend Implementation
Java Core

Core Java is the part of Java programming language that is used for creating or developing a
general-purpose application. It uses only one tier architecture that is why it is called as ‘stand
alone’ application.Core java programming covers the swings, socket, awt, thread concept,
collection object and classess.

Swings

Swing is a GUI widget toolkit for Java. It is part of Oracle's Java Foundation Classes (JFC) – an
API for providing a graphical user interface (GUI) for Java programs.

Swing provides a look and feel that emulates the look and feel of several platforms, and also
supports a pluggable look and feel that allows applications to have a look and feel unrelated to the
underlying platform. It has more powerful and flexible components than AWT. In addition to
familiar components such as buttons, check boxes and labels, Swing provides several advanced
components such as tabbed panel, scroll panes, trees, tables, and lists.

1.Login Page
package airline;

/**

* @author ritik

*/

import javax.swing.*;

import java.awt.*;

import java.awt.event.*;

import java.sql.*;

public class login extends JFrame implements ActionListener{

JButton reset,submit,close;

JTextField tfusername;

JPasswordField tfpassword;

public login(){

getContentPane().setBackground(Color.WHITE);

setLayout(null);

JLabel lblusername =new JLabel("Username");

lblusername.setBounds(20,20,100,20);

add(lblusername);

tfusername=new JTextField();
tfusername.setBounds(130,20,200,20);

add(tfusername);

JLabel lblpassword =new JLabel("Password");

lblpassword.setBounds(20,60,100,20);

add(lblpassword);

tfpassword=new JPasswordField();

tfpassword.setBounds(130,60,200,20);

add(tfpassword);

reset=new JButton("Reset");

reset.setBounds(40,120,120,20);

reset.addActionListener(this);

add(reset);

submit=new JButton("submit");

submit.setBounds(190,120,120,20);

submit.addActionListener(this);

add(submit);

close=new JButton("close");

close.setBounds(120,160,120,20);
close.addActionListener(this);

add(close);

setSize(400,250);

setLocation(500,250);

setVisible(true);

public void actionPerformed(ActionEvent ae){

if(ae.getSource() == submit){

String username= tfusername.getText();

String password= tfpassword.getText();

try{

conn c=new conn();

String query="select*from login where username ='"+username+"' and password =


'"+password+"'";

ResultSet rs = c.s.executeQuery(query);

if(rs.next()){

new Home();

setVisible(false);

}else{

JOptionPane.showMessageDialog(null, "inavlid username and password");

setVisible(false);
}

}catch(Exception e){

e.printStackTrace();

else if(ae.getSource() == close){

setVisible(false);

else if(ae.getSource() == reset){

tfusername.setText("");

tfpassword.setText ("");

public static void main(String[]args){

new login();

2.home page
package airline;

/**
*
* @author ritik
*/
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.sql.*;

public class Home extends JFrame implements ActionListener{

public Home(){

setLayout(null);

ImageIcon i1= new


ImageIcon(ClassLoader.getSystemResource("airline/icons/front.jpg"));
JLabel image =new JLabel(i1);
image.setBounds(0,0,1400,700);
add(image);

JLabel heading =new JLabel("**Air india welcomes you**");


heading.setBounds(450,30,1000,40);
heading.setForeground(Color.BLUE);
heading.setFont(new Font("Tahoma", Font.PLAIN, 36));
image.add(heading);

JMenuBar menubar =new JMenuBar();


setJMenuBar(menubar);

JMenu details =new JMenu("Details");


menubar.add(details);

JMenuItem flightDetails= new JMenuItem("flight details");


flightDetails.addActionListener(this);
details.add(flightDetails);
JMenuItem customerDetails= new JMenuItem("add customer details");
customerDetails.addActionListener(this);
details.add(customerDetails);

JMenuItem bookflight = new JMenuItem("book flights");


bookflight.addActionListener(this);
details.add(bookflight);

JMenuItem journeydetails = new JMenuItem("journey details");


journeydetails.addActionListener(this);
details.add(journeydetails);

JMenuItem ticketCancellation= new JMenuItem("Ticket cancelation");


ticketCancellation.addActionListener(this);
details.add(ticketCancellation);

JMenu ticket =new JMenu("Tickets");


menubar.add(ticket);

JMenuItem boardingpass = new JMenuItem("Boarding pass");


boardingpass.addActionListener(this);
ticket.add(boardingpass);

setExtendedState(JFrame.MAXIMIZED_BOTH);

setVisible(true);
}
public void actionPerformed(ActionEvent ae){
String text =ae.getActionCommand();

if(text.equals("add customer details")){


new addcustomer();
}else if (text.equals("flight details")){
new flightinfo();
} else if(text.equals("book flights"))
{
new bookflight();
}else if (text.equals("journey details")){
new journeydetails();
}else if (text.equals("cancel ticket")){
new cancel();
}else if (text.equals("Boarding pass")){

new Boardingpass();
}

}
public static void main(String[]args){
new Home();
}
}

3. Add customer page


package airline;

/**
*
* @author ritik
*
*/
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;

public class addcustomer extends JFrame implements ActionListener{

JTextField tfname,tfPhone,tfadhaar,tfnationality,tfaddress;
JRadioButton rbmale,rbfemale;
public addcustomer(){
getContentPane().setBackground(Color.WHITE);
setLayout(null);
JLabel heading= new JLabel("Add Customer Details");
heading.setBounds(300,20,500,35);
heading.setFont(new Font("Tahoma", Font.PLAIN,32));
heading.setForeground(Color.BLUE);
add(heading);

JLabel lblname= new JLabel("Name");


lblname.setBounds(60,80,150,25);
lblname.setFont(new Font("Tahoma", Font.PLAIN,16));
add( lblname);

tfname= new JTextField();


tfname.setBounds(220,80,150,25);
add(tfname);

JLabel lbladdress= new JLabel("Address");


lbladdress.setBounds(60,230,150,25);
lbladdress.setFont(new Font("Tahoma", Font.PLAIN,16));
add( lbladdress);
tfaddress= new JTextField();
tfaddress.setBounds(220,230,150,25);
add(tfaddress);

JLabel lblnationality= new JLabel("Nationality");


lblnationality.setBounds(60,130,150,25);
lblnationality.setFont(new Font("Tahoma", Font.PLAIN,16));
add( lblnationality);

tfnationality= new JTextField();


tfnationality.setBounds(220,130,150,25);
add(tfnationality);

JLabel lblPhone= new JLabel("Phone");


lblPhone.setBounds(60,330,150,25);
lblPhone.setFont(new Font("Tahoma", Font.PLAIN,16));
add( lblPhone);

tfPhone= new JTextField();


tfPhone.setBounds(220,330,150,25);
add(tfPhone);

JLabel lbladhaar= new JLabel("Aadhar number");


lbladhaar.setBounds(60,180,150,25);
lbladhaar.setFont(new Font("Tahoma", Font.PLAIN,16));
add( lbladhaar);

tfadhaar= new JTextField();


tfadhaar.setBounds(220,180,150,25);
add(tfadhaar);

JLabel lblgender= new JLabel("Gender");


lblgender.setBounds(60,280,150,25);
lblgender.setFont(new Font("Tahoma", Font.PLAIN,16));
add( lblgender);

ButtonGroup gendergroup =new ButtonGroup();


rbmale= new JRadioButton("Male");
rbmale.setBounds(220,280,70,25);
rbmale.setBackground(Color.WHITE);
add(rbmale);

rbfemale= new JRadioButton("Female");


rbfemale.setBounds(300,280,70,25);
rbfemale.setBackground(Color.WHITE);
add(rbfemale);

gendergroup.add(rbmale);
gendergroup.add(rbfemale);

JButton save =new JButton("SAVE");


save.setBackground(Color.BLACK);
save.setForeground(Color.WHITE);
save.setBounds(220,380,150,30);
save.addActionListener(this);
add(save);

ImageIcon image= new


ImageIcon(ClassLoader.getSystemResource("airline/icons/emp.png"));
JLabel lblimage= new JLabel(image);
lblimage.setBounds(450,80,280,400);
add(lblimage);

setSize(900,600);
setLocation(300,150);
setVisible(true);

}
public void actionPerformed(ActionEvent ae){
String name=tfname.getText();
String address=tfaddress.getText();
String nationality=tfnationality.getText();
String phone=tfPhone.getText();
String adhaar=tfadhaar.getText();
String gender= null;
if(rbmale.isSelected()){
gender="male";
}
else{
gender="female";
}

try{
conn c=new conn();
String query="insert into passangers values('"+name+"'
,'"+nationality+"','"+phone+"','"+address+"','"+adhaar+"','"+gender+"')";
c.s.executeUpdate(query);
JOptionPane.showMessageDialog(null, "Customer Details added Successfully");
setVisible(false);
}
catch(Exception e){
e.printStackTrace();
}
}
public static void main(String[]args){
new addcustomer();
}
}

4. flight info
package airline;

/**
*
* @author ritik
*/
import javax.swing.*;
import java.awt.*;
import java.sql.*;
import net.proteanit.sql.DbUtils;

public class flightinfo extends JFrame{


public flightinfo(){
getContentPane().setBackground(Color.WHITE);
setLayout(null);

JTable table= new JTable();

try{
conn conn= new conn();
ResultSet rs= conn.s.executeQuery("select* from flight");
table.setModel(DbUtils.resultSetToTableModel(rs));

}catch(Exception e){
e.printStackTrace();
}
JScrollPane jsp =new JScrollPane(table);
jsp.setBounds(0,0,800,500);
add(jsp);

setSize(800,500);
setLocation(400,200);
setVisible(true);
}

public static void main(String[]args){

new flightinfo();
}
}

5.Book flight page


import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.sql.*;
import com.toedter.calendar.JDateChooser;
import java.util.*;

public class bookflight extends JFrame implements ActionListener{


JLabel tfname,tfnationality,tfaddress,labelgender, labelfname,labelfcode;
JTextField tfadhaar;
JButton bookflight,fetchButton,flight;
Choice source,destination;
JDateChooser dcdate;

public bookflight(){
getContentPane().setBackground(Color.WHITE);
setLayout(null);

JLabel heading= new JLabel("Book flight");


heading.setBounds(420,20,500,35);
heading.setFont(new Font("Tahoma", Font.PLAIN,32));
heading.setForeground(Color.BLUE);
add(heading);

JLabel lbladhaar= new JLabel("Aadhar number");


lbladhaar.setBounds(60,80,150,25);
lbladhaar.setFont(new Font("Tahoma", Font.PLAIN,16));
add( lbladhaar);

tfadhaar= new JTextField();


tfadhaar.setBounds(220,80,150,25);
add(tfadhaar);

fetchButton =new JButton("fetch User");


fetchButton.setBackground(Color.BLACK);
fetchButton.setForeground(Color.WHITE);
fetchButton.setBounds(380,80,120,25);
fetchButton.addActionListener(this);
add(fetchButton);

JLabel lblname= new JLabel("Name");


lblname.setBounds(60,130,150,25);
lblname.setFont(new Font("Tahoma", Font.PLAIN,16));
add( lblname);

tfname= new JLabel();


tfname.setBounds(220,130,150,25);
add(tfname);

JLabel lblnationality= new JLabel("Nationality");


lblnationality.setBounds(60,180,150,25);
lblnationality.setFont(new Font("Tahoma", Font.PLAIN,16));
add( lblnationality);

tfnationality= new JLabel();


tfnationality.setBounds(220,180,150,25);
add(tfnationality);

JLabel lbladdress= new JLabel("Address");


lbladdress.setBounds(60,230,150,25);
lbladdress.setFont(new Font("Tahoma", Font.PLAIN,16));
add( lbladdress);

tfaddress= new JLabel();


tfaddress.setBounds(220,230,150,25);
add(tfaddress);

JLabel lblgender= new JLabel("Gender");


lblgender.setBounds(60,280,150,25);
lblgender.setFont(new Font("Tahoma", Font.PLAIN,16));
add( lblgender);

labelgender= new JLabel("Gender");


labelgender.setBounds(220,280,150,25);
add( labelgender);

JLabel lblsource= new JLabel("Source");


lblsource.setBounds(60,330,150,25);
lblsource.setFont(new Font("Tahoma", Font.PLAIN,16));
add( lblsource);

source= new Choice();


source.setBounds(220, 330,120, 25);
add(source);

JLabel lbldest= new JLabel("Destination");


lbldest.setBounds(60,380,150,25);
lbldest.setFont(new Font("Tahoma", Font.PLAIN,16));
add( lbldest);

destination= new Choice();


destination.setBounds(220, 380,120, 25);
add(destination);

try{
conn c= new conn();
String query="select *from flight";
ResultSet rs= c.s.executeQuery(query);

while(rs.next()){
source.add(rs.getString("source"));
destination.add(rs.getString("destination"));
}
}catch(Exception e){
e.printStackTrace();
}
flight =new JButton("Fetch Flights");
flight.setBackground(Color.BLACK);
flight.setForeground(Color.WHITE);
flight.setBounds(380,380,120,25);
flight.addActionListener(this);
add(flight);
JLabel lblfname= new JLabel("Flight Name");
lblfname.setBounds(60,430,150,25);
lblfname.setFont(new Font("Tahoma", Font.PLAIN,16));
add( lblfname);

labelfname= new JLabel();


labelfname.setBounds(220,430,150,25);
add(labelfname);

JLabel lblfcode= new JLabel("Flight Code");


lblfcode.setBounds(60,480,150,25);
lblfcode.setFont(new Font("Tahoma", Font.PLAIN,16));
add( lblfcode);

labelfcode= new JLabel();


labelfcode.setBounds(220,480,150,25);
add(labelfcode);

JLabel lbldate= new JLabel("Date of travel");


lbldate.setBounds(60,530,150,25);
lbldate.setFont(new Font("Tahoma", Font.PLAIN,16));
add( lbldate);

dcdate= new JDateChooser();


dcdate.setBounds(220,530,150,25);
add( dcdate);

ImageIcon i1= new


ImageIcon(ClassLoader.getSystemResource("airline/icons/details.jpg"));
Image i2=i1.getImage().getScaledInstance(450, 320, Image.SCALE_DEFAULT);
ImageIcon image=new ImageIcon(i2);
JLabel lblimage= new JLabel(image);
lblimage.setBounds(550,80,500,410);
add(lblimage);

bookflight =new JButton("Book Flights");


bookflight.setBackground(Color.BLACK);
bookflight.setForeground(Color.WHITE);
bookflight.setBounds(220,580,120,25);
bookflight.addActionListener(this);
add(bookflight);

setSize(1100,700);
setLocation(200,50);
setVisible(true);

}
public void actionPerformed(ActionEvent ae){
if(ae.getSource()==fetchButton){

String adhaar=tfadhaar.getText();

try{
conn conn=new conn();
String query="select * from passangers where adhaar = '"+adhaar+"'";

ResultSet rs = conn.s.executeQuery(query);

if(rs.next()){
tfname.setText(rs.getString("name"));
tfnationality.setText(rs.getString("nationality"));
tfaddress.setText(rs.getString("address"));
labelgender.setText(rs.getString("gender"));
}else{

JOptionPane.showMessageDialog(null, "please enter correct aadhar");


}

}
catch(Exception e){
e.printStackTrace();
}
}else
{
if(ae.getSource()==flight){
String src=source.getSelectedItem();
String dest=destination.getSelectedItem();

try{
conn conn=new conn();
String query="select * from flight where source= '"+src+"' and destination
='"+dest+"'";

ResultSet rs = conn.s.executeQuery(query);

if(rs.next()){
labelfname.setText(rs.getString("f_name"));
labelfcode.setText(rs.getString("f_code"));

}else{

JOptionPane.showMessageDialog(null, "No flights found");


}

}
catch(Exception e){
e.printStackTrace();
}
}else{
Random random = new Random();

String adhaar= tfadhaar.getText();


String name= tfname.getText();
String nationality= tfnationality.getText();
String flightname =labelfname.getText();
String flightcode=labelfcode.getText();
String src=source.getSelectedItem();
String dest=destination.getSelectedItem();
String ddate=
((JTextField)dcdate.getDateEditor().getUiComponent()).getText();

try{
conn conn=new conn();
String pnr = "PNR-" + random.nextInt(1000000);
String ticket = "TIC-" + random.nextInt(10000);

String query = "insert into reservation values('" + pnr + "', '" + ticket + "', '" +
adhaar + "', '" + name + "', '" + nationality + "', '" + flightname + "', '" + flightcode +
"', '" + src + "', '" + dest + "', '" + ddate + "')";

conn.s.executeUpdate(query);

JOptionPane.showMessageDialog(null, " Ticket Booked successfully");

setVisible(false);
}
catch(Exception e){
e.printStackTrace();
}
}

}
}
public static void main(String[]args){
new bookflight();
}
}
6.Journey detail page
package airline;

/**
*
* @author ritik
*/
import javax.swing.*;
import java.awt.*;
import java.sql.*;
import net.proteanit.sql.DbUtils;
import java.awt.event.*;

public class journeydetails extends JFrame implements ActionListener{


JTable table;
JTextField pnr;
JButton show;
public journeydetails(){
getContentPane().setBackground(Color.WHITE);
setLayout(null);

JLabel lblpnr =new JLabel("PNR details");


lblpnr.setFont(new Font("Tahoma",Font.PLAIN,16));
lblpnr.setBounds(50,50, 100, 25);
add( lblpnr);

pnr=new JTextField();
pnr.setBounds(160,50,120,25);
add(pnr);

show =new JButton("Show Details");


show.setBackground(Color.BLACK);
show.setForeground(Color.WHITE);
show.setBounds(290,50,120,25);
show.addActionListener(this);
add(show);
table= new JTable();

JScrollPane jsp =new JScrollPane(table);


jsp.setBounds(0,100,800,150);
jsp.setBackground(Color.WHITE);
add(jsp);

setSize(800,500);
setLocation(400,150);
setVisible(true);
}
public void actionPerformed(ActionEvent ae){
try{
conn conn=new conn();
ResultSet rs= conn.s.executeQuery("Select * from reservation where
PNR='"+pnr.getText()+"'");
if(!rs.isBeforeFirst()){
JOptionPane.showMessageDialog(null,"no information found");
return;
}
table .setModel (DbUtils.resultSetToTableModel(rs));
}catch(Exception e){
e.printStackTrace();
}
}
public static void main(String[]args){

new journeydetails();
}
}
7.Cancel page

package airline;

/**
*
* @author ritik
*/
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.sql.*;
import java.util.*;

public class cancel extends JFrame implements ActionListener{


JLabel tfname,Cancellationno,lblfcode,lbldateoftravel;
JTextField tfpnr;
JButton fetchButton,flight;

public cancel(){
getContentPane().setBackground(Color.WHITE);
setLayout(null);

Random random= new Random();

JLabel heading= new JLabel("Cancellation");

heading.setBounds(180,20,250,35);
heading.setFont(new Font("Tahoma", Font.PLAIN,32));
heading.setForeground(Color.BLUE);
add(heading);

ImageIcon i3=new
ImageIcon(ClassLoader.getSystemResource("airline/icons/cancel.jpg"));
Image i4=i3.getImage().getScaledInstance(450, 320, Image.SCALE_DEFAULT);
ImageIcon i5=new ImageIcon(i4);
JLabel image =new JLabel(i5);
image.setBounds(470, 120,250, 250);
add(image);

JLabel lbladhaar= new JLabel("PNR number");


lbladhaar.setBounds(60,80,150,25);
lbladhaar.setFont(new Font("Tahoma", Font.PLAIN,16));
add( lbladhaar);

tfpnr= new JTextField();


tfpnr.setBounds(220,80,150,25);
add(tfpnr);

fetchButton =new JButton("Show details");


fetchButton.setBackground(Color.BLACK);
fetchButton.setForeground(Color.WHITE);
fetchButton.setBounds(380,80,120,25);
fetchButton.addActionListener(this);
add(fetchButton);

JLabel lblname= new JLabel("Name");


lblname.setBounds(60,130,150,25);
lblname.setFont(new Font("Tahoma", Font.PLAIN,16));
add( lblname);

tfname= new JLabel();


tfname.setBounds(220,130,150,25);
add(tfname);

JLabel lblnationality= new JLabel("Cancellation no.");


lblnationality.setBounds(60,180,150,25);
lblnationality.setFont(new Font("Tahoma", Font.PLAIN,16));
add( lblnationality);

Cancellationno= new JLabel(""+random.nextInt(1000000));


Cancellationno.setBounds(220,180,150,25);
add(Cancellationno);

JLabel lbladdress= new JLabel("flight Code");


lbladdress.setBounds(60,230,150,25);
lbladdress.setFont(new Font("Tahoma", Font.PLAIN,16));
add( lbladdress);

lblfcode = new JLabel();


lblfcode.setBounds(220,230,150,25);
add(lblfcode);

JLabel lblgender= new JLabel("Date");


lblgender.setBounds(60,280,150,25);
lblgender.setFont(new Font("Tahoma", Font.PLAIN,16));
add( lblgender);

lbldateoftravel= new JLabel("Gender");


lbldateoftravel.setBounds(220,280,150,25);
add( lbldateoftravel);

flight =new JButton("Cancel");


flight.setBackground(Color.BLACK);
flight.setForeground(Color.WHITE);
flight.setBounds(220,380,120,25);
flight.addActionListener(this);
add(flight);

setSize(800,450);
setLocation(350,100);
setVisible(true);

}
public void actionPerformed(ActionEvent ae){
if(ae.getSource()==fetchButton){
String pnr=tfpnr.getText();

try{
conn conn=new conn();
String query="select * from reservation where PNR= '"+pnr+"'";

ResultSet rs = conn.s.executeQuery(query);

if(rs.next()){
tfname.setText(rs.getString("name"));
lblfcode.setText(rs.getString("nationality"));
lbldateoftravel.setText(rs.getString("ddate"));

}else{

JOptionPane.showMessageDialog(null, "please enter correct PNR");


}

}
catch(Exception e){
e.printStackTrace();
}
}else
{
if(ae.getSource()==flight){

String name=tfname.getText();
String pnr=tfpnr.getText();
String cancelno= Cancellationno.getText();
String fcode= lblfcode.getText();
String date= lbldateoftravel.getText();
try{
conn conn=new conn();
String query="insert into cancel values ( '"+pnr+"'
,'"+name+"','"+cancelno+"','"+fcode+"','"+date+"')";

conn.s.executeUpdate(query);
conn.s.executeUpdate("delete from reservation where PNR='"+pnr+"'");

JOptionPane.showMessageDialog(null, "Ticket Cancelled");


setVisible(false);

}
catch(Exception e){
e.printStackTrace();
}
}

}
}
public static void main(String[]args){
new cancel();
}
}

8.Boarding pass page


package airline;

/**
*
* @author ritik
*/
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.sql.*;

import java.util.*;

public class Boardingpass extends JFrame implements ActionListener{


JLabel tfname,tfnationality, lblsrc,lbldest, labelfname,labeldate,labelfcode;
JTextField tfpnr;
JButton fetchButton;

public Boardingpass(){
getContentPane().setBackground(Color.WHITE);
setLayout(null);

JLabel heading= new JLabel("AIR INDIA");


heading.setBounds(380,10,450,35);
heading.setFont(new Font("Tahoma", Font.PLAIN,32));
add(heading);

JLabel subheading= new JLabel("Boarding pass");


subheading.setBounds(360,50,300,30);
subheading.setFont(new Font("Tahoma", Font.PLAIN,24));
subheading.setForeground(Color.BLUE);
add(subheading);

JLabel lbladhaar= new JLabel("PNR Details");


lbladhaar.setBounds(60,100,150,25);
lbladhaar.setFont(new Font("Tahoma", Font.PLAIN,16));
add( lbladhaar);

tfpnr= new JTextField();


tfpnr.setBounds(220,100,150,25);
add(tfpnr);

fetchButton =new JButton("ENTER");


fetchButton.setBackground(Color.BLACK);
fetchButton.setForeground(Color.WHITE);
fetchButton.setBounds(380,100,120,25);
fetchButton.addActionListener(this);
add(fetchButton);

JLabel lblname= new JLabel("NAME");


lblname.setBounds(60,140,150,25);
lblname.setFont(new Font("Tahoma", Font.PLAIN,16));
add( lblname);

tfname= new JLabel();


tfname.setBounds(220,140,150,25);
add(tfname);

JLabel lblnationality= new JLabel("NATIONALITY");


lblnationality.setBounds(60,180,150,25);
lblnationality.setFont(new Font("Tahoma", Font.PLAIN,16));
add( lblnationality);

tfnationality= new JLabel();


tfnationality.setBounds(220,180,150,25);
add(tfnationality);

JLabel lbladdress= new JLabel("SRC");


lbladdress.setBounds(60,220,150,25);
lbladdress.setFont(new Font("Tahoma", Font.PLAIN,16));
add( lbladdress);
lblsrc= new JLabel();
lblsrc.setBounds(220,220,150,25);
add(lblsrc);

JLabel lblgender= new JLabel("DEST");


lblgender.setBounds(380,220,150,25);
lblgender.setFont(new Font("Tahoma", Font.PLAIN,16));
add( lblgender);

lbldest= new JLabel();


lbldest.setBounds(220,280,150,25);
add( lbldest);

JLabel lblfname= new JLabel("Flight Name");


lblfname.setBounds(60,260,150,25);
lblfname.setFont(new Font("Tahoma", Font.PLAIN,16));
add( lblfname);

labelfname= new JLabel();


labelfname.setBounds(220,260,150,25);
add(labelfname);

JLabel lblfcode= new JLabel("Flight Code");


lblfcode.setBounds(380,260,150,25);
lblfcode.setFont(new Font("Tahoma", Font.PLAIN,16));
add( lblfcode);

labelfcode= new JLabel();


labelfcode.setBounds(540,260,150,25);
add(labelfcode);

JLabel lbldate= new JLabel("Date ");


lbldate.setBounds(60,300,150,25);
lbldate.setFont(new Font("Tahoma", Font.PLAIN,16));
add( lbldate);
labeldate= new JLabel();
labeldate.setBounds(220,300,150,25);
add(labeldate );

ImageIcon i1= new


ImageIcon(ClassLoader.getSystemResource("airline/icons/airindia.png"));
Image i2=i1.getImage().getScaledInstance(300, 230, Image.SCALE_DEFAULT);
ImageIcon image=new ImageIcon(i2);
JLabel lblimage= new JLabel(image);
lblimage.setBounds(600,80,300,300);
add(lblimage);

setSize(1000,450);
setLocation(300,150);
setVisible(true);

}
public void actionPerformed(ActionEvent ae){

String pnr=tfpnr.getText();

try{
conn conn=new conn();
String query="select * from reservation where PNR = '"+pnr+"'";

ResultSet rs = conn.s.executeQuery(query);

if(rs.next()){
tfname.setText(rs.getString("name"));
tfnationality.setText(rs.getString("nationality"));
lblsrc.setText(rs.getString("src"));
lbldest.setText(rs.getString("des"));
labelfname.setText(rs.getString("flightname"));
labelfcode.setText(rs.getString("flightcode"));
labeldate.setText(rs.getString("ddate"));

}else{

JOptionPane.showMessageDialog(null, "please enter correct PNR");


}

}
catch(Exception e){
e.printStackTrace();
}

}
public static void main(String[]args){
new Boardingpass();
}
}

9. Connection code
This code connects the database to the all java code

package airline;

/**
*
* @author ritik
*/
import java.sql.*;

public class conn {

Connection c;
Statement s;
public conn(){
try{
Class.forName("com.mysql.cj.jdbc.Driver");
c =DriverManager.getConnection("jdbc:mysql:///airlinemanagment",
"root","1234");
s= c.createStatement();
}catch(Exception e){
e.printStackTrace();
}
}
}

Output screenshots
Login page

Home page

Drop down menu


Flight info

Add customer details


Book flights

Journey details
Ticket cancellation

Boarding pass
FUTURE SCOPE
1. Integration with Payment Gateway
o Add secure online payment features for booking flights via credit/debit cards,
UPI, or net banking.
2. Real-time Flight Tracking
o Integrate APIs to show real-time flight status, delays, gate changes, or
cancellations.
3. Multi-role Access
o Implement different user roles (Admin, Customer Support, User) with role-
specific dashboards and access rights.
4. Mobile App Development
o Develop Android/iOS apps to allow customers to book and manage tickets on the
go.
5. Email & SMS Notifications
o Send booking confirmations, cancellation notices, and journey reminders via
email/SMS.
6. Customer Feedback System
o Allow users to rate flights and provide feedback for service improvement.
7. Loyalty Program
o Introduce a frequent flyer program with reward points, discounts, and offers.
8. Multi-language Support
o Make the application usable in multiple languages to support international users.
9. Data Analytics & Reporting
o Use analytics to track bookings, customer behavior, and generate admin reports
for better decision-making.
10. AI Chatbot Integration

● Add a virtual assistant to answer customer queries instantly.

CONCLUSION
This project on Airline Management System is the automation of registration process of
airline system. The system is able to provide much information like passenger’s details, flight
details and the booking details. The system allows us to add records when a passenger reserves a
ticket. It also allows to delete and update the records based on passenger’s requirements. This
project has guided our path through various aspects of computer science where developing online
application plays a major role.

Bibliography
● Http://www.tutorial.com

● http://www.wikipedia.com

● https://developers.openshift.com/database/mysql.html

● Web References- https://youtu.be/UbIIFLsEeiM

You might also like