Java Microproject
Java Microproject
MICRO PROJECT
Academic Year (2023-2024)
TITLE OF PROJECT
Library Management System
Page | 1
MAHARASHTRA STATE
BOARD OF TECHNICAL EDUCATION Certificate
Page | 2
Member Details
Page | 3
INDEX
01 Abstract 5
02 Introduction 6
03 Aim 7
04 System Requirement 8
05 ER Diagram 9
07 Program 18-21
08 Output 22-23
09 Conclusion 24
10 Reference 25
Page | 4
Abstract
Page | 5
Intoduction
Page | 6
Aim
Student login page where student can find books issued by him/her and date of return.
A teacher login page where teacher can add any events being organized in the college and important
Page | 7
System Requirements
To execute the below project, you will need the following business requirements:
The rs2xml jar is used to display the data in a table format. So, once you create a project in Eclipse
To do that, right-click on the project, choose Build Path -> Configure Build Path. In the dialog
Add External JARs, and add the JAR files. Once added, click on Apply and Close. Refer below.
Tables Considered
Now, for this particular project, I have considered three tables, which are:
Users -> This table consists of the columns {UID, Username, Password, Admin}
Books-> The book’s table consists of the columns {BID, Book name, Price, Genre}
Issue -> This table consists of the columns {IID, UID, BID, IssueDate, Period, ReturnDate, Fine}
Page | 8
ER Diagram
Page | 9
Functions used in Library Management System
Login
I have created this function to enable the user and the admin login. So, initially when a user logs
in for the first time, that user will be an admin by default, and the username and password will
be {admin, admin}. Refer below.
First steps after creating the data model are to make sure that you create an MS Access Database
called StudentDB.mdb. If you have MS Access 2007 or higher version, save your database with
For this schema, I have considered only one admin. So, once a user logs in as an admin, he or
she will be redirected to the admin menu as below. I will discuss the functions of the admin in
the admin menu section.
Page | 10
View Books
Once, you click on View Books button, you will see the below frame displaying all the books present in the
database, with their details.
View Users
The View Users button is used to view the current users on the system. Since we just have only one user
present i.e the admin, it will show you output as below:
Create/Reset
Page | 11
This functionality is used to create or reset a database. So, once you click on the button Create/Rest, you will
see the below output:
Add User
To add a user, click on the option “Add User” and mention details such as username, password and
choose the radio button user or admin. By default, it will be the user. Then, click on Create.
Now, again if you click on View Users button, you will see the below output:
Page | 12
Alright, so now that we have added a user. Let us say, that particular user wants to issue books. To do that,
the user has to choose the option of Issue Book.
Issue Book
Suppose, if you are the user, once you click on the Issue Book button, you have to mention the Book ID,
User ID, Period(Number of days for issuing the book), and the Issue Date as follows:
Then click on Submit. Once, you click on Submit, you will see the below dialog box:
Page | 13
Now, if you want to see the issued books details, you can use the View Issued Books functionality.
Once you click on this button, you will see the following output:
Alright, so, now if the user logs in to the system, using the login function, as below:
Here, the user can view all the books in the database by using the View Books option and the books
issued by the user in the My Books section as below:
Page | 14
Now, if you wish to return the book, then you have to choose the option of Return Book.
Return Book
Once, you click on the Return Book, mention the Issue ID and the return date as below. Then click
on Return.
After that, you again see a dialog box, showing the message “Book Returned“. Refer below.
Now, if you click on the View Issued Books, you will see the below output:
Page | 15
Lastly, if you wish to add a book, you can use the option of Add Book.
Add Book
Click on the Add Book button, and mention the book name, genre and price. Then, click on the Submit
button. Refer below.
Apart from this, you can also, see the added books in the View Books section as below:
Page | 16
.
Page | 17
Program
Import java.util.ArrayList;
Import java.util.Scanner;
Class Book {
Private String title;
Private String author;
Private boolean available;
Class Library {
Page | 18
Private ArrayList<Book> books;
Public Library() {
This.books = new ArrayList<>();
}
Page | 19
}
}
Return null;
}
Page | 20
While (true) {
System.out.println(“\nMenu:”);
System.out.println(“1. Display Available Books”);
System.out.println(“2. Borrow a Book”);
System.out.println(“3. Return a Book”);
System.out.println(“4. Exit”);
System.out.print(“Enter your choice: “);
Int choice = scanner.nextInt();
Scanner.nextLine(); // Consume newline
Switch (choice) {
Case 1:
Library.displayAvailableBooks();
Break;
Case 2:
System.out.print(“Enter the title of the book you want to borrow:
“);
String borrowTitle = scanner.nextLine();
Book borrowedBook = library.borrowBook(borrowTitle);
If (borrowedBook != null) {
System.out.println(“You have borrowed: “ +
borrowedBook.getTitle());
Page | 21
} else {
System.out.println(“Sorry, the book is not available.”);
}
Break;
Case 3:
System.out.print(“Enter the title of the book you want to return: “);
String returnTitle = scanner.nextLine();
Book returnedBook = library.borrowBook(returnTitle);
If (returnedBook != null) {
Library.returnBook(returnedBook);
} else {
System.out.println(“Invalid book title or book is already
returned.”);
}
Break;
Case 4:
System.out.println(“Exiting the Library Management System.
Goodbye!”);
System.exit(0);
Break;
Default:
System.out.println(“Invalid choice. Please enter a number between
1 and 4.”);
}
}
}
}
Page | 22
Output
Menu:
1. Display Available Books
2. Borrow a Book
3. Return a Book
4. Exit
Enter your choice: 1
Available Books:
Java Programming by John Doe
Python Programming by Jane Smith
C++ Programming by James Johnson
Menu:
1. Display Available Books
2. Borrow a Book
3. Return a Book
4. Exit
Enter your choice: 2
Enter the title of the book you want to borrow: Python Programming
You have borrowed: Python Programming
Menu:
1. Display Available Books
2. Borrow a Book
3. Return a Book
4. Exit
Page | 23
Enter your choice: 3
Enter the title of the book you want to return: Python Programming
Book returned: Python Programming
Menu:
1. Display Available Books
2. Borrow a Book
3. Return a Book
4. Exit
Enter your choice: 4
Exiting the Library Management System. Goodbye!
Conclusion
Library Management Software is a valuable tool for educational institutions, enabling efficient
management of library resources and operations. By automating tasks, streamlining processes,
Page | 24
and enhancing accessibility, it simplifies the librarian’s role and offers a seamless experience
for students and staff. With its numerous benefits, this software is a cost-effective and practical
solution for modern libraries, helping them adapt to the digital age while maintaining the
integrity of their collections and services.
Reference
Page | 25
I. https://1drv.ms/w/s!Avkg8pJMR19MlUYkmF6hf5a7OXMc?e=Z5dh7o
II. https://www.edureka.co/blog/library-management-system-project-in-java
III. https://www.ijraset.com/research-paper/library-management-system
IV. https://www.studocu.com/in/document/indian-institute-of-education-and-
business-management/marketing/library-management-system/30922725
V. https://www.ijraset.com/research-paper/library-management-system
Page | 26
WEEKLY PROGRESS REPORT
MICRO PROJECT
Sr No.
Week Activity Performed Sign of Guide Date
Page | 27
ANEEXURE – II
Evaluation Sheet for the Micro Project
Roll No Student Name Marks out of 6 for Marks out of 4for Total out of 10
performance performance in oral/
presentation
(Signature of faculty)
Page | 28