Hotel-Management-project

所属分类:项目管理
开发工具:Java
文件大小:0KB
下载次数:0
上传日期:2020-09-30 17:32:42
上 传 者sh-1993
说明:  酒店管理项目,,
(Hotel-Management-project,,)

文件列表:
ERD.png (115132, 2020-09-30)
Project Report.pdf (1863688, 2020-09-30)
Screenshots/ (0, 2020-09-30)
Screenshots/Add Staff.PNG (14362, 2020-09-30)
Screenshots/Add item.PNG (10802, 2020-09-30)
Screenshots/Book Food.PNG (12617, 2020-09-30)
Screenshots/Checkout confirmation.PNG (27968, 2020-09-30)
Screenshots/Customer List.PNG (18065, 2020-09-30)
Screenshots/Login.PNG (15125, 2020-09-30)
Screenshots/Remove Item.PNG (10120, 2020-09-30)
Screenshots/Restaurant menu.PNG (30277, 2020-09-30)
Screenshots/Room Booking.PNG (20514, 2020-09-30)
Screenshots/Room list.PNG (20846, 2020-09-30)
Screenshots/Staff Info.PNG (17681, 2020-09-30)
Screenshots/Vacant Room.PNG (20380, 2020-09-30)
Screenshots/incorrect aadhar.PNG (29050, 2020-09-30)
Screenshots/main screen.PNG (61712, 2020-09-30)
build.xml (3560, 2020-09-30)
build/ (0, 2020-09-30)
build/built-jar.properties (99, 2020-09-30)
build/classes/ (0, 2020-09-30)
build/classes/hotel/ (0, 2020-09-30)
build/classes/hotel/management/ (0, 2020-09-30)
build/classes/hotel/management/AddItem$1.class (786, 2020-09-30)
build/classes/hotel/management/AddItem$2.class (786, 2020-09-30)
build/classes/hotel/management/AddItem$3.class (549, 2020-09-30)
build/classes/hotel/management/AddItem.class (8819, 2020-09-30)
build/classes/hotel/management/AddStaff$1.class (793, 2020-09-30)
build/classes/hotel/management/AddStaff$2.class (793, 2020-09-30)
build/classes/hotel/management/AddStaff$3.class (553, 2020-09-30)
build/classes/hotel/management/AddStaff.class (10370, 2020-09-30)
build/classes/hotel/management/BookFood$1.class (793, 2020-09-30)
build/classes/hotel/management/BookFood$2.class (793, 2020-09-30)
build/classes/hotel/management/BookFood$3.class (553, 2020-09-30)
build/classes/hotel/management/BookFood.class (9888, 2020-09-30)
build/classes/hotel/management/Credentials.class (410, 2020-09-30)
build/classes/hotel/management/CustomerList$1.class (989, 2020-09-30)
build/classes/hotel/management/CustomerList$2.class (789, 2020-09-30)
build/classes/hotel/management/CustomerList$3.class (821, 2020-09-30)
... ...

# Hotel Management System This is a JAVA application which is a Hotel Management System. ## How to Use - Use Windows - Open src/Students/Credentials.java - Edit the sqlPassword to match the password of sql in your system - Run dist/Result ## Entity Relationship Diagram ![img](https://github.com/ayush1999guptA/Hotel-Management-project/blob/master/ERD.png) ## Implementation ### About the Framework: Swing is a GUI widget toolkit for Java. It is part of Oracle’s Java Foundation Classes (JFC) – an API for providing a graphical user interface (GUI) for Java programs. Swing API is set of extensible GUI Components to ease developer’s life to create JAVA based Front End/ GUI Applications. It is built upon top of AWT API and acts as replacement of AWT API as it has almost every control corresponding to AWT controls. ### Database Used: This project uses MySQL as its database. MySQL is an open source relational database management system (RDBMS). MySQL is free and open-source software under the terms of the GNU General Public License, and is also available under a variety of proprietary licenses. MySQL runs on virtually all platforms, including Linux, UNIX and Windows. Although it can be used in a wide range of applications, MySQL is most often associated with web applications and online publishing. ### Connecting with the Database: `try{` `Class.forName("com.mysql.jdbc.Driver");` `Connection con;` `con=DriverManager.getConnection("JDBC:mysql://localhost:3306/mysql","root",Credentials.sqlPassword);` `Statement stmt;` `stmt = con.createStatement();` `stmt.executeUpdate("USE hotelsystem");` `stmt.executeUpdate("insert into staff(name,contact,aadhar,username,password,work)` `values('"+name+"','"+contact+"','"+aadhar+"','"+usr+"','"+pass+"','"+work+"');");` `JOptionPane.showMessageDialog(frame, "Staff Added");` `new MainScreen().setVisible(true);` `this.setVisible(false);` ` }` `catch( Exception e){` `System.out.println(“Exception: “+e);` `}` Here, JDBC is used to connect the program with the database. The JDBC standard defines an application program interface (API) that Java programs can use to connect to database servers. The word JDBC stands for Java Database Connectivity. Each database product that supports JDBC provides a JDBC driver that must be dynamically loaded in order to access the database from Java. This is done by invoking Class.forName with one argument specifying a concrete class implementing the java.sql.Driver interface. This interface provides for the translation of product-independent JDBC calls into the product-specific calls needed by the specific database management system being used. The driver is available in a .jar file at vendor Web sites and should be placed within the classpath so that the Java compiler can access it. The Java program must import java.sql.*, which contains the interface definitions for the functionality provided by JDBC. The first step in accessing a database from a Java program is to open a connection to the database. This step is required to select which database to use, here mysql. Only after opening a connection can a Java program execute SQL statements. A connection is opened using the getConnection method of the DriverManager class (within java.sql). This method takes three parameters. - The first parameter to the getConnection call is a string that specifies the URL, or machine name, where the server runs (here, mysql://localhost:3306/mysql), along with possibly some other information such as the protocol to be used to communicate with the database, the port number the database system uses for communication, and the specific database on the server to be used. - The second parameter to getConnection is a database user identifier, that is a string. - The third parameter is a password, that is also a string and is stored in Credentials.java file. Once a database connection is open, the program can use it to send SQL statements to the database system for execution. This is done via an instance of the class Statement. To execute a statement, we invoke either the executeQuery method or the executeUpdate method, depending on whether the SQL statement is a query (and thus, returns a result set) or non-query statement such as update, insert, delete, create table, etc.

近期下载者

相关文件


收藏者