- Implement a simple Library Manage System with the following function :
- Create user
- Login in user
- Sign out user
- View all books
- View all books borrowed by user
- Add bookItems
- Borrowed bookItems
- Return bookItems
- Search bookItems
- Using TDD (Test-Driven Development) to develope
File : LibraryManageSystem/src/testing
- AllTests.java
- testAddBookItem.java
- testBorrowBooks.java
- testReturnBooks.java
- testSearchBookItem.java
- testShowBookItems.java
- testShowBooksBorrowedByUser.java
- testUserLogin.java
- testUserRegister.java
Reference : https://clay-atlas.com/blog/2019/11/16/mysql-mysqlworkbench-tutorial-download-install-steps/
Import Dump20210610.sql into database
Toolbar : Server >> Data Import
File : LibraryManageSystem/src/development/jdbcConnection.java
Modify String dbUser = "root"; String daPassword = "1234"; to your own dbUser and dbPassword
public static Connection dataBaseConnection() {
Connection myConnection = null;
String url = "jdbc:mysql://localhost:3306/librarymanagesystemdb";
String dbUser = "root";
String daPassword = "1234";
try {
//Get a connection to DB
myConnection = DriverManager.getConnection(url, dbUser, daPassword);
} catch (Exception e) {
e.printStackTrace();
}
return myConnection;
}Click Register to sign up a user account
Enter User Account , User Password and click Sign Up
Enter User Account , User Password and click Sign In
Click View All to show all bookItems
Enter Book Name or Author to find the bookItem
Click Borrow to borrow bookItem
Click My Book to show all bookItem borrowed by user
Click Return to borrow bookItem
Click Sign Out and login with User Account : admin User Password : 1234
Click Add Book and enter Book Name , Author and Inventory












