Hotel Documentation
Hotel Documentation
Hotel Documentation
1. INTRODUCTION
Hotel Management System is a system that provides us to reserving rooms, checking whether
the rooms are vacant are or not etc by using online browsing. This system is very useful to all
especially for business people.
For Business people they don’t have sufficient time for these then they can use these type of
online Hotel Management Systems. By this project we will reduce the faults in bills of their
expenditure and decrease time of delayto give the bills to the customers. We can also save the
bills of the customer. By this project we can also include all the taxes on the bills according to
their expenditures. It has a scope to reduce the errors in making the bills. Computerized bill
can be printed within fraction of seconds. Online ordering of Booking is possible by using
this software. This Project is based on php. If any one wants to book the room for few days
then they can specify the specific number by seeing the types of rooms we have. The bill of
this online booking is based on the type of room they can select is displayed.
HOTEL MANAGEMENT SYSTEM is a hotel reservation site script where site users will be
able to search rooms availability with an online booking reservations system.Siteusers can
also browse hotels, view room inventory, check availability, and book reservations in real-
time.Site users enter check in date and check out date then search for availability and rates.
After choosing the right room in the wanted hotel – all booking and reservation process is
done on the site and an SMS is sent to confirm the booking
users can also browse hotels, view room inventory, check availability, and book reservations
in real-time.Site users enter check in date and check out date then search for availability and
rates. After choosing the right room in the wanted hotel – all booking and reservation process
is done on the site and an SMS is sent to confirm the booking.
The present scenario offers manual data entry. A lot of time is wasted in creating the reports as
well as maintaining them. In case, if any query arises to get the information about the
booking, queries and registered users, the whole report is re-typed or xeroxed. This seriously
affects the authentication of the system. This kind of hotel management system is totally
outdated and involves high risk of ambiguity and redundancy.
1.2 Objective:
Project title “Hotel Management” (a project for keeping customers record and also
calculate customer bill slip and managers salary).
1. The objective of the project is to computerize the system of the hotel.
2. “Hotel Management”is the project not only keeps the record of various users like
customers, manager etc. but as well as it reduce the extensive paper work in the
present system.
3. It wills maker the system more versatile and user friendly.
4. It also calculates the proper billing slip of high level and middle level customers. 5.
It maintains the database and also allows Adding new employee details, daily
attendance, and salary calculation of the employee.
6. This system generates a report which will be having details of daily transaction.
This application can be easily implemented under various situations. We can add new
features as and when require. Reusability is possible as and when require in this
application. There is flexibility in all the modules. The software to be developed deals
with creating a Hotel Management system which will automate the major hotel
operations such as generating COD, billing and keeping track of records of daily
transaction.Admin have the authority to control and modify the database. The project
has a wide scope, as it is not intended to a particular organization. This project is going
to develop generic software, which can be applied by any businesses organization.
More over it provides facility to its customer. Also the software is going to provide a
huge amount of summary data. At present this software does not contain Credit card
facility. We can make this application as online so that we can reserve the tables and do
the online payment. So as the demand increases we can add these modules as a future
scope. At present this software does not contain Credit card facility. We can make this
application as online so that we can reserve the tables and do the online payment. So as
the demand increases we can add these modules as a future scope.
As earlier mentioned the project study covers Reception, accommodation, finance and
account, catering, food ordering, administrative, security, and general services transactions in
the Hotel management.
However The project has limitation based on these facts
1. It is not a large Scale System.Only Limited information will be Provided By the
System.
2. At present this software does not contain Credit card facility. We can make this
application as online so that we can reserve the tables and do the online payment. So as the
demand increases we can add these modules as a future scope.
3. The transactions are executed in off-line mode.
4. Due to time constraints certain fields were not included; the software was therefore
reduced to covering critical aspect of hotel management.
4. People who are with computers can’t use this software.
5. If there is a power failure, the hotel runs a high risk of loosing all the stored
informations.
1.6Process Model:
The model followed in this project of Hospital Management System is Spiral Model.
Spiral Model is one of the most important Software Development Life Cycle Models, which
providessupportforriskhandling.
Initsdiagrammatic
representation,
it lookslikea spiralwith
many loops. the exact number of loops of the spiral is unknown and can vary from project to
project.Eachloopofthespiralis calleda phaseofthesoftwaredevelopment
process.Theexact
number of phases needed to develop the product can be varied by the project manager
depending upon the project risks. As the project manager dynamically determines the number
of phases, so the project manager has an important role to develop a project
e spiral
using th
Model.
2. SYSTEM ANALYSIS
2.1 General
• Multi-core – 1.8 GHz processor or better
• 4GB RAM
• Windows 7, 8, 8.1, 10, or 11
• 80 GB hard drive or more (160 GB highly recommended)
• Mouse
• Monitor with 1024 X 768 resolution or higher
• Windows compatible printer (laser printer recommended)
• Gigabit Ethernet port and router (for networking computers)**
• 1 serial port or a USB to serial adapter (only required for certain software options)
• Wired, high speed internet connection (only required for certain software/service
options)
The existing system of Hotel Management was manual. All the daily routines are carried out
manually and the records are maintained in the record books or the registers.As computer has
merged with man as single entity so a computerized application can be developed that can
handle Hotel Management System(HMS). All the above activity such as Booking,Customer
Check In,Bill Generations,Making Reports takes place manually, manually carrying out this
activity in very tedious time consuming. As we have tried to develop computerized
application so as to handle all the activity that takes place in Hotel. As all the activities that
happen in the Hotel such as enquiry, check status booking, etc. can be handled on this system
simultaneously.
1. Existing keyword suggestion techniques do not consider the locations of the users
and the query results; i.e., the spatial proximity of a user to the retrieved results is not taken
as a factor in the recommendation.
4. Coordinating various departments in this respect is not only time taking but is also a
cumbersome process.
7. This manuål does not help Head of the hotel in taking decisions at various levels.
All above points define the disadvantages of conventional methods & suggest developing the
new system.
With the help of this project we reduced task deployed for data/information collection
to a large extent thereby elllülnating the human errors considerably.
Therefore the organization has realized the need for automating the various daily
routine activities of hotel & task of data/information collection with the help of database
designing.
And with this realization our project "HOTEL MANAGEMENT SYSTEM" comes
into practical usage & also benefiting the organization as a whole.
Everything that comes into existence must have an objective for its existence. It holds
true for our project also. It has been conceived as a powerful tool to help the company in
maintaming the various activities of the hotel. It has several benefits over other already
existing applications.
1. This LKS framework providing keyword suggestions that are relevant to the user
information needs and at the same time can retrieve relevant documents near the user
location.
4. The system is useful as it calculates an exact cost of rooms for requested number of days.
The present scenario offers manual data entry. A lot of time is wasted in creating the reports as
well as maintaining them. In case, if any query arises to get the information about the
booking, queries and registered users, the whole report is re-typed or xeroxed. This seriously
affects the authentication of the system. This kind of hotel management system is totally
outdated and involves high risk of ambiguity and redundancy.
In this, one has to test whether the system can be developed using existing technology or not.
We have used Visual Basic as front-end and MS ACCESS as back-end. It is evident that
necessary hardware and software are available for development and implementation of
proposed system. We acquired the technical knowledge of working in Visual Basic language,
and then only we have started designing our project.
The hotels are already using various software for managing their information and since it is
acceptable by both hotel administration as well as hotel staff, it is proven to be operationally
feasible.
As a part of this, the costs and benefits associated with the proposed system are compared and
the project is economically feasible only if tangible and intangible benefits outweigh the cost.
The cost for proposed hotel management system is outweighing the cost and efforts involved
in maintaining the registers, books, files and generation of various repotts. The system also
reduces the administrative and technical staff to do various jobs that smgle software can do.
So, th1S system is economically feasible.
Legal feasibility detennines whether the proposed system conflicts with legål requirements,
e.g.
the Data Protection Act. It Will be done by some legal advisory
Requirement analysis for java application encompasses The proposed Hotel Booking
Management System is to have everything completely automated and computerized.
The software is very easy to use and manage even for a non technical person. The
redundancy and ambiguity will be removed by assigning every booking a unique
number (i.e Booking Number).three major tasks:Formulation,requirements gathering
and analysis modeling.During formulation,the basic motivation and goals for the java
application are identified, and the categories of users are defined.In the requirements
gathering phase,the content and functional requirements are listed and interaction
scenarios written from end users point of view are developed .This intent is to
establish a basic understanding of why the java application are built ,who will use
it ,and what problems it will solve for its users.
software.Software is the part of Computer System ,which enables the users to interact
with several physical hardware devices.
The minimum software requirement specification for developing this project are as
follows:
The Collection of internal electronic circuits and external physical devices used in
building a computer is called the Hardware.
The Minimum Hardware Requirement specuification for developing this project are as
follows:
• Intel Processor 2.0 GHz or above.
3. SYSTEM DESIGN
Saket College of arts,science and commerce 11
Hotel management system 226653
Signin
ADMINISTRATOR:
Home
Add Facility
Manage Room
Manage Facility
Add Room
Manage Room
(Add/Update
Manage Booking
Manage Enquiry
Generate Reports
Search
Update Profile
Change Password
DFD Level 0:
-
Hotel Reservation
Customer Management Subsystem
System
DFD Level1:
2
1 Choosefacility Book Room Hotel
Facilities Monitor Process Get Confirmation Customer
Customer
Reservation Registration
Get Feedback
Send Send Provide
Confirmation Request Data
3 Change data
Cancellation Database
And
Reservation
14
Hotel management system 226662
16
Hotel management system 226662
3.3 ER DIAGRAM
Entity – Relationship Diagram: This depicts relationship between data
objects. The attribute of each data o bjects noted in the entity- relationship
diagram can be described using a data object description. Data flow
diagram serves two purposes:
1. To provide an indication of how data are transformed as they move
through the system.
2. To depict the functions that transformation the data flow
Room No
ID
Room Type
Name
Hotel Has Rooms
Price
Location
Bed Type
Phone
Number
Reserve
Name
Bill ID
Email ID
P_method
Identity
proof
Address
18
Hotel management system 226662
3.5Class Diagram
A classdiagramdescribes
thestaticstructureofthesymbolsin yournewsystem.It is a graphic
presentation of the static view that shows a collection ofve declarati
(static) model elements,
such as classes, types, and their contents and relationships. Classes are arranged in hierarchies
sharing common structure and behavior, and are associated
other with
4. OUTPUT SCREENS:
SIGNUP PAGE:
LOGIN PAGE
MANAGE ROOM :
CUSTOMER CHECKIN:
CUSTOMER CHECKOUT:
5. SYSTEM IMPLEMENTATION:
5.1 Introduction:
Implementation is the stage of the project when the theoretical design is turned out into a
working system. Thus, it can be most critical stage in achieving a successful new system and
in giving the user, confidence that the new system will work and be effective.
The implementation stage involves careful planning, investigation of the existing system
and it’s constraints on implementation, designing of methods to achieve changeover and evaluation
of changeover methods.
Project.InsertUpdateDelete; import
java.awt.Color; import
java.util.regex.Matcher; import
java.util.regex.Pattern; import
javafx.scene.control.Alert; import
java.awt.event.KeyEvent; import
javafx.scene.control.Alert.AlertType;
/**
*/
@SuppressWarnings("unchecked")
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setUndecorated(true); getContentPane().setLayout(new
org.netbeans.lib.awtextra.AbsoluteLayout());
jLabel3.setText("Password");
questions");
jTextField1.addActionListener(new java.awt.event.ActionListener()
{ jTextField1ActionPerformed(evt);
});
{ jTextField1KeyReleased(evt);
{ jTextField1KeyTyped(evt);
});
getContentPane().add(jTextField1, new
org.netbeans.lib.awtextra.AbsoluteConstraints(650, 230, 201, -1));
jTextField2.addActionListener(new java.awt.event.ActionListener()
{ jTextField2ActionPerformed(evt);
});
{ jTextField2KeyPressed(evt);
evt) { jTextField2KeyReleased(evt);
jTextField2KeyTyped(evt);
});
getContentPane().add(jTextField2, new
org.netbeans.lib.awtextra.AbsoluteConstraints(650, 270, 201, -1));
{ passwordActionPerformed(evt);
});
{ passwordKeyReleased(evt);
{ passwordKeyTyped(evt);
});
getContentPane().add(password, neworg.netbeans.lib.awtextra.AbsoluteConstraints(650,
310, 201, -1));
jTextField3.addActionListener(new java.awt.event.ActionListener()
{ jTextField3ActionPerformed(evt);
});
{ jTextField3KeyReleased(evt);
{ jTextField3KeyTyped(evt);
} });
getContentPane().add(jTextField3, org.netbeans.lib.awtextra.AbsoluteConstraints(650,
400, 201, 30));
{ jTextField4KeyReleased(evt);
});
getContentPane().add(jTextField4,neworg.netbeans.lib.awtextra.AbsoluteConstraints(650,
450, 201, -1));
actionPerformed(java.awt.event.ActionEvent evt)
{ jButton1ActionPerformed(evt);
});
{ jButton2ActionPerformed(evt);
});
jButton3.setText("Login"); jButton3.addActionListener(new
actionPerformed(java.awt.event.ActionEvent evt)
{ jButton3ActionPerformed(evt);
});
jButton4.setIcon(new
javax.swing.ImageIcon(getClass().getResource("/images/close.png"))); // NOI18N
{ jButton4ActionPerformed(evt);
});
getContentPane().add(jButton4, new
org.netbeans.lib.awtextra.AbsoluteConstraints(1330, 10, 30, -1));
jLabel9.setIcon(new
javax.swing.ImageIcon(getClass().getResource("/images/signup.PNG"))); // NOI18N
getContentPane().add(jLabel9, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0,
setLocationRelativeTo(null);
jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
setVisible(false); new
ForgotPassword().setVisible(true);
String name=jTextField1.getText();
String Email=jTextField2.getText();
String Password=password.getText();
String Securityquestions=(String)jComboBox1.getSelectedItem();
Address=jTextField4.getText();
Pattern patt=Pattern.compile(PATTERN);
JOptionPane.showMessageDialog(null,"Invalid password");
} if(!(Pattern.matches("^[a-zA-Z0-9]+[@]+gmail+[.]+com$",jTextField2.getText()))){
else
String Query;
InsertUpdateDelete.setData(Query,"Registered Successfully");
System.exit(0);
setVisible(false); new
login().setVisible(true);
evt) {
c=evt.getKeyChar();
if(!(Character.isAlphabetic(c)||(c==KeyEvent.VK_SPACE)||(c==KeyEvent.VK_DELETE)||(c
==KeyEvent.VK_PERIOD)||(c==KeyEvent.VK_AMPERSAND)||(c==KeyEvent.VK_BACK
_SPACE))){
JOptionPane.showMessageDialog(null,"Alphabets only");
getToolkit().beep(); evt.consume();
else{ elab.setText(n
ull);
Pattern patt=Pattern.compile(PATTERN);
Matcher match=patt.matcher(password.getText());
if(!match.matches()){ pass.setText("weak
Password");
} else{ pass.setText("Strong
password");
pass.setForeground(Color.green);
c=evt.getKeyChar();
if(!(Character.isAlphabetic(c)||(Character.isDigit(c)||(c==KeyEvent.VK_SPACE)||(c==KeyEv
ent.VK_DELETE)||(c==KeyEvent.VK_PERIOD)||(c==KeyEvent.VK_BACK_SPACE)))){
getToolkit().beep(); evt.consume();
}}
c=evt.getKeyChar();
if(!(Character.isAlphabetic(c)||(c==KeyEvent.VK_SPACE)||(c==KeyEvent.VK_DELETE)||(c
==KeyEvent.VK_PERIOD)||(c==KeyEvent.VK_BACK_SPACE)||(c==KeyEvent.VK_SHIF
T))){
getToolkit().beep(); evt.consume();
try {
if ("Nimbus".equals(info.getName()))
{ javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
java.util.logging.Logger.getLogger(signup.class.getName()).log(java.util.logging.Level.SEV ERE,
null, ex);
java.util.logging.Logger.getLogger(signup.class.getName()).log(java.util.logging.Level.SEV ERE,
null, ex);
java.util.logging.Logger.getLogger(signup.class.getName()).log(java.util.logging.Level.SEV ERE,
null, ex);
java.util.logging.Logger.getLogger(signup.class.getName()).log(java.util.logging.Level.SEV ERE,
null, ex);
//</editor-fold>
java.awt.EventQueue.invokeLater(new Runnable() {
});
javax.swing.JPasswordField password;
Login.java: import
javax.swing.JOptionPane; import
javax.swing.JLabel; import
{ initComponents();
cap.setImageCaptcha(captcha);
@SuppressWarnings("unchecked")
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setUndecorated(true); getContentPane().setLayout(new
org.netbeans.lib.awtextra.AbsoluteLayout()); jLabel1.setFont(new
jLabel2.setText("Email");
255)); jLabel3.setText("Password");
NOI18N jTextField1.addKeyListener(new
keyReleased(java.awt.event.KeyEvent evt)
{ jTextField1KeyReleased(evt);
});
getContentPane().add(jTextField1, new
org.netbeans.lib.awtextra.AbsoluteConstraints(580, 340, 318, -1));
jButton4.setText("Login"); jButton4.addActionListener(new
actionPerformed(java.awt.event.ActionEvent evt)
{ jButton4ActionPerformed(evt);
});
jButton1.setText("Signup"); jButton1.addActionListener(new
actionPerformed(java.awt.event.ActionEvent evt)
{ jButton1ActionPerformed(evt);
});
jButton2.setText("Forgot Password");
jButton2.addActionListener(new java.awt.event.ActionListener()
{ jButton2ActionPerformed(evt);
});
getContentPane().add(jPasswordField1,org.netbeans.lib.awtextra.AbsoluteConstraints(580,
380, 320, -1));
jButton3.setIcon(new
javax.swing.ImageIcon(getClass().getResource("/images/close.png"))); // NOI18N
{ jButton3ActionPerformed(evt);
});
getContentPane().add(jButton3, new
org.netbeans.lib.awtextra.AbsoluteConstraints(1320, 0, 40, -1));
jButton5.setText("Verify"); jButton5.addMouseListener(new
mouseClicked(java.awt.event.MouseEvent evt)
{ jButton5MouseClicked(evt);
});
{ VerifyActionPerformed(evt);
Captcha");
jLabel4.setIcon(new
javax.swing.ImageIcon(getClass().getResource("/images/login.PNG"))); // NOI18N
pack(); setLocationRelativeTo(null);
System.exit(0);
check=0;
String Email=jTextField1.getText();
Enter=Verify.getText(); if(Email.equals("") ||
Password.equals("")||(Enter.equals("")))
{ check=1;
else if(!(cap.Validate(captcha,Verify.getText())))
{ check=1;
JOptionPane.showMessageDialog(null,"Invalid captcha");
adminHome().setVisible(true);
else
try
{ if(rs.next())
{ check=1;
if(rs.getString(7).equals("true"))
{ setVisible(false); new
home().setVisible(true);
else
}}
catch(Exception
e)
JOptionPane.showMessageDialog(null,e);
} if(check==0)
setVisible(false); new
signup().setVisible(true);
setVisible(false); new
ForgotPassword().setVisible(true);
if(cap.Validate(captcha,Verify.getText()))
JOptionPane.showMessageDialog(this,"correct captcha");
else
JOptionPane.showMessageDialog(this,"Incorreect captcha");
} try
if ("Nimbus".equals(info.getName()))
{ javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
java.util.logging.Logger.getLogger(login.class.getName()).log(java.util.logging.Level.SEVE
RE, null, ex);
java.util.logging.Logger.getLogger(login.class.getName()).log(java.util.logging.Level.SEVE
RE, null, ex);
java.util.logging.Logger.getLogger(login.class.getName()).log(java.util.logging.Level.SEVE RE,
null, ex);
java.util.logging.Logger.getLogger(login.class.getName()).log(java.util.logging.Level.SEVE RE,
null, ex);
java.awt.EventQueue.invokeLater(new Runnable() {
});
javax.swing.JTextField jTextField1;
ForgotPassword.java:
import java.util.regex.Pattern;
import
javax.swing.JOptionPane;
public ForgotPassword() {
initComponents();
String Email;
@SuppressWarnings("unchecked")
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setUndecorated(true); getContentPane().setLayout(new
org.netbeans.lib.awtextra.AbsoluteLayout());
PASSWORD");
questions");
password");
jTextField1.addActionListener(new java.awt.event.ActionListener()
{ jTextField1ActionPerformed(evt);
});
getContentPane().add(jTextField1, new
org.netbeans.lib.awtextra.AbsoluteConstraints(550, 280, 297, -1));
{ jTextField3KeyReleased(evt);
});
getContentPane().add(jTextField3, new
org.netbeans.lib.awtextra.AbsoluteConstraints(550, 360, 300, -1));
jButton2.setText("Save"); jButton2.addActionListener(new
actionPerformed(java.awt.event.ActionEvent evt)
{ jButton2ActionPerformed(evt);
});
jButton3.setText("Signup"); jButton3.addActionListener(new
actionPerformed(java.awt.event.ActionEvent evt)
{ jButton3ActionPerformed(evt);
});
jButton4.setText("Login"); jButton4.addActionListener(new
actionPerformed(java.awt.event.ActionEvent evt)
{ jButton4ActionPerformed(evt);
});
jButton5.setText("Search"); jButton5.addActionListener(new
actionPerformed(java.awt.event.ActionEvent evt)
{ jButton5ActionPerformed(evt);
});
jButton6.setIcon(new
javax.swing.ImageIcon(getClass().getResource("/images/close.png"))); // NOI18N
jButton6.addActionListener(new java.awt.event.ActionListener() { public
void actionPerformed(java.awt.event.ActionEvent evt)
{ jButton6ActionPerformed(evt);
});
getContentPane().add(jButton6, new
org.netbeans.lib.awtextra.AbsoluteConstraints(1330, 0, 30, 30));
{ jTextField2ActionPerformed(evt);
});
getContentPane().add(jTextField2, new
org.netbeans.lib.awtextra.AbsoluteConstraints(550, 320, 300, -1));
{ passwordKeyReleased(evt);
});
getContentPane().add(password, new
org.netbeans.lib.awtextra.AbsoluteConstraints(550, 400, 300, -1));
jLabel7.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/forgot
password.PNG"))); // NOI18N
pack(); setLocationRelativeTo(null);
}// </editor-fold>
System.exit(0);
int check=0;
Email=jTextField1.getText(); if(Email.equals(""))
{ check=1;
else
{ if(rs.next())
{ check=1;
jTextField2.setEditable(false);
jTextField1.setEditable(false);
jTextField2.setText(rs.getString(4));
}}
catch(Exception
e)
JOptionPane.showMessageDialog(null,e);
} if(check==0)
JOptionPane.showMessageDialog(null,"Incorrect Email");
}}
check=0;
String Securityquestions=jTextField2.getText();
Newpassword=password.getText();
{ check=1;
if(!(Pattern.matches("^[a-zA-Z0-9]{8,15}[@#%&*][a-zA-Z0- 9]
{0,10}$",password.getText())))
else
try {
if(rs.next())
{ check=1;
setVisible(false); new
ForgotPassword().setVisible(true);
}}
catch(Exception e)
JOptionPane.showMessageDialog(null,e);
} if(check==0)
JOptionPane.showMessageDialog(null,"Incorrect Answer");
}}
setVisible(false); new
signup().setVisible(true);
setVisible(false); new
login().setVisible(true);
if(!(Pattern.matches("^[a-zA-Z0-9]{8,15}[@#%&*][a-zA-Z0- 9]
{0,10}$",password.getText())))
{ pass.setText("Weak passsword");
pass.setForeground(Color.red);
} else{ pass.setText("Strong
password");
pass.setForeground(Color.green);
if(!(Pattern.matches("^[a-zA-Z]{0,20}$",jTextField3.getText())))
{ anslab.setText("Incorrect Answer");
else{ anslab.setText(n
ull);
}}
if ("Nimbus".equals(info.getName()))
{ javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
java.util.logging.Logger.getLogger(ForgotPassword.class.getName()).log(java.util.logging.Le
vel.SEVERE, null, ex);
java.util.logging.Logger.getLogger(ForgotPassword.class.getName()).log(java.util.logging.Le
vel.SEVERE, null, ex);
java.util.logging.Logger.getLogger(ForgotPassword.class.getName()).log(java.util.logging.Le
vel.SEVERE, null, ex);
java.util.logging.Logger.getLogger(ForgotPassword.class.getName()).log(java.util.logging.Le
vel.SEVERE, null, ex);
//</editor-fold>
//</editor-fold>
java.awt.EventQueue.invokeLater(new Runnable() {
ForgotPassword().setVisible(true);
});
javax.swing.JPasswordField password;
Home.java:
@SuppressWarnings("unchecked")
javax.swing.JLabel();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setUndecorated(true); getContentPane().setLayout(new
org.netbeans.lib.awtextra.AbsoluteLayout());
java.awt.Color(102, 0, 0));
jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/manage
room.png"))); // NOI18N jButton1.setText("MANAGE ROOM");
jButton1.addActionListener(new java.awt.event.ActionListener() {
{ jButton1ActionPerformed(evt);
});
java.awt.Color(102, 0, 0));
jButton2.setIcon(new
javax.swing.ImageIcon(getClass().getResource("/images/Customer Registration & Check
IN.png"))); // NOI18N jButton2.setText("CUSTOMER CHECK IN");
jButton2.addActionListener(new java.awt.event.ActionListener() {
{ jButton2ActionPerformed(evt);
});
java.awt.Color(102, 0, 0));
jButton3.setIcon(new
javax.swing.ImageIcon(getClass().getResource("/images/Customer Check Out.png"))); //
NOI18N jButton3.setText("CUSTOMER CHECK OUT");
jButton3.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt)
{ jButton3ActionPerformed(evt);
});
java.awt.Color(102, 0, 0));
jButton4.setIcon(new
javax.swing.ImageIcon(getClass().getResource("/images/Customer Details Bill.png"))); //
NOI18N jButton4.setText("CUSTOMER DETAIL BILLS");
jButton4.addActionListener(new java.awt.event.ActionListener() {
{ jButton4ActionPerformed(evt);
});
java.awt.Color(102, 0, 0));
jButton5.setIcon(new
javax.swing.ImageIcon(getClass().getResource("/images/logout.png"))); // NOI18N
jButton5.setText("LOGOUT"); jButton5.addActionListener(new
java.awt.event.ActionListener() { public void
actionPerformed(java.awt.event.ActionEvent evt) {
jButton5ActionPerformed(evt);
});
java.awt.Color(102, 0, 0));
jButton6.setIcon(new
javax.swing.ImageIcon(getClass().getResource("/images/exit.png"))); // NOI18N
jButton6.setText("EXIT"); jButton6.addActionListener(new
actionPerformed(java.awt.event.ActionEvent evt)
{ jButton6ActionPerformed(evt);
});
jLabel1.setIcon(new
javax.swing.ImageIcon(getClass().getResource("/images/home.png"))); // NOI18N
jLabel1.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
pack(); setLocationRelativeTo(null);
}// </editor-fold>
{ setVisible(false); new
login().setVisible(true);
}}
System.exit(0);
} private void
jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
Manageroom().setVisible(true);
CustomerCheckIn().setVisible(true);
new CustomerCheckOut().setVisible(true);
new CustomerDetailBill().setVisible(true);
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> try
if ("Nimbus".equals(info.getName()))
{ javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
java.util.logging.Logger.getLogger(home.class.getName()).log(java.util.logging.Level.SEVE
RE, null, ex);
java.util.logging.Logger.getLogger(home.class.getName()).log(java.util.logging.Level.SEVE
RE, null, ex);
java.util.logging.Logger.getLogger(home.class.getName()).log(java.util.logging.Level.SEVE RE,
null, ex);
java.util.logging.Logger.getLogger(home.class.getName()).log(java.util.logging.Level.SEVE RE,
null, ex);
//</editor-fold>
java.awt.EventQueue.invokeLater(new Runnable() {
});
javax.swing.JLabel jLabel1;
Manageroom.java:
Project.Select; import
com.sun.glass.events.KeyEvent; import
java.util.regex.Pattern; import
javax.swing.JOptionPane; import
javax.swing.table.DefaultTableModel; /*
*/
/**
* @author Lenovo
*/
/**
*/
/**
* This method is called from within the constructor to initialize the form. *
WARNING: Do NOT modify this code. The content of this method is always *
*/
@SuppressWarnings("unchecked")
void initComponents() {
javax.swing.JLabel();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
componentShown(java.awt.event.ComponentEvent evt)
{ formComponentShown(evt);
}); getContentPane().setLayout(new
org.netbeans.lib.awtextra.AbsoluteLayout());
jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/manage
room.png"))); // NOI18N jLabel1.setText("MANAGE
ROOM");
jButton1.setIcon(new
javax.swing.ImageIcon(getClass().getResource("/images/close.png"))); // NOI18N
{ jButton1ActionPerformed(evt);
});
getContentPane().add(jButton1, new
org.netbeans.lib.awtextra.AbsoluteConstraints(1230, 10, 31, -1));
Object [][] {
}, new String
[] {
));
jScrollPane1.setViewportView(jTable1);
getContentPane().add(jScrollPane1, new
org.netbeans.lib.awtextra.AbsoluteConstraints(83, 81, 598, -1));
jLabel2.setText("Room Number");
{ jTextField1KeyReleased(evt);
{ jTextField1KeyTyped(evt);
});
getContentPane().add(jTextField1, new
org.netbeans.lib.awtextra.AbsoluteConstraints(800, 110, 465, -1));
Type");
getContentPane().add(jComboBox1, new
org.netbeans.lib.awtextra.AbsoluteConstraints(800, 200, 465, -1));
jLabel4.setText("Bed");
getContentPane().add(jComboBox2, new
org.netbeans.lib.awtextra.AbsoluteConstraints(800, 280, 465, -1));
{ jTextField2KeyReleased(evt);
{ jTextField2KeyTyped(evt);
});
getContentPane().add(jTextField2, new
org.netbeans.lib.awtextra.AbsoluteConstraints(800, 360, 460, -1));
actionPerformed(java.awt.event.ActionEvent evt)
{ jButton2ActionPerformed(evt);
});
pack(); setLocationRelativeTo(null);
}// </editor-fold>
setVisible(false);
String roomNo=jTextField1.getText();
String roomType=(String)jComboBox1.getSelectedItem();
String bed=(String)jComboBox2.getSelectedItem();
String price=jTextField2.getText();
values('"+roomNo+"','"+roomType+"','"+bed+"','"+price+"','Not Booked')";
InsertUpdateDelete.setData(Query,"Successfully updated");
DefaultTableModel model=(DefaultTableModel)jTable1.getModel();
try
{ while(rs.next())
model.addRow(new
Object[]{rs.getString(1),rs.getString(2),rs.getString(3),rs.getString(4),rs.getString(5)});
} rs.close();
} catch(Exception
e)
JOptionPane.showMessageDialog(null,e);
}}
if(!(Pattern.matches("^[0-9]{0,4}$",jTextField1.getText())))
else{ room.setText(n
ull);
if(!(Pattern.matches("^[0-9]{0,9}$",jTextField2.getText())))
{ price.setText("Incorrect Price");
else{ price.setText(n
ull);
}}
c=evt.getKeyChar();
if(!(Character.isDigit(c)||(c==KeyEvent.VK_SPACE)||(c==KeyEvent.VK_DELETE)||(c==Ke
yEvent.VK_PERIOD)||(c==KeyEvent.VK_BACKSPACE)||(c==KeyEvent.VK_SHIFT))){
getToolkit().beep(); evt.consume();
}}
char c=evt.getKeyChar();
if(!(Character.isDigit(c)||(c==KeyEvent.VK_DELETE)||(c==KeyEvent.VK_PERIOD)||(c==K
eyEvent.VK_BACKSPACE))){
JOptionPane.showMessageDialog(null,"Incorrect Price");
getToolkit().beep(); evt.consume();
/**
args[]) {
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and
feel.
*/ try
if ("Nimbus".equals(info.getName()))
{ javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
java.util.logging.Logger.getLogger(Manageroom.class.getName()).log(java.util.logging.Leve
l.SEVERE, null, ex);
java.util.logging.Logger.getLogger(Manageroom.class.getName()).log(java.util.logging.Leve
l.SEVERE, null, ex);
java.util.logging.Logger.getLogger(Manageroom.class.getName()).log(java.util.logging.Leve
l.SEVERE, null, ex);
java.util.logging.Logger.getLogger(Manageroom.class.getName()).log(java.util.logging.Leve
l.SEVERE, null, ex);
//</editor-fold>
java.awt.EventQueue.invokeLater(new Runnable() {
Manageroom().setVisible(true);
});
room;
Customercheckin.java:
import Project.InsertUpdateDelete;
import Project.Select; import
com.sun.glass.events.KeyEvent; import
java.text.SimpleDateFormat; import
java.util.Calendar; import java.sql.*;
javax.swing.JOptionPane; import
project.*;
/*
*/
/**
* @author Lenovo
javax.swing.JFrame {
/**
*/ public CustomerCheckIn()
{ initComponents();
jTextField7.setEditable(false);
jTextField8.setEditable(false);
Calendar cal=Calendar.getInstance();
jTextField7.setText(myFormat.format(cal.getTime()));
String bed;
String roomType;
Price;
{ jComboBox4.removeAllItems();
jTextField8.setText("");
bed=(String)jComboBox2.getSelectedItem();
roomType=(String)jComboBox3.getSelectedItem();
try
while(rs.next())
{ jComboBox4.addItem(rs.getString(1));
}}
catch(Exception
e)
JOptionPane.showMessageDialog(null,e);
/**
* This method is called from within the constructor to initialize the form. *
WARNING: Do NOT modify this code. The content of this method is always
*/
@SuppressWarnings("unchecked")
void initComponents() {
javax.swing.JLabel();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
setLocation(new java.awt.Point(50, 118)); setUndecorated(true);
getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());
java.awt.Color(102, 0, 0));
jLabel1.setIcon(new
javax.swing.ImageIcon(getClass().getResource("/images/Customer Registration & Check
IN.png"))); // NOI18N jLabel1.setText("CUSTOMER CHECKIN");
jTextField1.addActionListener(new java.awt.event.ActionListener()
{ jTextField1ActionPerformed(evt);
});
{ jTextField1KeyTyped(evt);
}); getContentPane().add(jTextField1,
new
Number");
{ jTextField2KeyTyped(evt);
});
getContentPane().add(jTextField2, new
org.netbeans.lib.awtextra.AbsoluteConstraints(12, 242, 350, -1));
jLabel4.setText("Nationality");
{ jTextField3KeyTyped(evt);
});
getContentPane().add(jTextField3, new
org.netbeans.lib.awtextra.AbsoluteConstraints(12, 333, 350, -1));
{ jTextField5KeyReleased(evt);
});
getContentPane().add(jTextField5, new
org.netbeans.lib.awtextra.AbsoluteConstraints(12, 515, 350, -1));
getContentPane().add(jComboBox1, new
org.netbeans.lib.awtextra.AbsoluteConstraints(12, 418, 350, -1));
Proof");
getContentPane().add(jTextField4, new
org.netbeans.lib.awtextra.AbsoluteConstraints(440, 200, 350, -1));
jLabel8.setText("Address");
{ jTextField6KeyTyped(evt);
});
getContentPane().add(jTextField6, new
org.netbeans.lib.awtextra.AbsoluteConstraints(440, 290, 350, -1));
jLabel9.setText("Check IN Date(Today)");
getContentPane().add(jTextField7, new
org.netbeans.lib.awtextra.AbsoluteConstraints(440, 380, 350, -1));
jLabel10.setText("Bed");
actionPerformed(java.awt.event.ActionEvent evt)
{ jComboBox2ActionPerformed(evt);
});
getContentPane().add(jComboBox2, new
org.netbeans.lib.awtextra.AbsoluteConstraints(860, 152, 298, -1));
jLabel11.setText("Room Type");
{ jComboBox3ActionPerformed(evt);
});
getContentPane().add(jComboBox3, new
org.netbeans.lib.awtextra.AbsoluteConstraints(860, 242, 298, -1));
Number");
jComboBox4.addActionListener(new java.awt.event.ActionListener()
{ jComboBox4ActionPerformed(evt);
});
{ jComboBox4KeyTyped(evt);
});
getContentPane().add(jComboBox4, new
org.netbeans.lib.awtextra.AbsoluteConstraints(860, 333, 298, -1));
{ jTextField8KeyTyped(evt);
});
getContentPane().add(jTextField8, new
org.netbeans.lib.awtextra.AbsoluteConstraints(860, 418, 298, -1));
actionPerformed(java.awt.event.ActionEvent evt)
{ jButton2ActionPerformed(evt);
});
jButton3.setText("Clear"); jButton3.addActionListener(new
actionPerformed(java.awt.event.ActionEvent evt)
{ jButton3ActionPerformed(evt);
});
getContentPane().add(jComboBox5, new
org.netbeans.lib.awtextra.AbsoluteConstraints(437, 152, 350, -1));
jButton4.setIcon(new
javax.swing.ImageIcon(getClass().getResource("/images/close.png"))); // NOI18N
{ jButton4ActionPerformed(evt);
});
getContentPane().add(jButton4, new
org.netbeans.lib.awtextra.AbsoluteConstraints(1170, 0, 30, -1));
pack(); setLocationRelativeTo(null);
}// </editor-fold>
setVisible(false); new
CustomerCheckIn().setVisible(true);
roomNo=(String)jComboBox4.getSelectedItem();
try
while(rs.next())
{ jTextField8.setText(rs.getString(4));
} catch(Exception e)
JOptionPane.showMessageDialog(null, e); }
int id=1;
String name=jTextField1.getText();
String mobileNumber=jTextField2.getText();
String nationality=jTextField3.getText();
String gender=(String)jComboBox1.getSelectedItem();
String email=jTextField5.getText();
String idProof=jTextField4.getText();
String address=jTextField6.getText();
String checkIn=jTextField7.getText();
String bed=(String)jComboBox2.getSelectedItem();
String roomType=(String)jComboBox3.getSelectedItem();
String roomNo=(String)jComboBox4.getSelectedItem();
String Price=jTextField8.getText();
if(name.equals("")||mobileNumber.equals("")||nationality.equals("")||gender.equals("")||email.
equals("")||idProof.equals("")||address.equals("")||checkIn.equals("")||bed.equals("")||roomTyp
e.equals("")||roomNo.equals("")||Price.equals("")){
if(!(Pattern.matches("^[a-zA-Z0-9]+[@]+gmail+[.]+com",jTextField5.getText()))){
JOptionPane.showMessageDialog(null,"Invalid Email
Format"); }
else{
try
ResultSet rs=Select.getData(Query);
while(rs.next()) id=rs.getInt(1);
id=id+1;
if(!Price.equals(""))
InsertUpdateDelete.setData(Query,"");
Query="insert into
Customer(id,name,mobileNumber,nationality,gender,email,idProof,address,checkIn,roomNo,
bed,roomType,pricePerDay)
values("+id+",'"+name+"','"+mobileNumber+"','"+nationality+"','"+gender+"','"+email+"','"+i
dProof+"','"+address+"','"+checkIn+"','"+roomNo+"','"+bed+"','"+roomType+"','"+Price+"')";
}}
catch(Exception
e)
JOptionPane.showMessageDialog(null,e);
c=evt.getKeyChar();
if(!(Character.isAlphabetic(c)||(c==KeyEvent.VK_SPACE)||(c==KeyEvent.VK_DELETE)||(c
==KeyEvent.VK_PERIOD)||(c==KeyEvent.VK_BACKSPACE))){
JOptionPane.showMessageDialog(null,"Alphabets only");
getToolkit().beep(); evt.consume();
}}
c=evt.getKeyChar();
if(!(Character.isAlphabetic(c)||(c==KeyEvent.VK_SPACE)||(c==KeyEvent.VK_DELETE)||(c
==KeyEvent.VK_PERIOD)||(c==KeyEvent.VK_BACKSPACE))){
evt.consume();
}}
c=evt.getKeyChar();
if(!(Character.isDigit(c)||(c==KeyEvent.VK_SPACE)||(c==KeyEvent.VK_DELETE)||(c==Ke
yEvent.VK_PERIOD)||(c==KeyEvent.VK_BACKSPACE))){
JOptionPane.showMessageDialog(null,"Digits
c=evt.getKeyChar();
if(!(Character.isDigit(c)||(c==KeyEvent.VK_SPACE)||(c==KeyEvent.VK_DELETE)||(c==Ke
yEvent.VK_PERIOD)||(c==KeyEvent.VK_BACKSPACE))){
JOptionPane.showMessageDialog(null,"Digits
c=evt.getKeyChar();
if(!(Character.isDigit(c)||(c==KeyEvent.VK_SPACE)||(c==KeyEvent.VK_DELETE)||(c==Ke
yEvent.VK_PERIOD)||(c==KeyEvent.VK_BACKSPACE))){
JOptionPane.showMessageDialog(null,"Digits
}}
c=evt.getKeyChar();
if(!(Character.isDigit(c)||(Character.isAlphabetic(c)||(c==KeyEvent.VK_SPACE)||(c==KeyEv
ent.VK_DELETE)||(c==KeyEvent.VK_PERIOD)||(c==KeyEvent.VK_BACKSPACE)))){
JOptionPane.showMessageDialog(null,"Incorrect Address");
getToolkit().beep(); evt.consume();
}}
setVisible(false);
if(!(Pattern.matches("^[a-zA-Z0-9]+[@]+gmail+[.]+com$",jTextField5.getText())))
{ elab.setText("Incorrect Format");
else{ elab.setText(n
ull);
/**
args[]) {
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and
feel.
try {
if ("Nimbus".equals(info.getName()))
{ javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
java.util.logging.Logger.getLogger(CustomerCheckIn.class.getName()).log(java.util.logging.
Level.SEVERE, null, ex);
java.util.logging.Logger.getLogger(CustomerCheckIn.class.getName()).log(java.util.logging.
Level.SEVERE, null, ex);
java.util.logging.Logger.getLogger(CustomerCheckIn.class.getName()).log(java.util.logging.
Level.SEVERE, null, ex);
java.util.logging.Logger.getLogger(CustomerCheckIn.class.getName()).log(java.util.logging.
Level.SEVERE, null, ex);
//</editor-fold>
new CustomerCheckIn().setVisible(true);
});
javax.swing.JTextField jTextField8;
CustomerCheckOut.java:
import Project.InsertUpdateDelete;
import Project.Select; import
com.itextpdf.text.Paragraph; import
com.itextpdf.text.pdf.PdfPTable; import
com.itextpdf.text.pdf.PdfWriter; import
java.awt.Desktop; import java.io.File;
import java.io.FileOutputStream;
import java.sql.*; import
java.text.SimpleDateFormat;
java.util.Locale; import
javax.swing.JOptionPane; import
javax.swing.table.DefaultTableModel;
*/
/**
* @author Lenovo
javax.swing.JFrame {
/**
*/
jTextField2.setEditable(false);
jTextField3.setEditable(false);
jTextField4.setEditable(false);
jTextField5.setEditable(false);
jTextField6.setEditable(false);
jTextField7.setEditable(false);
jTextField8.setEditable(false);
jTextField9.setEditable(false);
} int
id=0;
String roomType;
String bed;
/**
* This method is called from within the constructor to initialize the form. *
WARNING: Do NOT modify this code. The content of this method is always
*/
@SuppressWarnings("unchecked")
void initComponents() {
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
componentShown(java.awt.event.ComponentEvent evt)
{ formComponentShown(evt);
}); getContentPane().setLayout(new
org.netbeans.lib.awtextra.AbsoluteLayout());
java.awt.Color(102, 0, 0));
jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/Customer
Check Out.png"))); // NOI18N jLabel1.setText("CUSTOMER
CHECKOUT");
jButton1.setIcon(new
javax.swing.ImageIcon(getClass().getResource("/images/close.png"))); // NOI18N
{ jButton1ActionPerformed(evt);
});
getContentPane().add(jButton1, new
Number");
getContentPane().add(jTextField1, new
org.netbeans.lib.awtextra.AbsoluteConstraints(406, 98, 107, -1));
jButton2.setText("Search"); jButton2.addActionListener(new
actionPerformed(java.awt.event.ActionEvent evt)
{ jButton2ActionPerformed(evt);
});
Object [][] {
},
new String [] {
));
jScrollPane1.setViewportView(jTable1);
getContentPane().add(jScrollPane1, new
org.netbeans.lib.awtextra.AbsoluteConstraints(10, 390, 1200, 200));
jLabel3.setText("Customer Name");
jTextField2.addActionListener(new java.awt.event.ActionListener()
{ jTextField2ActionPerformed(evt);
});
getContentPane().add(jTextField2, new
org.netbeans.lib.awtextra.AbsoluteConstraints(60, 206, 252, -1));
jLabel4.setText("Check IN Date");
getContentPane().add(jTextField3, new
org.netbeans.lib.awtextra.AbsoluteConstraints(347, 206, 252, -1));
getContentPane().add(jTextField4, new
org.netbeans.lib.awtextra.AbsoluteConstraints(634, 206, 252, -1));
jTextField5.addActionListener(new java.awt.event.ActionListener()
{ jTextField5ActionPerformed(evt);
});
getContentPane().add(jTextField5, new
org.netbeans.lib.awtextra.AbsoluteConstraints(954, 206, 252, -1));
getContentPane().add(jTextField6, new
org.netbeans.lib.awtextra.AbsoluteConstraints(60, 291, 252, -1));
getContentPane().add(jTextField7, new
org.netbeans.lib.awtextra.AbsoluteConstraints(347, 291, 252, -1));
getContentPane().add(jTextField8, new
org.netbeans.lib.awtextra.AbsoluteConstraints(634, 291, 252, -1));
jLabel10.setText("Email");
getContentPane().add(jTextField9, new
org.netbeans.lib.awtextra.AbsoluteConstraints(954, 291, 252, -1));
actionPerformed(java.awt.event.ActionEvent evt)
{ jButton3ActionPerformed(evt);
});
});
pack(); setLocationRelativeTo(null);
}// </editor-fold>
setVisible(false);
DefaultTableModel model=(DefaultTableModel)jTable1.getModel();
try
{ while(rs.next())
model.addRow(new
Object[]{rs.getString(1),rs.getString(2),rs.getString(3),rs.getString(4),rs.getString(5),rs.getStr
ing(6),rs.getString(7),rs.getString(8),rs.getString(9),rs.getString(10),rs.getString(11),rs.getStri
ng(12),rs.getString(13)});
} rs.close();
} catch(Exception
e)
JOptionPane.showMessageDialog(null,e);
}}
String roomNo=jTextField1.getText();
try
if(rs.next())
{ jTextField1.setEditable(false);
id=rs.getInt(1);
jTextField2.setText(rs.getString(2));
jTextField3.setText(rs.getString(9));
jTextField5.setText(rs.getString(3));
jTextField6.setText(rs.getString(13));
SimpleDateFormat myFormat=new
SimpleDateFormat("yyyy/MM/dd"); Calendar
cal=Calendar.getInstance();
jTextField4.setText(myFormat.format(cal.getTime())); String
dateBeforeString=rs.getString(9); java.util.Date
dateBefore=myFormat.parse(dateBeforeString); String
dateAfterString=myFormat.format(cal.getTime()); java.util.Date
dateAfter=myFormat.parse(dateAfterString); long
difference=dateAfter.getTime()-dateBefore.getTime(); int
noofDayStay=(int) (difference/(1000*60*60*24)); if(noofDayStay==0)
noofDayStay=1; jTextField7.setText(String.valueOf(noofDayStay));
float Price=Float.parseFloat(jTextField6.getText());
jTextField8.setText(String.valueOf(noofDayStay*Price));
jTextField9.setText(rs.getString(6));
roomType=rs.getString(12); bed=rs.getString(11);
else
} catch(Exception
e)
JOptionPane.showMessageDialog(null,e);
setVisible(false); new
CustomerCheckOut().setVisible(true);
String name=jTextField2.getText();
String mobileNumber=jTextField5.getText();
String email=jTextField9.getText();
String checkOut=jTextField4.getText();
String numberofDaysStay=jTextField7.getText();
String totalAmount=jTextField8.getText();
String roomNo=jTextField1.getText();
InsertUpdateDelete.setData(Query,"");
try
doc.add(paragraph1);
Paragraph paragraph2=new
Paragraph("*****************************************************************
***********************************************");
doc.add(paragraph2);
doc.add(paragraph3); doc.add(paragraph2);
doc.add(paragraph4); doc.add(paragraph2);
tb1.addCell("Check IN
Date:"+jTextField3.getText()); tb1.addCell("Check
Stay:"+numberofDaysStay); tb1.addCell("Total
doc.add(paragraph2);
doc.add(paragraph5);
catch(Exception e)
JOptionPane.showMessageDialog(null,e);
} doc.close();
{ try
File("D:\\"+id+".pdf")).exists())
{ if(Desktop.isDesktopSupported())
Desktop.getDesktop().open(pdfFile);
else{
else{
} catch(Exception
e)
JOptionPane.showMessageDialog(null,e);
} } setVisible(false); new
CustomerCheckOut().setVisible(true);
/**
args[]) {
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and
feel.
*/ try
for(javax.swing.UIManager.LookAndFeelInfo info :
javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName()))
{ javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
java.util.logging.Logger.getLogger(CustomerCheckOut.class.getName()).log(java.util.loggin
g.Level.SEVERE, null, ex);
java.util.logging.Logger.getLogger(CustomerCheckOut.class.getName()).log(java.util.loggin
g.Level.SEVERE, null, ex);
java.util.logging.Logger.getLogger(CustomerCheckOut.class.getName()).log(java.util.loggin
g.Level.SEVERE, null, ex);
java.util.logging.Logger.getLogger(CustomerCheckOut.class.getName()).log(java.util.loggin
g.Level.SEVERE, null, ex);
//</editor-fold>
java.awt.EventQueue.invokeLater(new Runnable() {
CustomerCheckOut().setVisible(true);
});
javax.swing.JTextField jTextField9;
BillDetailsCustomer.java: import
java.text.SimpleDateFormat; import
java.util.Calendar; import
java.sql.*; import Project.*; import
java.awt.Desktop;
javax.swing.JOptionPane; import
javax.swing.table.DefaultTableModel; import
javax.swing.table.TableModel;
/*
* and open the template in the editor. public class CustomerDetailBill extends
javax.swing.JFrame {
Calendar cal=Calendar.getInstance();
jTextField1.setText(myFormat.format(cal.getTime())); }
*/
@SuppressWarnings("unchecked")
void initComponents() {
javax.swing.JLabel();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
componentShown(java.awt.event.ComponentEvent evt)
{ formComponentShown(evt);
}); getContentPane().setLayout(new
org.netbeans.lib.awtextra.AbsoluteLayout());
java.awt.Color(102, 0, 0));
jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/Customer
Details Bill.png"))); // NOI18N jLabel1.setText("CUSTOMER
DETAIL BILL");
jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/close.png"))); //
NOI18N
{ jButton1ActionPerformed(evt);
});
getContentPane().add(jButton1, new
org.netbeans.lib.awtextra.AbsoluteConstraints(1230, 10, 30, -1));
getContentPane().add(jTextField1, new
org.netbeans.lib.awtextra.AbsoluteConstraints(560, 110, 200, -1));
jButton2.setText("Search"); jButton2.addActionListener(new
actionPerformed(java.awt.event.ActionEvent evt)
{ jButton2ActionPerformed(evt);
Object [][] {
}, new String
[] {
));
{ jTable1MouseClicked(evt);
});
jScrollPane1.setViewportView(jTable1);
getContentPane().add(jScrollPane1,new org.netbeans.lib.awtextra.AbsoluteConstraints(20,
150, 1230, 410)); jLabel4.setFont(new java.awt.Font("Algerian",
To Open Bill");
pack(); setLocationRelativeTo(null);
}// </editor-fold>
setVisible(false);
DefaultTableModel model=(DefaultTableModel)jTable1.getModel();
try
{ while(rs.next())
model.addRow(new
Object[]{rs.getString(1),rs.getString(2),rs.getString(3),rs.getString(4),rs.getString(5),rs.getStr
ing(6),rs.getString(7),rs.getString(8),rs.getString(9),rs.getString(10),rs.getString(11),rs.getStri
ng(12),rs.getString(13),rs.getString(14),rs.getString(15),rs.getString(16)});
} rs.close();
} catch(Exception
e)
JOptionPane.showMessageDialog(null,e);
evt) {
String checkoutDate=jTextField1.getText();
try
{ while(rs.next())
model.addRow(new
Object[]{rs.getString(1),rs.getString(2),rs.getString(3),rs.getString(4),rs.getString(5),rs.getStr
ing(6),rs.getString(7),rs.getString(8),rs.getString(9),rs.getString(10),rs.getString(11),rs.getStri
ng(12),rs.getString(13),rs.getString(14),rs.getString(15),rs.getString(16)});
} rs.close();
} catch(Exception
e)
JOptionPane.showMessageDialog(null,e);
index=jTable1.getSelectedRow();
TableModel model=jTable1.getModel();
File("D:\\"+id+".pdf")).exists())
{ if(Desktop.isDesktopSupported())
Desktop.getDesktop().open(pdfFile);
else{
else{
} catch(Exception e)
JOptionPane.showMessageDialog(null,e);
args[]) {
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> try
if ("Nimbus".equals(info.getName()))
{ javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
java.util.logging.Logger.getLogger(CustomerDetailBill.class.getName()).log(java.util.loggin
g.Level.SEVERE, null, ex);
java.util.logging.Logger.getLogger(CustomerDetailBill.class.getName()).log(java.util.loggin
g.Level.SEVERE, null, ex);
java.util.logging.Logger.getLogger(CustomerDetailBill.class.getName()).log(java.util.loggin
g.Level.SEVERE, null, ex);
java.util.logging.Logger.getLogger(CustomerDetailBill.class.getName()).log(java.util.loggin
g.Level.SEVERE, null, ex);
//</editor-fold>
java.awt.EventQueue.invokeLater(new Runnable() {
CustomerDetailBill().setVisible(true);
});
javax.swing.JTextField jTextField1;
6. CONCLUSION
Finally, in the Online hotel management system, we have developed a secure, user-friendly
Hotel Management System. This System can take care of each member whether its Owner or
Customer. This System will Help them to properly Manage their hotel and help in growth
without creating any hassle.
This system is completely secure since every user is provided with a user ID and Password so
there is no chance of any unauthorized access. Online Payment, Booking, and cancellation
make it easier to use. So, using this system will help in reducing the labor and provide more
facility for Customer to like Hotel and visit again and again.
7. REFERENCES:
• www.java.sun.com/docs/books/tutorial
• Kathy Sierra book
• Wrox professional Java
• www.javatpoint.com
• Btech days youtube