Professional Documents
Culture Documents
1
Problem definition
EXISTING SYSTEM:-
The first problem is that there are lots of hard copy
documents being generated. This brings us to the age old
discussion of keeping information in the form databases
versus keeping the same on sheets of paper. Keeping the
information in the form of hard copied documents leads to
the following problems.Choosing the right Text Editor was so
difficult so that we can write the codes essily in less time.
3
PROPOSED SYSTEM
This Software provides the informations of New technologies
of the world wide. It saves time as it allows numbers of
students to give the exam at a time and displays the results
as the test gets over, so no need to wait for the result. It is
automatically generated by the server. Administrator has a
privilege to create, modify and delete the test papers and its
particular questions.
User can register, login and give the test with his specific id,
and can see the results as well.
4
System Required for this Application:-
Software requirement-
Hardware requirement-
Processor: Pentium core & above
Physical memory: 2GB Ram &above.
Monitor
Netbeans
Mysql
Programming Language
Java
5
java
Java is a general-purpose computer programming language that is
concurrent, class-based, object-oriented, and specifically designed to
have as few implementation dependencies as possible. It is intended
to let application developers “ write once, run anywhere “(WORA),
meaning that complied Java code can run on all platforms that
support Java without the need for recompilation. Java a applications
are typically compiled to bytecode that can run on any Java Virtual
Machine (JVM) regardless of computer architecture. As of 2016, Java
is one of the most popular programming languages in use,
particularly for vlient-server web applications, with a reported 9
million developers. Java was originally developed by James Gosling at
Sun Microsystems (which has since been acquired by Oracle
Corporation) and released in 1995 as a core component of Sun
Microsystems Java platform. The language derives much of its syntax
from C and C++, but it has fewer low level facilities than either of
them.
6
Principles
There were five primary goals in the creation of the Java language:
7
mysql
MySQL is a database system used for developing web-based
software applications. It is a relational database management
system It is fast, reliable, and flexible and easy to use. It
supports standard SQL .It is free to download and use. It was
developed by Michael Widenius and David Axmark in 1994. It is
presently developed, distributed, and supported by Oracle
Corporation. It is the world's most popular open source
database. With its proven performance, reliability and ease-of-
use, MySQL has become the leading database choice for web-
based applications.
8
Mysql Syntax
CREATE TABLE customers(customer_id int NOT
NULL,customer_name char(50) NOT NULL,address
char(50),Room_no int,Email_ID varchar(50),Check_In_Date
date,Mobile_Number varchar(20),PRIMARY KEY
(customer_id));
9
Netbeans
NetBeans is an integrated development environment (IDE) for
Java. NetBeans runs on Windows, macOS, Linux etc.NetBeans is
created for developers who want to build applications in a fast
and smart way by providing rich code analyzers, editors, and
converters that support the latest Java technologies. It enables
developers to take advantage of the advanced Java 8(and
above) language constructs to quickly and easily upgrade
applications.The system will also run smoothly on any
operating platform without the need to adjust any of the users’
coding scheme. It also provides a vast number of editing tools
which can work on different languages such as JavaScript, XML,
and HTML.
10
interfaces
Home Page
CODE
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
setVisible(false);
LoginForm l= new LoginForm();
l.setVisible(true);
11
Login page
CODE
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
try
{
String
dbURL="jdbc:mysql://localhost:3306/xxxx?zeroDateTimeBehavior=CONVERT_T
O_NULL";
Connection
dbcon=java.sql.DriverManager.getConnection(dbURL,"root","aniket@12");
Statement stmt=dbcon.createStatement();
String query="Select * from login";
ResultSet rs=stmt.executeQuery(query);
System.out.println(query);
int c=0;
while(rs.next())
{
String uval=rs.getString(1);
String pwdval=rs.getString(2);
if(user.getText().equals(uval) && pass.getText().equals(pwdval))
12
{
c++;
JOptionPane.showMessageDialog(null, "Login Sucessful");
setVisible(false);
Menu d=new Menu();
d.setVisible(true);
break;
}
}
if(c==0)
{
JOptionPane.showMessageDialog(null, "Wrong Username or
Password");
}
}
catch(SQLException e)
{
System.out.print(e.getMessage());
}
}
}
private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {
setVisible(false);
Home l= new Home();
l.setVisible(true);
}
13
Signup Form
CODE
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
try
{
String
dbURL="jdbc:mysql://localhost:3306/xxxx?zeroDateTimeBehavior=CONVERT_
TO_NULL";
Connection
dbCon=java.sql.DriverManager.getConnection(dbURL,"root","aniket@12");
String query= "insert into login values
('"+Uname.getText()+"','"+pass.getText()+"')";
System.out.println(query);
PreparedStatement pstmt=dbCon.prepareStatement(query);
pstmt.executeUpdate(query);
JOptionPane.showMessageDialog(null, "Account Created");
setVisible(false);
LoginForm L1=new LoginForm();
L1.setVisible(true);
}
catch(SQLException e)
{
JOptionPane.showMessageDialog(null,"Username already Exists");
14
}
}
15
Home
CODE
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
setVisible(false);
Coustomer_Information s=new Coustomer_Information();
s.setVisible(true);
}
16
Customer Information
CODE
try
String
dbURL="jdbc:mysql://localhost:3306/xxxx?zeroDateTimeBehavior=CONVERT_TO_N
ULL";
Connection
dbCon=java.sql.DriverManager.getConnection(dbURL,"root","aniket@12");
+ "('"+id.getText()+"','"+name.getText()+"','"+address.getText()+
17
"','"+city.getText()+"','"+EID.getText()+"')";
System.out.println(query);
PreparedStatement pstmt=dbCon.prepareStatement(query);
pstmt.executeUpdate(query);
catch(SQLException e)
System.out.print(e.getMessage());
setVisible(false);
s.setVisible(true);
setVisible(false);
18
Menu d=new Menu();
d.setVisible(true);
id.setText("");
name.setText("");
address.setText("");
city.setText("");
EID.setText("");
19
Room
CODE
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
try
{
String
dbURL="jdbc:mysql://localhost:3306/xxxx?zeroDateTimeBehavior=CONVERT_TO_NULL";
Connection
dbCon=java.sql.DriverManager.getConnection(dbURL,"root","aniket@12");
Statement stmt=dbCon.createStatement();
String query= "Update customer_Information set Room_no=
"+roomNo.getText()+" where customer_id = '"+CID.getText()+"';";
String query2= "Update customer_Information set Check_In_Date=
'"+in.getText()+"' where customer_id = '"+CID.getText()+"';";
String qurey1="Insert Into room values ("+roomNo.getText()+",'Not Available');";
System.out.println(query);
System.out.println(qurey1);
stmt.executeUpdate(query);
stmt.executeUpdate(qurey1);
JOptionPane.showMessageDialog(null, "Room Booked");
}
catch(SQLException e)
{
JOptionPane.showMessageDialog(null, "Room already Booked/Not available");
}
}
CODE
public void showRecords()
{
try
{
String
dbURL="jdbc:mysql://localhost:3306/xxxx?zeroDateTimeBehavior=CONVERT_TO_NULL
";
Connection
dbCon=java.sql.DriverManager.getConnection(dbURL,"root","aniket@12");
Statement stmt=dbCon.createStatement();
String query= "Select * from customer_Information";
System.out.println(query);
ResultSet rs=stmt.executeQuery(query);
jTable1.setModel(DbUtils.resultSetToTableModel(rs));
}
catch(Exception e)
{
JOptionPane.showMessageDialog(null, e.getMessage());
}
}
private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {
21
showRecords();
}
22
String
dbURL="jdbc:mysql://localhost:3306/xxxx?zeroDateTimeBehavior=CONVERT_TO_NULL
";
Connection
dbCon=java.sql.DriverManager.getConnection(dbURL,"root","aniket@12");
Statement stmt=dbCon.createStatement();
String query= "Select * from room where Room_no="+Rnum.getText()+";";
System.out.println(query);
ResultSet rs=stmt.executeQuery(query);
room.setModel(DbUtils.resultSetToTableModel(rs));
}
catch(Exception e)
{
JOptionPane.showMessageDialog(null, e.getMessage());
}
}
23
Update Information
CODE
public void showRecords()
try
String
dbURL="jdbc:mysql://localhost:3306/xxxx?zeroDateTimeBehavior=CONVERT_TO_NULL";
Connection
dbCon=java.sql.DriverManager.getConnection(dbURL,"root","aniket@12");
Statement stmt=dbCon.createStatement();
System.out.println(query);
ResultSet rs=stmt.executeQuery(query);
24
jTable1.setModel(DbUtils.resultSetToTableModel(rs));
catch(Exception e)
JOptionPane.showMessageDialog(null, e.getMessage());
showRecords();
try
String
dbURL="jdbc:mysql://localhost:3306/xxxx?zeroDateTimeBehavior=CONVERT_TO_NULL";
Connection
dbCon=java.sql.DriverManager.getConnection(dbURL,"root","aniket@12");
Statement stmt=dbCon.createStatement();
System.out.println(query);
ResultSet rs=stmt.executeQuery(query);
room.setModel(DbUtils.resultSetToTableModel(rs));
catch(Exception e)
JOptionPane.showMessageDialog(null, e.getMessage());
25
}
try
String
dbURL="jdbc:mysql://localhost:3306/xxxx?zeroDateTimeBehavior=CONVERT_TO_NULL";
Connection
dbCon=java.sql.DriverManager.getConnection(dbURL,"root","aniket@12");
Statement stmt=dbCon.createStatement();
System.out.println(query);
ResultSet rs=stmt.executeQuery(query);
jTable1.setModel(DbUtils.resultSetToTableModel(rs));
catch(Exception e)
JOptionPane.showMessageDialog(null, e.getMessage());
try
String
dbURL="jdbc:mysql://localhost:3306/xxxx?zeroDateTimeBehavior=CONVERT_TO_NULL";
26
Connection
dbCon=java.sql.DriverManager.getConnection(dbURL,"root","aniket@12");
Statement stmt=dbCon.createStatement();
System.out.println(query);
ResultSet rs=stmt.executeQuery(query);
room.setModel(DbUtils.resultSetToTableModel(rs));
catch(Exception e)
JOptionPane.showMessageDialog(null, e.getMessage());
setVisible(false);
n.setVisible(true);
setVisible(false);
m.setVisible(true);
27
CONCLUSION
The conclusion of this project is, A Hotel management
system is a computerized management system. This
system keeps the records of Customers and rooms of a
organization. The proposed system will keep a track of
customer Information and room status. This project has
GUI based software that will help in storing, updating
and retrieving the information. The project “Hotel
Management System” is aimed to develop to maintain
the day-to-day state of check in of customers,etc. Main
objective of this project is to provide solution for hotel
to manage most there work using computerized process.
This software application will help to handle customers
information, room allocation details. The existing
system is a manually maintained system. All the details
are entered and retrieved manually, because of this
there are many disadvantages like Time Consuming,
updating process, inaccuracy of data. For avoiding this
we introduced or proposed a new system in proposed
system the computerized version of the existing system
provides easy and quick access over the data .
28
BIBLIOGRAPHY
Information Technology Class XII(Book)
Internet
https://www.java.com
https://www.mysql.com
https://netbeans.apache.org
https://www.wikipedia.org
https://www.w3schools.com
29