0% found this document useful (0 votes)
14 views41 pages

varun

Uploaded by

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

varun

Uploaded by

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

MICRO-PROJECT INDEX

Index

Sr. Conte Page


No nt No
Annexure I-Micro Project
Proposal
1. Name with Roll No. 2
2. Problem Statement. 3
3. Literature Review. 3
4. Aims/Benefits of the Micro-Project. 3
5. Course Outcome Addressed. 4
6. Proposed Methodology/Solution. 4
7. Resources Required (Software/Hardware). 4
8. Action Plan. 5
9. References. 5

Annexure I-Micro Project


Proposal
1. Rationale 7
2. Aims/Benefits of the Micro-Project. 8
3. Course Outcome Achieved. 9
4. Actual Methodology Followed. 9
5. Skills Developed. 10
6. Actual Resources Used. 10
7. Source Code 11
8. Outputs of Micro-Project. 12
9. Learning out of this Micro-Project. 25
10. Applications of this Micro-project. 25
11. Future Scope. 26
12. Literature Review. 26
LATTHE EDUCATION SOCITY’S POLYTECHNIC,
SANGLI

DEPARTMENT OF COMPUTER

ENGINEERING MICRO PROJECT PROPOSAL

SUBJECT: Advance Java Programming(AJP).

TITLE: Travel And Tour Management System.

SUBMITTED BY:

Roll Number Name Enrollment Number

233210 Varun Annasaheb 2100430085


Sawant
PROBLEM STATEMENT
● Creating a Travel And Tour Management System Windows Application using Java
Programming.

LITERATURE REVIEW

Java is a high-level, class-based, object-oriented programming language that is


designed to have as few implementation dependencies as possible. It is a general- purpose
programming language intended to let programmers write once, run anywhere
(WORA), meaning that compiled Java code can run on all platforms that support Java
without the need to recompile.
In this project I will work on Tarvel and Tour Management System Windows
Application which takes account users personal information and will be stored in database.
Also there will be the option to view account details , view the information, update the
information and delete the information on the registration window which will be done using
buttons.
For this project I will need a computer system which has Intel i5 or later processor
along with minimum 4/8 GB RAM with windows 7 or later versions. I will use the Visual
Studio for Java Development.

AIM OF THE MICRO-PROJECT

 Customer Management: Allow users to manage customer data, including details such as
name, address, contact information, and unique customer identifiers.
 Selecting packages: Enable users to select the different package according to their need
for each customer. This can be done by just selecting the book packages option from
dashboard.

 Selecting Hotel: : Enable users to select the different package according to their need
for each customer. This can be done by just selecting the packages from package class.
 Bill Calculation: Overall, the aim of this project is to allow the user to create the account in
application and select the packages ,hotels and other travelling facilities such as added food
and the quality of service etc. Based on all the services selected by the user and the no of
peoples travelling the bill is calculated during the billing all the selected services are on
the bill.
INTENDED COURSE OUTCOMES

 Technical Proficiency
 Software Development
 Database Management
 User Authentication and Authorization
 GUI Development:

PROPOSED METHODOLOGY

We have created the Travel and Tour Management Systemby following steps some of the steps are
as follows:
1. We have designed the user interface of Travel and Tour management by using
various Java swing components like Buttons, Labels, Textboxes, Combo Boxes, etc.
2. Then we used CSS for adding a better look and feel to the web pages.

3. Then we have designed the Various Windows projects such as Login page, Signup
page, Main dashboard page, hotel selecting page, package selecting page etc.
4. After that, we have developed the program logic by writing the necessary code to
perform calculations and store data in the database.
5. Then we have tested the program by executing all the possible scenarios and
making sure it works properly and there is no error.

RESOURCES REQUIRED
Sr. Name of Resource / Specification Rema
No. Material rk
1 Computer System with Intel Core I5 and 1
. broad later RAM 8GB,
specifications. Windows 11 and
later versions.
2 Software Visual Studio for 1
. Java development

3 Any other resources Laser printer 1


. used HP LaserJet Pro
P1566
Printer.
ACTION PLAN

Sr. Details of Plan Planne Name of


No. Activity Start d finish responsible
Date date
team members

1 Discussion and finalization Varun Sawant


. of topic.

2 Preparation and submission Varun Sawant


. of project proposal.

3 Planning layout of Varun Sawant


. micro project.

4 Content Preparation. Varun Sawant


.

5 Discussion about Varun Sawant


. required
resources.

6 Correction Varun Sawant


. and
implementatio
n.
7 Seminar. Varun Sawant
.

8 Final Submission of Varun Sawant


. micro- project.
REFERENCES

TO build our project we took the from following links and books such as:
1. The AJP book we can refer to and name of this book is tech max.
In this book we understood how to use Java swing components, database connection and all.
2. We can visit the following
websites
https://copyassignment.com/tarvel-
tour -management-system-project-
in-java/#google_vignette
From this website we understood the concept of Travel Management
System. : https://www.educba.com
From this website we take the knowledge about GUI development using java swing
components.
LATTHE EDUCATION SOCITY’S POLYTECHNIC,
SANGLI

DEPARTMENT OF COMPUTER

ENGINEERING MICRO PROJECT REPORT

SUBJECT: Advance Java Programming(AJP).

TITLE: Travel And Tour Management System.

SUBMITTED BY:

Name Enrollment Number


Roll Number
233210 Samarth Suresh Mhetre 2100430085
RATIONALE

The rationale for developing an "Travel and Tour Management System in Advanced
Java" project is multifaceted and based on several key factors, each of which contributes to
the importance and relevance of the project. Below are the primary rationales for undertaking
this project:
In summary, the rationale for developing an "Travel and Tour Management System in
Advanced Java" project is grounded in the pursuit of operational efficiency, customer
satisfaction, data management, and compliance with regulations. This project not only
enhances the user response to the website but also contributes to a more efficient, customer-
centric, and environmentally responsible approach to Travel management and data
management.

NEED OF THIS SYSTEM


A travel and tour management system is essential for various reasons, especially for businesses
operating in the travel and tourism industry. Here are some of the key needs and benefits of such a
system:

Reservation and Booking Management: A travel and tour management system allows customers
to make reservations and bookings for flights, hotels, tours, and other travel-related services. This
streamlines the booking process and ensures accurate and up-to-date availability.

Customer Convenience: It provides customers with a user-friendly platform to plan and book
their trips online, which is convenient and accessible 24/7. This can lead to increased customer
satisfaction and loyalty.

Inventory Management: For travel agencies and tour operators, managing the inventory of
available services (e.g., hotel rooms, airline seats, tour slots) is crucial. The system helps in
tracking and updating inventory in real-time.

Payment Processing: The system facilitates secure payment processing, allowing customers to
pay for their bookings online. It can support multiple payment methods, making it convenient for
a diverse range of customers.

Cost Efficiency: It reduces the administrative burden by automating tasks such as booking
confirmation, invoice generation, and financial reporting. This can lead to cost savings for travel
businesses.

Customer Relationship Management (CRM): A travel and tour management system can store
customer data and interactions, allowing travel businesses to provide personalized services a
build long-term relationships with clients.
Marketing and Promotion: It can help in marketing and promoting travel packages and services,
sending out newsletters, and offering discounts or promotions to attract more customers.

Reporting and Analytics: The system generates reports and analytics on various aspects of the
business, helping companies make data-driven decisions and understand market trends.

Resource Allocation: For tour operators, it helps in managing resources such as vehicles, guides,
and equipment efficiently. This ensures that tours are well-organized and meet customer
expectations.

Compliance and Regulation: Travel and tourism are subject to various regulations and
compliance requirements. A management system can help businesses stay in compliance with
relevant laws and regulations.

This system may include following functionalities:


i. Registering new users.
Allows the new customer to create their new account with username and password.
ii. User Authentication and Authorization:
User login and password based access control to ensure security and data
privacy.
iii. Customer Management:
Allows users to check their account details and can delete them also.
iv. Selecting the required process from the dashboard:
Allow the customer to selecting the menu from the dashboard.
v. Slide show of Hotels:
Allow the customer to see the hotels via the slideshow of the hotels for
booking.
vi. Bill Calculation:
Calculate electricity bills based on meter readings, tariff rates, and any
applicable taxes or fees.
vii. Invoice Generation:
Generate electronic or printable invoices in PDF format for customers
viii. User Interface:
Designed an interactive interface for users to interact with the system
easily.
AIM OF THE MICRO PROJECT

• The aim of a micro project to create an "Travel and Tour Management Systemin
Advanced Java" could be a more focused objective within a larger course or a shorter
project with specific goals. Here's an example of the aim for a micro project of this
nature:
To develop a functional prototype of an Travel and Tour Management Systemin Advanced
Java that calculates bills based on Hotel and Package selcted rates.
Java is a high-level, class-based, object-oriented programming language that is designed to have as
few implementation dependencies as possible.
It is a general-purpose programming language intended to let programmers write once, run
anywhere (WORA), meaning that compiled Java code can run on all platforms that support
Java without the need to recompile. Java applications are typically compiled to bytecode that
can run on any Java virtual machine (JVM) regardless of the underlying computer
architecture. The syntax of Java is similar to C and C++, but has fewer low-level facilities
than either of them. The Java runtime provides dynamic capabilities (such as reflection and
runtime code modification) that are typically not available in traditional compiled languages.
As of 2019, Java was one of the most popular programming languages in use according to
GitHub, particularly for client–server web applications, with a reported 9 million developers.

INTENTED COURSE OUTCOMES


1) Select suitable software process model for software development.
2) Prepare software requirement specification
3) Use software modelling to create data design.
4) Estimate size and cost of software product.
5) Apply project management and quality assurance principles in software development.
ACTUAL METHODOLOGY FOLLOWED

The actual methodology followed for a micro project to create an "Travel and Tour Management
Systemin Advanced Java" would be more streamlined and focused compared to a full-scale project.
Below is a simplified methodology that outlines the key steps for such a micro project.

i. Project Initiation: Define the scope and objectives of the micro project, which
should include the specific functionalities to be implemented.
ii. Requirements Specification: Clearly outline the requirements for the
system, focusing on essential features, such as selecting packages, selecting
Hotels, bill calculation, and invoice generation.
iii. Java Programming Skills: The project involves using Java programming
language to develop Travel and Tour Management System, which can
help developers enhance their skills in the language.
iv. System Design and Development Skills: The project involves designing
and developing a system from scratch, which can help developers enhance
their skills in software development, including system architecture, database
design, and user interface design.
v. Testing and Quality Assurance Skills: The project involves various testing
methods to ensure the system meets all the requirements and functions as
expected, which can help developers improve their skills in testing and
quality assurance.
vi. Project Management Skills: The project involves managing the
development process from start to finish, which can help developers enhance
their skills in project management, including planning, resource allocation,
and risk management.
vii. Communication and Collaboration Skills: The project involves working
with stakeholders and team members, which can help developers
enhance their communication and collaboration skills.
RESOURCES REQUIRED

Sr. Name of Resource / Material Specification Remark


No.
1 Computer System with broad Intel Core I5 and later 1
. specifications. RAM 8GB, Windows
11 and later versions.
2 Software Visual Studio Code 1
. for Java
development
3 Any other resources used Laser printer HP 1
. LaserJet Pro P1566
Printer.
Source Code
Login Page:

import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.sql.*;
public class login extends JFrame implements lbuser.setBounds(60,50,100,20);
ActionListener { jpl2.add(lbuser);
jtf= new JTextField(50);
JButton jb1,jb2,jb3; jtf.setBounds(60,80,200,25);
JTextField jtf,jtf2; jpl2.add(jtf);
login()
{
setSize(900, 400);
setLocation(350,200); JLabel pass= new JLabel("Password :");
setLayout(null); pass.setBounds(60,110,100,20);
setBounds(0,0,1600,1000); jpl2.add(pass);
setBackground(Color.GRAY); jtf2= new JTextField(50);
jtf2.setBounds(60,130,200,25);
getContentPane().setBackground(Color.GRAY); jpl2.add(jtf2);

JPanel jpl=new JPanel(); jb1= new JButton("Login");


jpl.setBackground(Color.GRAY); jb1.setBounds(70,200,130,20);
jpl.setBounds(0,0,400,400); jb1.setBackground(Color.ORANGE);
jpl.setLayout(null); jb1.addActionListener(this);
add(jpl); jpl2.add(jb1);

ImageIcon i1= new


ImageIcon(ClassLoader.getSystemResource("ico jb2= new JButton("Signup");
ns/login.png")); jb2.setBounds(230,200,130,20);
Image i2= jb2.setBackground(Color.ORANGE);
i1.getImage().getScaledInstance(200, 200, jpl2.add(jb2);
Image.SCALE_DEFAULT) ; jb2.addActionListener(this);
ImageIcon i3=new ImageIcon(i2);
JLabel image= new JLabel(i3);
image.setBounds(90,70,200,200); jb3= new JButton("Forget Password");
jpl.add(image); jb3.setBounds(150,250,130,20);
jb3.setBackground(Color.ORANGE);
JPanel jpl2= new JPanel(); jpl2.add(jb3);
jpl2.setLayout(null); jb3.addActionListener(this);
jpl2.setBackground(Color.LIGHT_GRAY);
jpl2.setBounds(400,30,450,300); JLabel trouble= new JLabel("Trouble in
Login...");
add(jpl2); trouble.setBounds(300, 250, 200, 20);
trouble.setForeground(Color.RED);
JLabel lbuser= new JLabel("Username :"); jpl2.add(trouble);
setVisible(true); }
}; else
{
public static void main(String[] args) { JOptionPane.showMessageDialog(null,
new login(); "Incorrect username or Password");
}
}
@Override }catch(Exception e1)
public void actionPerformed(ActionEvent e) { {
if(e.getSource() == jb1) System.out.println(e1); }
{ }
else if(e.getSource()==jb2)
try{ {
String username= jtf.getText(); setVisible(false);
String password= jtf2.getText(); new signup();
String query="select * from account }
where username ='"+username+"' AND
password='"+password+"'"; else
conn c= new conn(); {
ResultSet rs= c.s.executeQuery(query); new forgetpassword();
if( rs.next()) }
{
setVisible(false); }
new dashboard(username); }

Sign Up Page:

import javax.swing.*; p1.setLayout(null);


import java.awt.*; add(p1);
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener; JLabel l1= new JLabel("Username:");
l1.setBounds(50,20,100,30);
public class signup extends JFrame implements p1.add(l1);
ActionListener{
JButton btsubmit,btback; tf1= new JTextField();
JTextField tfans,tf1,tf2,tf3; tf1.setBounds(170,30,180,20);
Choice security; p1.add(tf1);

signup() JLabel l2= new JLabel("Name:");


{ l2.setBounds(50,60,100,30);
setBounds(350,200,900,360); p1.add(l2);

getContentPane().setBackground(Color.WHITE) tf2= new JTextField();


; tf2.setBounds(170,60,180,20);
setLayout(null); p1.add(tf2);

JPanel p1= new JPanel(); JLabel l3= new JLabel("Password:");


p1.setBackground(new l3.setBounds(50,100,100,30);
Color(133,193,233)); p1.add(l3);
p1.setBounds(0,0,500,400);
tf3= new JTextField(); SCALE_DEFAULT);
tf3.setBounds(170,100,180,20);
p1.add(tf3); ImageIcon i3= new ImageIcon(i2);
JLabel image= new JLabel(i3);
JLabel lsecurity= new JLabel("Security image.setBounds(580,50,250,250);
Question:"); add(image);
lsecurity.setBounds(50,140,125,25);
p1.add(lsecurity); setVisible(true);

security= new Choice(); }


security.add("Fav charachter from Campus public static void main(String[] args) {
Daireies"); new signup();
security.add("Your favorite movie");
security.add("Your favorite car"); }
security.add("Your teacher name"); @Override
security.setBounds(170,140,180,25); public void actionPerformed(ActionEvent e) {
p1.add(security); if(e.getSource()==btsubmit)
{
JLabel lans= new JLabel("Answer:"); String username=tf1.getText();
lans.setBounds(50,180,100,30); String name=tf2.getText();
p1.add(lans); String password=tf3.getText();
String question =security.getSelectedItem();
tfans= new JTextField(); String answer=tfans.getText();
tfans.setBounds(170,180,180,20);
p1.add(tfans); String query="insert into account
values('"+username+"','"+name+"','"+password+
//buttons "','"+question+"','"+answer+"')";
try
btsubmit = new JButton("Submit"); {
btsubmit.setBackground(Color.WHITE); conn c= new conn();
btsubmit.setBounds(80,250,90,20); c.s.executeUpdate(query);
btsubmit.setForeground(new
Color(133,193,233)); JOptionPane.showMessageDialog(null,"Account
p1.add(btsubmit); created successfully");
btsubmit.addActionListener(this); setVisible(false);
new login();
btback = new JButton("Back"); }
btback.setBackground(Color.WHITE); catch(Exception e1)
btback.setBounds(250,250,90,20); {
btback.setForeground(new System.out.println(e1);
Color(133,193,233)); }
p1.add(btback);
btback.addActionListener(this); }
else if(e.getSource()==btback)
//image {
ImageIcon i1= new setVisible(true);
ImageIcon(ClassLoader.getSystemResource("ico new login();
ns/signup.png")); }
Image i2= }
i1.getImage().getScaledInstance(250,250,Image.
}
Forgot Password Page:

import java.awt.*; //search button


import javax.swing.*; btsearch= new JButton("Search");
import java.awt.event.*; btsearch.setBounds(380,20,100,25);
import java.sql.*; pl.add(btsearch);
btsearch.addActionListener(this);

import com.mysql.cj.protocol.Resultset; lname= new JLabel("Name");


lname.setBounds(40,60,100,25);
public class forgetpassword extends JFrame lname.setFont(new
implements ActionListener{ Font("Tahoma",Font.BOLD,14));
JPanel pl; pl.add(lname);
ImageIcon i1,i3; ntf= new JTextField();
Image i2; ntf.setBounds(180,60,150,25);
JLabel pl.add(ntf);
image,lblusername,lname,lsque,lans,lpass;
JTextField untf,ntf,ptf,sqtf,anstf,passtf; lsque= new JLabel(" Security Question");
JButton btsearch,btretive,back; lsque.setBounds(30,100,200,25);
forgetpassword() lsque.setFont(new
{//frame Font("Tahoma",Font.BOLD,14));
setBounds(350,200,850,380); pl.add(lsque);
sqtf= new JTextField();
getContentPane().setBackground(Color.WHITE) sqtf.setBounds(180,100,150,25);
; pl.add(sqtf);
setLayout(null); setVisible(true);

//image
i1= new lans= new JLabel(" Answer");
ImageIcon(ClassLoader.getSystemResource("ico lans.setBounds(30,140,200,25);
ns/forgotpassword.jpg")); lans.setFont(new
i2=i1.getImage().getScaledInstance(200, Font("Tahoma",Font.BOLD,14));
200, Image.SCALE_DEFAULT); pl.add(lans);
i3= new ImageIcon(i2); anstf= new JTextField();
image= new JLabel(i3); anstf.setBounds(180,140,150,25);
image.setBounds(580,70,200,200); pl.add(anstf);
add(image);
//panel btretive= new JButton("retrive");
pl = new JPanel(); btretive.setBounds(380,140,100,25);
pl.setLayout(null); pl.add(btretive);
pl.setBounds(30,30,500,280); btretive.addActionListener(this);
add(pl);

lblusername= new JLabel("UserName"); lpass= new JLabel(" Password");


lblusername.setBounds(40,20,100,25); lpass.setBounds(30,180,200,25);
lblusername.setFont(new lpass.setFont(new
Font("Tahoma",Font.BOLD,14)); Font("Tahoma",Font.BOLD,14));
pl.add(lblusername); pl.add(lpass);
untf= new JTextField(); passtf= new JTextField();
untf.setBounds(180,20,150,25); passtf.setBounds(180,180,150,25);
pl.add(untf); pl.add(passtf);
System.out.println(e2);
back= new JButton("Back"); }
back.setBounds(150,230,100,25);
pl.add(back); }else
back.addActionListener(this); {
setVisible(false);
setVisible(true); new login();
}
}
} }

public static void main(String[] args) {


new forgetpassword();
}

@Override
public void actionPerformed(ActionEvent e) {
if(e.getSource()==btsearch)
{
try {
conn c= new conn();
String query="select * from account
where username='"+untf.getText()+"'";
ResultSet rs=c.s.executeQuery(query);
while(rs.next())
{
ntf.setText(rs.getString("name"));
sqtf.setText(rs.getString("security"));

} catch (Exception e1) {


System.out.println(e1);
}

}
else if(e.getSource()==btretive)
{
try {
conn c= new conn();
String query="select * from account
where answer='"+anstf.getText()+"'AND
username='"+untf.getText()+"'";
ResultSet rs=c.s.executeQuery(query);
while(rs.next())
{
passtf.setText(rs.getString("password"));

}
Main Dashboard:
} catch (Exception e2) {
import java.awt.*; add(p2);
import java.awt.event.AWTEventListener;
import java.awt.event.ActionEvent; //button
import java.awt.event.ActionListener; addpers= new JButton("Add personal
Details");
import javax.swing.*; addpers.setBounds(0,0,300,50);
public class dashboard extends JFrame addpers.setBackground(new
implements ActionListener { Color(0,0,102));
String username; addpers.setForeground(Color.WHITE);
addpers.setFont(new
JButton Font("Tahoma",Font.PLAIN,20));
addpers,update,viewper,delper,vbookedhotel,che addpers.setMargin(new Insets(0,0,0,30));
ckpakage,bookpackages,viewpackage,viewhotel, addpers.addActionListener(this);
bookhotel,destinations,payment; p2.add(addpers);
dashboard(String username)
{ update= new JButton("Upadate personal
this.username=username; Details");
setBounds(0,0,1600,1000); update.setBounds(0,50,300,50);
setLayout(null); update.setBackground(new Color(0,0,102));
update.setForeground(Color.WHITE);
JPanel p1= new JPanel(); update.setFont(new
p1.setLayout(null); Font("Tahoma",Font.PLAIN,20));
p1.setBackground(new Color(0,0,102)); update.setMargin(new Insets(0,0,0,30));
p1.setBounds(0,0,1600,65); update.addActionListener(this);
add(p1); p2.add(update);

ImageIcon img1= new viewper= new JButton("View Details");


ImageIcon(ClassLoader.getSystemResource("ico viewper.setBounds(0,100,300,50);
ns/dashboard.png")); viewper.setBackground(new
Image img2= Color(0,0,102));
img1.getImage().getScaledInstance(70, 70, viewper.setForeground(Color.WHITE);
Image.SCALE_DEFAULT); viewper.setFont(new
ImageIcon img3= new ImageIcon(img2); Font("Tahoma",Font.PLAIN,20));
JLabel icon= new JLabel(img3); viewper.setMargin(new Insets(0,0,0,130));
icon.setBounds(5,0,70,70); viewper.addActionListener(this);
p1.add(icon); p2.add(viewper);

JLabel header= new JLabel("DashBoard"); delper= new JButton("Delete personal


header.setBounds(80,10,300,40); Details");
header.setBackground(Color.WHITE); delper.setBounds(0,150,300,50);
header.setFont(new Font("Tahoma", delper.setBackground(new Color(0,0,102));
Font.BOLD,30)); delper.setForeground(Color.WHITE);
p1.add(header); delper.setFont(new
Font("Tahoma",Font.PLAIN,20));
delper.setMargin(new Insets(0,0,0,40));
JPanel p2= new JPanel(); delper.addActionListener(this);
p2.setLayout(null); p2.add(delper);
p2.setBackground(new Color(0,0,102));
p2.setBounds(0,65,300,900); checkpakage= new JButton("Check
Packages");
checkpakage.setBounds(0,200,300,50);
checkpakage.setBackground(new
Color(0,0,102)); bookhotel= new JButton("Book hotels");
bookhotel.setBounds(0,400,300,50);
checkpakage.setForeground(Color.WHITE); bookhotel.setBackground(new
checkpakage.setFont(new Color(0,0,102));
Font("Tahoma",Font.PLAIN,20)); bookhotel.setForeground(Color.WHITE);
checkpakage.setMargin(new bookhotel.setFont(new
Insets(0,0,0,110)); Font("Tahoma",Font.PLAIN,20));
checkpakage.addActionListener(this); bookhotel.setMargin(new
p2.add(checkpakage); Insets(0,0,0,130));
bookhotel.addActionListener(this);
p2.add(bookhotel);
bookpackages= new JButton("Book
Packages");
bookpackages.setBounds(0,250,300,50); vbookedhotel= new JButton(" view Booked
bookpackages.setBackground(new hotels");
Color(0,0,102)); vbookedhotel.setBounds(0,450,350,50);
vbookedhotel.setBackground(new
bookpackages.setForeground(Color.WHITE); Color(0,0,102));
bookpackages.setFont(new
Font("Tahoma",Font.PLAIN,20)); vbookedhotel.setForeground(Color.WHITE);
bookpackages.setMargin(new vbookedhotel.setFont(new
Insets(0,0,0,110)); Font("Tahoma",Font.PLAIN,20));
bookpackages.addActionListener(this); vbookedhotel.setMargin(new
p2.add(bookpackages); Insets(0,0,0,130));
vbookedhotel.addActionListener(this);
viewpackage= new JButton("View p2.add(vbookedhotel);
Packages");
viewpackage.setBounds(0,300,300,50);
viewpackage.setBackground(new destinations= new JButton("Destinations");
Color(0,0,102)); destinations.setBounds(0,500,300,50);
destinations.setBackground(new
viewpackage.setForeground(Color.WHITE); Color(0,0,102));
viewpackage.setFont(new destinations.setForeground(Color.WHITE);
Font("Tahoma",Font.PLAIN,20)); destinations.setFont(new
viewpackage.setMargin(new Font("Tahoma",Font.PLAIN,20));
Insets(0,0,0,110)); destinations.setMargin(new
viewpackage.addActionListener(this); Insets(0,0,0,130));
p2.add(viewpackage); destinations.addActionListener(this);
p2.add(destinations);
viewhotel= new JButton("View Hotels");
viewhotel.setBounds(0,350,300,50); payment= new JButton("Payment");
viewhotel.setBackground(new payment.setBounds(0,550,300,50);
Color(0,0,102)); payment.setBackground(new
viewhotel.setForeground(Color.WHITE); Color(0,0,102));
viewhotel.setFont(new payment.setForeground(Color.WHITE);
Font("Tahoma",Font.PLAIN,20)); payment.setFont(new
viewhotel.setMargin(new Font("Tahoma",Font.PLAIN,20));
Insets(0,0,0,130)); payment.setMargin(new Insets(0,0,0,130));
viewhotel.addActionListener(this); payment.addActionListener(this);
p2.add(viewhotel); p2.add(payment);
ImageIcon img4= new {
ImageIcon(ClassLoader.getSystemResource("ico setVisible(false);
ns/home.jpg")); new bookmypackage(username);
Image img5= }
img4.getImage().getScaledInstance(1650, 1000, else if(e.getSource()==viewpackage)
Image.SCALE_DEFAULT); {
ImageIcon img6= new ImageIcon(img5); setVisible(false);
JLabel image= new JLabel(img6); new viewpackage(username);
image.setBounds(0,0,1650,1000); }
add(image); else if(e.getSource()==viewhotel)
{
JLabel text= new JLabel("Travel and Tour setVisible(false);
Management System"); new viewhotels();
text.setBounds(400,70,1200,70); }
text.setFont(new else if(e.getSource()==destinations)
Font("Raleway",Font.PLAIN,55)); {
text.setForeground(Color.WHITE); setVisible(false);
image.add(text); new viewdestinations();
setVisible(true); }
else if(e.getSource()==bookhotel)
{
} setVisible(false);
public static void main(String[] args) { new bookhotel(username);
new dashboard(""); }
} else if(e.getSource()==vbookedhotel)
{
@Override setVisible(false);
public void actionPerformed(ActionEvent e) { new viewbookedhotel(username);
if(e.getSource()==addpers) }
{ else if(e.getSource()==payment)
setVisible(false); {
new addcustomer(username); setVisible(false);
new payment();
} }
else if(e.getSource()==viewper) else if(e.getSource()==delper)
{ {
setVisible(false); setVisible(false);
new viewcustomer(username); new deletedetails(username);
}
} }
else if(e.getSource()==update) }
{
setVisible(false);
new updatecust(username);
}
else if(e.getSource()==checkpakage)
{
setVisible(false);
new checkpackages();
} Add Customer Details Page:
else if(e.getSource()==bookpackages)
import java.awt.*; add(lbno);
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener; jtf1= new JTextField();
jtf1.setBounds(220,130,150,25);
import javax.swing.*; add(jtf1);
import java.sql.*;

lbname= new JLabel("Name");


public class addcustomer extends JFrame lbname.setBounds(30,170,150,25);
implements ActionListener { add(lbname);

JComboBox comboid;
JRadioButton male,female; txtnm= new JLabel();
JButton btadd,btback; txtnm.setBounds(220,170,150,25);
String username1; add(txtnm);
JLabel setVisible(true);
lblusername,lblid,txtunm,lbname,txtnm,gender,l
blcontry,mobileno;
JTextField jtf1,jtaddress,jtcountry,tfmobile; gender= new JLabel("Gender");
gender.setBounds(30,220,150,25);
addcustomer(String username) add(gender);
{
this.username1=username; male= new JRadioButton("Male" );
setBounds(450,200,900,600); male.setBounds(220,220,100,25);
setLayout(null); add(male);
female= new JRadioButton("FeMale" );
getContentPane().setBackground(Color.WHITE) female.setBounds(320,220,100,25);
; add(female);
ButtonGroup btngr= new ButtonGroup();
lblusername= new JLabel("Userame"); btngr.add(female);
lblusername.setBounds(30,50,150,25); btngr.add(male);
add(lblusername);

lblid= new JLabel("ID"); lblcontry= new JLabel("Country");


lblid.setBounds(30,90,150,25); lblcontry.setBounds(30,260,150,25);
add(lblid); add(lblcontry);

txtunm= new JLabel(); JLabel address= new JLabel("Adress");


txtunm.setBounds(220,50,150,25); address.setBounds(30,300,150,25);
add(txtunm); add(address);

comboid = new JComboBox(new String[] jtcountry= new JTextField();


{"password","AadharCard","Pan Card"}); jtcountry.setBounds(220,260,150,25);
comboid.setBounds(220,90,150,25); add(jtcountry);
comboid.setBackground(Color.white); jtaddress= new JTextField();
add(comboid); jtaddress.setBounds(220,300,150,25);
add(jtaddress);

JLabel lbno= new JLabel("Number"); mobileno= new JLabel("Mobile No");


lbno.setBounds(30,130,150,25);
mobileno.setBounds(30,340,150,25);
add(mobileno);
tfmobile= new JTextField();
tfmobile.setBounds(220,340,150,25); }
add(tfmobile); public static void main(String[] args) {
new addcustomer("");
}
btadd = new JButton("Add"); @Override
btadd.setBounds(70,400,100,25); public void actionPerformed(ActionEvent e) {
btadd.setBackground(Color.BLACK); if(e.getSource() ==btadd)
btadd.setForeground(Color.WHITE); {
btadd.addActionListener(this); String username2= username1;
add(btadd); String id=(String)comboid.getSelectedItem();
String number=jtf1.getText();
btback = new JButton("Back"); String name= txtnm.getText();
btback.setBounds(220,400,100,25); String gend=null;
btback.setBackground(Color.BLACK); if(male.isSelected())
btback.setForeground(Color.WHITE); {
btback.addActionListener(this); gend="Male";
}
add(btback); else
{
gend ="Female";
ImageIcon cimg1= new }
ImageIcon(ClassLoader.getSystemResource("ico String country=jtcountry.getText();
ns/newcustomer.jpg")); String address=jtaddress.getText();
Image String phone= tfmobile.getText();
cimg2=cimg1.getImage().getScaledInstance(420,
530, Image.SCALE_DEFAULT); try {
ImageIcon cimg3=new ImageIcon(cimg2); conn c= new conn();
JLabel cimg4=new JLabel(cimg3); String query="insert into customer values
cimg4.setBounds(420,50,450,500); ('"+username2+"','"+id+"','"+number+"','"+name
add(cimg4); +"','"+gend+"','"+address+"','"+country+"','"+pho
//txtunm.setText("username"); ne+"')";
c.s.executeUpdate(query);
try {
conn c= new conn(); JOptionPane.showMessageDialog(null,"custome
ResultSet rs= c.s.executeQuery("select * from r details added successfully");
account where username='"+username1+"'"); setVisible(false);
while(rs.next()) new dashboard(username2);}
{ catch (Exception e2) {
txtunm.setText(rs.getString("username")); System.out.println(e2);
txtnm.setText(rs.getString("name")); }
} }
else{
setVisible(false);
} catch (Exception e) { }
// TODO: handle exception Delete Customer Details page:
}

setVisible(true); import javax.swing.*;


import java.awt.*;
import java.awt.event.ActionEvent; gender=new JLabel("Gender");
import java.awt.event.ActionListener; gender.setBounds(450,230,150,25);
import java.sql.*; add(gender);
lgender=new JLabel();
public class deletedetails extends JFrame lgender.setBounds(650,230,150,25);
implements ActionListener{ add(lgender);
JButton back ,delete;
String username1; country=new JLabel("Country");
JLabel country.setBounds(450,50,150,25);
usernm,lusernm,id,lid,number,lnumber,name,lna add(country);
me,gender,lgender,country,lcountry,address,ladd lcountry=new JLabel();
res,mobileno,lmobileno; lcountry.setBounds(650,50,150,25);
deletedetails(String username) add(lcountry);
{
this.username1=username; address=new JLabel("Address");
setBounds(450,180,870,625); address.setBounds(450,110,150,25);
getContentPane().setBackground(Color.WHITE) add(address);
; laddres=new JLabel();
setLayout(null); laddres.setBounds(650,110,150,25);
add(laddres);
usernm=new JLabel("Username");
usernm.setBounds(30,50,150,25); mobileno=new JLabel("Phone No");
add(usernm); mobileno.setBounds(450,170,150,25);
lusernm=new JLabel(); add(mobileno);
lusernm.setBounds(220,50,150,25); lmobileno=new JLabel();
add(lusernm); lmobileno.setBounds(650,170,150,25);
add(lmobileno);
id=new JLabel("ID"); back=new JButton("Back");
id.setBounds(30,110,150,25); back.setBackground(Color.BLACK);
add(id); back.setForeground(Color.WHITE);
lid=new JLabel(); back.setBounds(350,350,100,25);
lid.setBounds(220,110,150,25); back.addActionListener(this);
add(lid); add(back);

number=new JLabel("Number"); delete=new JButton("Delete");


number.setBounds(30,170,150,25); delete.setBackground(Color.BLACK);
add(number); delete.setForeground(Color.WHITE);
lnumber=new JLabel(); delete.setBounds(650,350,100,25);
lnumber.setBounds(220,170,150,25); delete.addActionListener(this);
add(lnumber); add(delete);

name=new JLabel("Name"); ImageIcon i1= new


name.setBounds(30,230,150,25); ImageIcon(ClassLoader.getSystemResource("ico
add(name); ns/viewall.jpg"));
lname=new JLabel(); Image i2= i1.getImage().getScaledInstance(600,
lname.setBounds(220,230,150,25); 200, Image.SCALE_DEFAULT);
ImageIcon i3= new ImageIcon(i2);
JLabel i4= new JLabel(i3);
i4.setBounds(20,400,600,200);
add(lname); add(i4);
where username='"+username1+"'");
ImageIcon i5= new c.s.executeUpdate("delete from
ImageIcon(ClassLoader.getSystemResource("ico bookpackages where
ns/viewall.jpg")); username='"+username1+"'");
Image i6= i5.getImage().getScaledInstance(600, c.s.executeUpdate("delete from
200, Image.SCALE_DEFAULT); bookhotel2 where username='"+username1+"'");
ImageIcon i7= new ImageIcon(i6);
JLabel i8= new JLabel(i7);
i8.setBounds(600,400,600,200);
add(i8); JOptionPane.showMessageDialog(null,"data
Deleted Succsessfully");
try { // TODO: handle exception
conn c= new conn(); }
String query="select * from customer where catch(Exception e2){
username ='"+username1+"'"; System.out.print(e2);
ResultSet rs=c.s.executeQuery(query); }
while(rs.next()) new dashboard("");
{
lusernm.setText(rs.getString("username")); }
lid.setText(rs.getString("id")); else{
laddres.setText(rs.getString("address")); setVisible(false );
lgender.setText(rs.getString("gender")); new dashboard(username1);
lname.setText(rs.getString("name")); }
lmobileno.setText(rs.getString("mobile")); }
lnumber.setText(rs.getString("number")); }
lcountry.setText(rs.getString("country"));
setVisible(true);

} catch (Exception e) {
// TODO: handle exception
}
setVisible(true);
}

public static void main(String[] args) {


new viewcustomer("");
}

@Override
public void actionPerformed(ActionEvent e) {
if(e.getSource()==delete)
{
try {
conn c=new conn();
View Details page:
c.s.executeUpdate("delete from account
where username='"+username1+"'"); import javax.swing.*;
c.s.executeUpdate("delete from customer import java.awt.*;
import java.awt.event.ActionEvent; lgender=new JLabel();
import java.awt.event.ActionListener; lgender.setBounds(650,230,150,25);
import java.sql.*; add(lgender);

public class viewcustomer extends JFrame country=new JLabel("Country");


implements ActionListener{ country.setBounds(450,50,150,25);
JButton back; add(country);
String username1; lcountry=new JLabel();
JLabel lcountry.setBounds(650,50,150,25);
usernm,lusernm,id,lid,number,lnumber,name,lna add(lcountry);
me,gender,lgender,country,lcountry,address,ladd
res,mobileno,lmobileno; address=new JLabel("Address");
viewcustomer(String username) address.setBounds(450,110,150,25);
{ add(address);
this.username1=username; laddres=new JLabel();
setBounds(450,180,870,625); laddres.setBounds(650,110,150,25);
getContentPane().setBackground(Color.WHITE) add(laddres);
;
setLayout(null); mobileno=new JLabel("Phone No");
mobileno.setBounds(450,170,150,25);
usernm=new JLabel("Username"); add(mobileno);
usernm.setBounds(30,50,150,25); lmobileno=new JLabel();
add(usernm); lmobileno.setBounds(650,170,150,25);
lusernm=new JLabel(); add(lmobileno);
lusernm.setBounds(220,50,150,25); back=new JButton("Back");
add(lusernm); back.setBackground(Color.BLACK);
back.setForeground(Color.WHITE);
id=new JLabel("ID"); back.setBounds(350,350,100,25);
id.setBounds(30,110,150,25); back.addActionListener(this);
add(id); add(back);
lid=new JLabel();
lid.setBounds(220,110,150,25); ImageIcon i1= new
add(lid); ImageIcon(ClassLoader.getSystemResource("ico
ns/viewall.jpg"));
number=new JLabel("Number"); Image i2= i1.getImage().getScaledInstance(600,
number.setBounds(30,170,150,25); 200, Image.SCALE_DEFAULT);
add(number); ImageIcon i3= new ImageIcon(i2);
lnumber=new JLabel(); JLabel i4= new JLabel(i3);
lnumber.setBounds(220,170,150,25); i4.setBounds(20,400,600,200);
add(lnumber); add(i4);

name=new JLabel("Name"); ImageIcon i5= new


name.setBounds(30,230,150,25); ImageIcon(ClassLoader.getSystemResource("ico
add(name); ns/viewall.jpg"));
lname=new JLabel(); Image i6= i5.getImage().getScaledInstance(600,
lname.setBounds(220,230,150,25); 200, Image.SCALE_DEFAULT);
add(lname); ImageIcon i7= new ImageIcon(i6);
JLabel i8= new JLabel(i7);
gender=new JLabel("Gender"); i8.setBounds(600,400,600,200);
gender.setBounds(450,230,150,25); add(i8);
add(gender);
try {

// String query="select * from customer where


username ='"+username1+"'";
// c=
DriverManager.getConnection("jdbc:mysql:///tra
velmanagementsystem","root","samarth2005");
// s=c.createStatement();
conn c= new conn();
String query="select * from customer where
username ='"+username1+"'";
ResultSet rs=c.s.executeQuery(query);
while(rs.next())
{
lusernm.setText(rs.getString("username"));
lid.setText(rs.getString("id"));
laddres.setText(rs.getString("address"));
lgender.setText(rs.getString("gender"));
lname.setText(rs.getString("name"));
lmobileno.setText(rs.getString("mobile"));
lnumber.setText(rs.getString("number"));
lcountry.setText(rs.getString("country"));
setVisible(true);
}

} catch (Exception e) {
System.out.println(e);
}
setVisible(true);
}

public static void main(String[] args) {


new viewcustomer("");

@Override
public void actionPerformed(ActionEvent e) {
if(e.getSource()==back)
{
setVisible(false):
new dashboard("");

}
}
}

Update Customer Details:

import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
JLabel lbno= new JLabel("Number");
import javax.swing.*; lbno.setBounds(30,130,150,25);
import java.sql.*; add(lbno);

jtf1= new JTextField();


public class updatecust extends JFrame jtf1.setBounds(220,130,150,25);
implements ActionListener { add(jtf1);

JRadioButton male,female; lbname= new JLabel("Name");


JButton btupdate,btback; lbname.setBounds(30,170,150,25);
String username1; add(lbname);
JLabel
lblusername,lblid,lbname,txtnm,gender,lblcontry txtnm= new JLabel();
,mobileno; txtnm.setBounds(220,170,150,25);
JTextField add(txtnm);
jtf1,jtaddress,jtcountry,tfmobile,tfid,tfgen,txtunm
;

updatecust(String username) gender= new JLabel("Gender");


{ gender.setBounds(30,220,150,25);
this.username1=username; add(gender);
setBounds(500,200,850,550);
setLayout(null); tfgen= new JTextField();
tfgen.setBounds(220,220,150,25);
getContentPane().setBackground(Color.WHITE) add(tfgen);
;

JLabel text = new JLabel("UPADTE


CUSTOMER DETAILS"); lblcontry= new JLabel("Country");
text.setBounds(50,0,300,25); lblcontry.setBounds(30,260,150,25);
text.setFont(new add(lblcontry);
Font("Tahoma",Font.PLAIN,20));
add(text); JLabel address= new JLabel("Adress");
address.setBounds(30,300,150,25);
lblusername= new JLabel("Userame"); add(address);
lblusername.setBounds(30,50,150,25);
add(lblusername);
txtunm= new JTextField(); jtcountry= new JTextField();
txtunm.setBounds(220,50,150,25); jtcountry.setBounds(220,260,150,25);
add(txtunm); add(jtcountry);
jtaddress= new JTextField();
lblid= new JLabel("ID"); jtaddress.setBounds(220,300,150,25);
lblid.setBounds(30,90,150,25); add(jtaddress);
add(lblid);

tfid =new JTextField(); mobileno= new JLabel("Mobile No");


tfid.setBounds(220,90,150,25); mobileno.setBounds(30,340,150,25);
add(tfid); add(mobileno);
tfmobile= new JTextField();
tfmobile.setBounds(220,340,150,25);
add(tfmobile); // TODO: handle exception
}

btupdate = new JButton("Update"); setVisible(true);


btupdate.setBounds(70,400,100,25); }
btupdate.setBackground(Color.BLACK); public static void main(String[] args) {
btupdate.setForeground(Color.WHITE); new updatecust("");
btupdate.addActionListener(this); }
add(btupdate); @Override
public void actionPerformed(ActionEvent e) {
btback = new JButton("Back"); if(e.getSource() ==btupdate)
btback.setBounds(220,400,100,25); {
btback.setBackground(Color.BLACK); String username= username1;
btback.setForeground(Color.WHITE); String id=tfid.getText();
btback.addActionListener(this); String number=jtf1.getText();
String name= txtnm.getText();
add(btback); String gend=tfgen.getText();
String country=jtcountry.getText();
ImageIcon cimg1= new String address=jtaddress.getText();
ImageIcon(ClassLoader.getSystemResource("ico String phone= tfmobile.getText();
ns/update1.jpg"));
Image try {
cimg2=cimg1.getImage().getScaledInstance(420, conn c= new conn();
400, Image.SCALE_DEFAULT); String query = "UPDATE customer SET id =
ImageIcon cimg3=new ImageIcon(cimg2); '" + id + "', number = '" + number + "', name = '"
JLabel cimg4=new JLabel(cimg3); + name + "', gender = '" + gend + "', country = '"
cimg4.setBounds(420,20,450,500); + country + "', address = '" + address + "', mobile
add(cimg4); = '" + phone + "' WHERE username = '" +
//txtunm.setText("username"); username + "'"; c.s.executeUpdate(query);

try { JOptionPane.showMessageDialog(null,"custome
conn c= new conn(); r details Updated successfully");
String query="select * from customer where setVisible(false);
username ='"+username+"'"; new dashboard(username);
ResultSet rs=c.s.executeQuery(query); }
while(rs.next()) catch (Exception e2) {
{ System.out.println(e2);
txtunm.setText(rs.getString("username")); }
txtnm.setText(rs.getString("name")); }
jtf1.setText(rs.getString("number")); else{
tfgen.setText(rs.getString("gender")); setVisible(false);
jtcountry.setText(rs.getString("country")); new dashboard(username1);
jtaddress.setText(rs.getString("address")); }
tfmobile.setText(rs.getString("mobile"));
tfid.setText(rs.getString("id")); }
Check Packages Page:

} import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
} catch (Exception e) {
import javax.swing.*; back2.setForeground(Color.white);
import java.sql.*; back2.setFont(new Font("Tahoma",
public class checkpackages extends JFrame Font.BOLD, 20));
implements ActionListener { back2.addActionListener(this);
JButton back1,back2,back3; p2.add(back2);
checkpackages()
{ back3= new JButton("BACK");
setBounds(450,200,900,600); back3.setBounds(700,480,100,30);
back3.setBackground(Color.BLACK);
String[] package1={"Gold Package","6 back3.setForeground(Color.white);
days and 7 nights","AirPort Assistance","Half back3.setFont(new Font("Tahoma",
Day City Tour","Daily Buffet","Soft Drinks Font.BOLD, 20));
free","Full 3 day cruise","Book back3.addActionListener(this);
Package","Summer p3.add(back3);
Special","12000/-","package1.jpg"};
String[] package2={"Silver Package","5
days and 6 Nights","TOll free and Entrance Free setVisible(true);
Tickets","Meet nad Greet at airport","Welcome }
drinks on Arrival","night Safari","Winter public JPanel createPackage(String [] pack)
Special","Cruise with Dinner","Book {
now","24000/-","package2.jpg"}; JPanel pl= new JPanel();
String[] package3={"Bronze Package","6 pl.setLayout(null);
days and 5 Nights","Free Clubbing","Horse pl.setBackground(Color.WHITE);
RIding","Hard Drinks free","Daily JLabel l1= new JLabel(pack[0]);
Buffet","BBQ Dinner","Book Now","Winter l1.setBounds(50,25,300,40);
Special","32000/-","package3.jpg"}; l1.setForeground(Color.red);
l1.setFont(new
Font("Tahoma",Font.BOLD,30));
JTabbedPane tab= new JTabbedPane(); pl.add(l1);

JPanel pl=createPackage(package1); JLabel l2= new JLabel(pack[1]);


tab.addTab("Package1",null, pl); l2.setBounds(30,80,300,30);
JPanel p2=createPackage(package2); l2.setForeground(Color.orange);
tab.addTab("Package2",null, p2); l2.setFont(new
JPanel p3=createPackage(package3); Font("Tahoma",Font.BOLD,20));
tab.addTab("Package3",null, p3); pl.add(l2);
add(tab);

back1= new JButton("BACK"); JLabel l3= new JLabel(pack[2]);


back1.setBounds(700,480,100,30); l3.setBounds(30,130,300,30);
back1.setBackground(Color.BLACK); l3.setForeground(Color.black);
back1.setForeground(Color.white); l3.setFont(new
back1.setFont(new Font("Tahoma", Font("Tahoma",Font.BOLD,20));
Font.BOLD, 20)); pl.add(l3);
back1.addActionListener(this);

JLabel l4= new JLabel(pack[3]);


pl.add(back1); l4.setBounds(30,180,300,30);
l4.setForeground(Color.red);
back2= new JButton("BACK"); l4.setFont(new
back2.setBounds(700,480,100,30); Font("Tahoma",Font.BOLD,20));
back2.setBackground(Color.BLACK); pl.add(l4);
JLabel img= new JLabel(i3);
JLabel l5= new JLabel(pack[4]); img.setBounds(350,20,500,300);
l5.setBounds(30,230,300,30); pl.add(img);
l5.setForeground(Color.green);
l5.setFont(new return pl;
Font("Tahoma",Font.BOLD,20)); }
pl.add(l5); public static void main(String[] args) {
new checkpackages();
JLabel l6= new JLabel(pack[5]); }
l6.setBounds(30,290,300,30); @Override
l6.setForeground(Color.blue); public void actionPerformed(ActionEvent e) {
l6.setFont(new setVisible(false);
Font("Tahoma",Font.BOLD,20)); new dashboard("");
pl.add(l6); }
}
JLabel l7= new JLabel(pack[6]);
l7.setBounds(30,350,300,30);
l7.setForeground(Color.red);
l7.setFont(new
Font("Tahoma",Font.BOLD,20));
pl.add(l7);

JLabel book= new JLabel(pack[7]);


book.setBounds(30,410,200,30);
book.setForeground(Color.orange);
book.setFont(new
Font("Tahoma",Font.BOLD,20));
pl.add(book);

JLabel l9= new JLabel(pack[8]);


l9.setBounds(80,480,300,30);
l9.setForeground(Color.magenta);
l9.setFont(new
Font("Tahoma",Font.BOLD,20));
pl.add(l9);

JLabel l8= new JLabel(pack[9]);


l8.setBounds(500,480,300,30);
l8.setForeground(Color.cyan);
l8.setFont(new
Font("Tahoma",Font.BOLD,20));
pl.add(l8);
Book Package Page:
ImageIcon i1= new
ImageIcon(ClassLoader.getSystemResource("ico import javax.accessibility.AccessibleAction;
ns/"+pack[10])); import javax.swing.*;
Image i2= import java.awt.*;
i1.getImage().getScaledInstance(500, 300, import java.awt.event.ActionEvent;
Image.SCALE_DEFAULT); import java.awt.event.ActionListener;
ImageIcon i3= new ImageIcon(i2); import java.sql.ResultSet;
public class bookmypackage extends JFrame id=new JLabel("ID");
implements ActionListener { id.setBounds(40,220,150,25);
JLabel id.setFont(new Font("Tahoma", Font.BOLD,
usernm,lusernm,id,lid,number,lprice,lnumber,na 16));
me,lname,gender,lgender,country,lcountry,addre add(id);
ss,laddres,mobileno,lmobileno; lid=new JLabel();
JButton back,checkprice,bookpackage; lid.setBounds(250,220,150,25);
Choice ch; lid.setFont(new Font("Tahoma", Font.BOLD,
JTextField tfpersons; 16));
String username1; add(lid);
bookmypackage(String username){
this.username1=username; number=new JLabel("Number");
setBounds(350,200,1100,500); number.setBounds(30,270,150,25);
setLayout(null); number.setFont(new Font("Tahoma",
Font.BOLD, 16));
JLabel text= new JLabel("Book PACKAGE"); add(number);
text.setBounds(100,10,200,30); lnumber=new JLabel();
text.setFont(new Font("Tahoma", Font.BOLD, lnumber.setBounds(250,270,150,25);
20)); add(lnumber);
add(text);
mobileno=new JLabel("Phone");
usernm=new JLabel("Username"); mobileno.setBounds(30,320,150,25);
usernm.setBounds(40,70,200,20); mobileno.setFont(new Font("Tahoma",
usernm.setFont(new Font("Tahoma", Font.BOLD, 16));
Font.BOLD, 20)); add(mobileno);
add(usernm); lmobileno=new JLabel();
lusernm=new JLabel(); lmobileno.setBounds(250,320,150,25);
lusernm.setBounds(250,70,200,20); add(lmobileno);
add(lusernm);
address=new JLabel("Total Price");
id=new JLabel("Select Packages"); address.setBounds(30,370,150,25);
id.setFont(new Font("Tahoma", Font.BOLD, address.setFont(new Font("Tahoma",
16)); Font.BOLD, 16));
id.setBounds(40,120,100,20); add(address);
add(id); lprice=new JLabel();
ch=new Choice(); lprice.setBounds(250,370,150,25);
ch.add("Gold Package"); add(lprice);
ch.add("Silver Package");
ch.add("Bronze Package"); try {
ch.setBounds(250,110,100,20);
add(ch); conn c= new conn();
String query="select * from customer where
number=new JLabel(" Total persons"); username ='"+username1+"'";
number.setBounds(40,170,150,20); ResultSet rs=c.s.executeQuery(query);
number.setFont(new Font("Tahoma", while(rs.next())
Font.BOLD, 16)); {lusernm.setText(rs.getString("username"));
add(number); lid.setText(rs.getString("id"));
tfpersons= new JTextField(); lmobileno.setText(rs.getString("mobile"));
tfpersons.setBounds(250,170,150,20); lnumber.setText(rs.getString("number"));
add(tfpersons); }
} catch (Exception e) { cost *=persons;
// TODO: handle exception} lprice.setText("Rs"+cost);
checkprice =new JButton("Check Price"); }
checkprice.setBackground(Color.BLACK);
checkprice.setForeground(Color.white); else if(pack.equals("Silver Package"))
checkprice.setBounds(100,410,120,25); {
checkprice.addActionListener(this);
add(checkprice); cost +=2500;
int
bookpackage =new JButton("Book Packagw"); persons=Integer.parseInt(tfpersons.getText());
bookpackage.setBackground(Color.BLACK); cost *=persons;
bookpackage.setForeground(Color.white); lprice.setText("Rs"+cost);
bookpackage.setBounds(250,410,120,25); }
bookpackage.addActionListener(this); else
add(bookpackage); {
cost +=3200;
back =new JButton("back"); int
back.setBackground(Color.BLACK); persons=Integer.parseInt(tfpersons.getText());
back.setForeground(Color.white); cost *=persons;
back.setBounds(400,410,120,25); lprice.setText("Rs"+cost);
back.addActionListener(this);
add(back); }}
setVisible(true); else if(e.getSource()==bookpackage)
ImageIcon i1= new { try {
ImageIcon(ClassLoader.getSystemResource("ico conn c= new conn();
ns/bookpackage.jpg")); c.s.executeUpdate("insert into
Image i2= bookpackages values('"+lusernm.getText()
i1.getImage().getScaledInstance(500, 300, +"','"+ch.getSelectedItem()
Image.SCALE_DEFAULT); +"','"+tfpersons.getText()+"','"+lid.getText()
ImageIcon i3= new ImageIcon(i2); +"','"+lnumber.getText()
JLabel img= new JLabel(i3); +"','"+lmobileno.getText()+"','"+lprice.getText()
img.setBounds(550,50,5+00,300); +"')");
add(img); JOptionPane.showMessageDialog(null,"package
} booked successfully");;
public static void main(String[] args) { setVisible(true);
new bookmypackage("");
} } catch (Exception e2) {
@Override // TODO: handle exception
public void actionPerformed(ActionEvent e) { }

if(e.getSource()==checkprice) }
{ String pack=ch.getSelectedItem(); else
int cost=0; {
if(pack.equals("Gold Package")) setVisible(false);
{ new dashboard(username1);
cost +=12000; }}
int }
persons=Integer.parseInt(tfpersons.getText()); View Package Page:
import java.awt.event.ActionListener;
import java.awt.*; import java.sql.*;
import java.awt.event.ActionEvent; import javax.swing.*;
public class viewpackage extends JFrame add(lid);
implements ActionListener {
JButton back; number =new JLabel("Number");
String username1; number.setBounds(30,230,150,25);
JLabel add(number);
usernm,package1,id,lid,persons,lpersons,lpackag lnumber=new JLabel();
e,lusernm,number,lnumber,mobileno,lmobileno, lnumber.setBounds(220,230,150,25);
price,lprice; add(lnumber);

viewpackage(String username) mobileno=new JLabel("Mobile NO");


{ mobileno.setBounds(30,270,150,25);
this.username1=username; add(mobileno);
setBounds(450,200,900,450); lmobileno=new JLabel();
lmobileno.setBounds(220,270,150,25);
getContentPane().setBackground(Color.white); add(lmobileno);
setLayout(null);
price=new JLabel("Price");
JLabel text= new JLabel("View Package price.setBounds(30,310,150,25);
Details"); add(price);
text.setFont(new lprice=new JLabel();
Font("Tahoma",Font.BOLD,20)); lprice.setBounds(220,310,150,25);
text.setBounds(60,10,300,40); add(lprice);
add(text);
back=new JButton("Back");
back.setBackground(Color.BLACK);
usernm=new JLabel("Username"); back.setForeground(Color.WHITE);
usernm.setBounds(30,70,150,25); back.setBounds(350,350,100,25);
add(usernm); back.addActionListener(this);
lusernm=new JLabel(); add(back);
lusernm.setBounds(220,70,150,25);
add(lusernm); ImageIcon i1= new
ImageIcon(ClassLoader.getSystemResource("ico
package1=new JLabel("Package Name"); ns/bookedDetails.jpg"));
package1.setBounds(30,110,150,25); Image i2= i1.getImage().getScaledInstance(500,
add(package1); 400, Image.SCALE_DEFAULT);
lpackage=new JLabel(); ImageIcon i3= new ImageIcon(i2);
lpackage.setBounds(220,110,150,25); JLabel i4= new JLabel(i3);
add(lpackage); i4.setBounds(450,20,400,300);
add(i4);
persons=new JLabel("Total Persons");
persons.setBounds(30,150,150,25); try {
add(persons); conn c= new conn();
lpersons=new JLabel(); String query="select * from bookpackages
lpersons.setBounds(220,150,150,25); where username='"+username1+"'";
add(lpersons); ResultSet rs=c.s.executeQuery(query);
while(rs.next())
id=new JLabel("ID"); {
id.setBounds(30,190,150,25);
add(id); lusernm.setText(rs.getString("username"));
lid=new JLabel(); lpackage.setText(rs.getString("package"));
lid.setBounds(220,190,150,25); lpersons.setText(rs.getString("persons"));
lid.setText(rs.getString("id"));
lnumber.setText(rs.getString("number"));
lmobileno.setText(rs.getString("phone"));
lprice.setText(rs.getString("price"));

}
} catch (Exception e) {
// TODO: handle exception
}
setVisible(true);
}
public static void main(String[] args) {
new viewpackage("");
}
@Override
public void actionPerformed(ActionEvent e) {
if(e.getSource()==back)
{
setVisible(false);
new dashboard(username1);
}
}

Book Hotels Page:

import javax.accessibility.AccessibleAction;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.sql.ResultSet;
add(chhotel);
public class bookhotel extends JFrame
implements ActionListener { number=new JLabel(" Total persons");
JLabel number.setBounds(40,170,150,20);
usernm,lusernm,id,lid,number,lprice,price,lnumb number.setFont(new Font("Tahoma",
er,mobileno,lmobileno,food,room,hotel,days; Font.BOLD, 16));
JButton back,checkprice,bookhotel; add(number);
Choice ch,chhotel,chfood,chroom; tfpersons= new JTextField();
JTextField tfpersons,ldays; tfpersons.setBounds(250,170,150,20);
String username1; add(tfpersons);
bookhotel(String username){
this.username1=username; days=new JLabel("No of Days");
setBounds(350,100,1100,700); days.setBounds(40,220,150,25);
setLayout(null); days.setFont(new Font("Tahoma", Font.BOLD,
16));
JLabel text= new JLabel("Book Hotel"); add(days);
text.setBounds(100,10,200,30); ldays=new JTextField();
text.setFont(new Font("Tahoma", Font.BOLD, ldays.setBounds(250,220,150,25);
20)); add(ldays);
add(text);
room=new JLabel("Select Room");
usernm=new JLabel("Username"); room.setFont(new Font("Tahoma", Font.BOLD,
usernm.setBounds(40,70,200,20); 16));
usernm.setFont(new Font("Tahoma", room.setBounds(40,270,100,20);
Font.BOLD, 20)); add(room);
add(usernm); chroom=new Choice();
lusernm=new JLabel(); chroom.add("AC");
lusernm.setBounds(250,70,200,20); chroom.add("NON-AC");
add(lusernm); chroom.setBounds(250,270,100,20);
add(chroom);
hotel=new JLabel("SelectHotel");
hotel.setFont(new Font("Tahoma", Font.BOLD, food=new JLabel("Select Room");
16)); food.setFont(new Font("Tahoma", Font.BOLD,
hotel.setBounds(40,120,100,20); 16));
add(hotel); food.setBounds(40,320,100,20);
chhotel=new Choice(); add(food);
try { chfood=new Choice();
conn c= new conn(); chfood.add("YES");
chfood.add("NO");
ResultSet rs=c.s.executeQuery("select * from chfood.setBounds(250,320,100,20);
bookhotel"); add(chfood);
while(rs.next())
{ id=new JLabel("ID");
id.setBounds(30,370,150,25);
chhotel.add(rs.getString("name")); id.setFont(new Font("Tahoma", Font.BOLD,
16));
} add(id);
} catch (Exception e) { lid=new JLabel();
// TODO: handle exception lid.setBounds(250,370,150,25);
} add(lid);
chhotel.setBounds(250,120,200,20);
number=new JLabel("Number"); checkprice.setForeground(Color.white);
number.setBounds(30,420,150,25); checkprice.setBounds(100,600,120,25);
number.setFont(new Font("Tahoma", checkprice.addActionListener(this);
Font.BOLD, 16)); add(checkprice);
add(number);
lnumber=new JLabel(); bookhotel =new JButton("Book Hotel");
lnumber.setBounds(250,420,150,25); bookhotel.setBackground(Color.BLACK);
add(lnumber); bookhotel.setForeground(Color.white);
bookhotel.setBounds(250,600,120,25);
bookhotel.addActionListener(this);
mobileno=new JLabel("Phone"); add(bookhotel);
mobileno.setBounds(30,470,150,25);
mobileno.setFont(new Font("Tahoma", back =new JButton("back");
Font.BOLD, 16)); back.setBackground(Color.BLACK);
add(mobileno); back.setForeground(Color.white);
lmobileno=new JLabel(); back.setBounds(400,600,120,25);
lmobileno.setBounds(250,470,150,25); back.addActionListener(this);
add(lmobileno); add(back);
setVisible(true);
price=new JLabel("Total Price");
price.setBounds(30,520,150,25); ImageIcon i1= new
price.setFont(new Font("Tahoma", Font.BOLD, ImageIcon(ClassLoader.getSystemResource("ico
16)); ns/book.jpg"));
add(price); Image i2=
lprice=new JLabel(); i1.getImage().getScaledInstance(500, 400,
lprice.setBounds(250,520,150,25); Image.SCALE_DEFAULT);
add(lprice); ImageIcon i3= new ImageIcon(i2);
JLabel img= new JLabel(i3);
try { img.setBounds(550,50,500,400);
add(img);
conn c= new conn();
String query="select * from customer where
username ='"+username1+"'"; }
ResultSet rs=c.s.executeQuery(query); public static void main(String[] args) {
while(rs.next()) new bookhotel("");
{ }
lusernm.setText(rs.getString("username")); @Override
lid.setText(rs.getString("id")); public void actionPerformed(ActionEvent e) {
lmobileno.setText(rs.getString("mobile"));
lnumber.setText(rs.getString("number")); if(e.getSource()==checkprice)
{
try{
conn c= new conn();
} ResultSet rs= c.s.executeQuery("select *
from bookhotel where
} catch (Exception e) { name='"+chhotel.getSelectedItem()+"' ");
// TODO: handle exception while(rs.next())
} {
int
checkprice =new JButton("Check Price"); cost=Integer.parseInt(rs.getString("costperperson
checkprice.setBackground(Color.BLACK); "));
int +"') ");
food=Integer.parseInt(rs.getString("foodincluded
")) ; JOptionPane.showMessageDialog(null, "hotel
int booked succesfully");
ac=Integer.parseInt(rs.getString("acroom")) ; setVisible(true);

int } catch (Exception e4) {


persons=Integer.parseInt(tfpersons.getText()); System.out.println(e4);
int // TODO: handle exception
days=Integer.parseInt(ldays.getText()); }

String }
acselected=chroom.getSelectedItem(); else
String {
foodselected=chfood.getSelectedItem(); setVisible(false);
if(persons * days>0) new dashboard(username1);
{ }
int total=0; }
total+=acselected.equals("AC")?ac:0; }
total+=foodselected.equals("YES")?
food:0;
total+=cost;
total=total*persons*days;
lprice.setText("RS :"+total);
// add(lprice);
}
else
{
JOptionPane.showMessageDialog(null,
"Please eneter a valid Numb", foodselected,
days);
}

}
}catch(Exception e3)
{
System.out.println(e3);
}
}
else if(e.getSource()== bookhotel)
{
try {
conn c= new conn();
c.s.executeUpdate("insert into
bookhotel2 values('"+lusernm.getText() View Booked Hotels:
+"','"+chhotel.getSelectedItem()
+"','"+tfpersons.getText()+"','"+ldays.getText() import java.awt.*;
+"','"+chroom.getSelectedItem() import java.awt.event.ActionEvent;
+"','"+chfood.getSelectedItem() import java.awt.event.ActionListener;
+"','"+lid.getText()+"','"+lnumber.getText() import java.sql.*;
+"','"+lmobileno.getText()+"','"+lprice.getText() import javax.swing.*;
public class viewbookedhotel extends JFrame ltotaldays=new JLabel();
implements ActionListener { ltotaldays.setBounds(220,190,150,25);
JButton back; add(ltotaldays);
String username1;
JLabel
usernm,hotel,id,lid,persons,lpersons,lhotel,lusern id=new JLabel("ID");
m,number,lnumber,mobileno,lmobileno,price,lpr id.setBounds(30,230,150,25);
ice,food,lfood,cost,lcost,totaldays,ltotaldays,ac,la add(id);
c; lid=new JLabel();
lid.setBounds(220,230,150,25);
viewbookedhotel(String username) add(lid);
{
this.username1=username;
setBounds(450,200,1000,6000); number =new JLabel("Number");
number.setBounds(30,270,150,25);
getContentPane().setBackground(Color.white); add(number);
setLayout(null); lnumber=new JLabel();
lnumber.setBounds(220,270,150,25);
JLabel text= new JLabel("View Booked Hotel add(lnumber);
Details");
text.setFont(new mobileno=new JLabel("Mobile NO");
Font("Tahoma",Font.BOLD,20)); mobileno.setBounds(30,320,150,25);
text.setBounds(60,10,400,40); add(mobileno);
add(text); lmobileno=new JLabel();
lmobileno.setBounds(220,320,150,25);
add(lmobileno);
usernm=new JLabel("Username");
usernm.setBounds(30,70,150,25); // price=new JLabel("Price");
add(usernm); // price.setBounds(30,360,150,25);
lusernm=new JLabel(); // add(price);
lusernm.setBounds(220,70,150,25); // lprice=new JLabel();
add(lusernm); // lprice.setBounds(220,360,150,25);
// add(lprice);
hotel=new JLabel("Hotel Name");
hotel.setBounds(30,110,150,25); ac=new JLabel("AC/NON-AC");
add(hotel); ac.setBounds(30,360,150,25);
lhotel=new JLabel(); add(ac);
lhotel.setBounds(220,110,150,25); lac=new JLabel();
add(lhotel); lac.setBounds(220,360,150,25);
add(lac);
persons=new JLabel("Total Persons");
persons.setBounds(30,150,150,25); food=new JLabel("Food Included?");
add(persons); food.setBounds(30,400,150,25);
lpersons=new JLabel(); add(food);
lfood=new JLabel();
lpersons.setBounds(220,150,150,25); lfood.setBounds(220,400,150,25);
add(lpersons); add(lfood);

totaldays=new JLabel("Total days"); cost=new JLabel("Total Cost");


totaldays.setBounds(30,190,150,25); cost.setBounds(30,440,150,25);
add(totaldays); add(cost);
lcost=new JLabel(); @Override
lcost.setBounds(220,440,150,25); public void actionPerformed(ActionEvent e) {
add(lcost); if(e.getSource()==back)
{
back=new JButton("Back"); setVisible(false);
back.setBackground(Color.BLACK); new dashboard(username1);
back.setForeground(Color.WHITE); }
back.setBounds(350,480,100,25); }
back.addActionListener(this);
add(back); }

ImageIcon i1= new


ImageIcon(ClassLoader.getSystemResource("ico
ns/bookedDetails.jpg"));
Image i2= i1.getImage().getScaledInstance(500,
400, Image.SCALE_DEFAULT);
ImageIcon i3= new ImageIcon(i2);
JLabel i4= new JLabel(i3);
i4.setBounds(450,20,400,300);
add(i4);

try {
conn c= new conn();
String query="select * from bookhotel2 where
username='"+username1+"'";
ResultSet rs=c.s.executeQuery(query);
while(rs.next())
{

lusernm.setText(rs.getString("username"));
lhotel.setText(rs.getString("name"));
lpersons.setText(rs.getString("persons"));
lid.setText(rs.getString("id"));
lnumber.setText(rs.getString("number"));
lmobileno.setText(rs.getString("phone"));
lcost.setText(rs.getString("price"));
lac.setText(rs.getString("ac"));
lfood.setText(rs.getString("food"));
ltotaldays.setText(rs.getString("days"));

}
} catch (Exception e) {
// TODO: handle exception Destinations Page:
}
setVisible(true); import java.awt.*;
} import javax.swing.*;
public static void main(String[] args) {
new viewbookedhotel(""); public class viewdestinations extends JFrame
} implements Runnable {
Thread t1;

JLabel []lable=new JLabel[10];


//JLabel caption;
public void run()
{

try {
for(int i=0;i<=9;i++)
{
lable[i].setVisible(true);

Thread.sleep(2500);
lable[i].setVisible(false);
}
} catch (Exception e) {
// TODO: handle exception
}
}
viewdestinations()
{

for(int i=0;i<10;i++)
{
setBounds(500,200,800,600);
ImageIcon I1= new
ImageIcon(ClassLoader.getSystemResource("ico
ns/dest"+(i+1)+".jpg"));
Image i1=I1.getImage().getScaledInstance(800,
600,Image.SCALE_DEFAULT);
ImageIcon ii1=new ImageIcon(i1);
lable[i]=new JLabel(ii1);
lable[i].setBounds(0,0,800,600);
add(lable[i]);
}
t1=new Thread(this);
t1.start();

setVisible(true);

public static void main(String[] args) {


new viewdestinations();
} Payment Page:

import java.awt.*;
} import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.*;
public class payment extends JFrame
implements ActionListener{
JButton pay,back;
payment()
{
setBounds(500,200,800,600);
setLayout(null);
ImageIcon i1=new
ImageIcon(ClassLoader.getSystemResource("ico
ns/paytm.jpeg"));
Image i2=i1.getImage().getScaledInstance(800,
600, Image.SCALE_DEFAULT);
ImageIcon i3=new ImageIcon(i2);
JLabel image=new JLabel(i3);
image.setBounds(0,0,800,600);
add(image);

pay=new JButton("Pay");
pay.setBounds(420,0,80,40);
pay.addActionListener(this);
add(pay);

back=new JButton("Back");
back.setBounds(520,0,80,40);
back.addActionListener(this);
add(back);

setVisible(true);

public static void main(String[] args) {


new payment();
}

@Override
public void actionPerformed(ActionEvent e) {
if(e.getSource()==pay)
{
setVisible(false);
new paytm();
}
else
{
setVisible(false);
new dashboard("");
}
}
}

You might also like