BookTracker Library Automation System
BookTracker Library Automation System
of
by
Onisha Dewangan
Roll No. W2301541
Enroll. No. SRUAD1001
2023-2024
I the undersigned solemnly declare that the report of the thesis work entitled “BookTracker: Library
Automation System” is based my own work carried out during the course of my study
under the supervision of MR. Deepesh Dewangan
I assert that the statements made and conclusions drawn are an outcome of the project
work. I further declare that to the best of my knowledge and belief that the report does not contain
any part of any work which has been submitted for the award of any other
degree/diploma/certificate in this University /deemed University of India or any other country.
Onisha Dewangan
Roll No. W2301541
----------------------------------
(Signature of the HOD)
This is to certify that project work entitled “BookTracker: Library Automation System” carried out
by “Onisha Dewangan (Roll No. W2301541)” in Department of Computer Science & Engineering,
SRU Raipur. We here by accepted and approved after proper evaluation as a creditable work
submitted in partial fulfillment of the requirement for the award of the Degree, Post Graduate Diploma
in Computer Application at Shri Rawatpura Sarkar University, Raipur. Objective of this Project
Report is Satisfactory/ Unsatisfactory for the partial fulfillment of the requirement for the award of the
Degree, Computer Application
--------------------- --------------------
Internal Examiner External Examiner
Date: Date:
ACKNOWLEDGEMENT
I am further indebted to Mr. Deepesh Dewangan, Head of Department, Computer Science &
Engineering for his kind support, valuable suggestion and allowing me to use all facilities that are
available in the Department during this project.
I express cordial thanks to Prof. R.R.L. Birali, Dean, Faculty of Engineering, Shri Rawatpura
Sarkar University, Raipur (C.G.) for extending all the possible help and allowing me to use all the
resources that are the available in the Institute.
I am also thankful to my Family members and Friends for their valuable corporation and
standing with me in all difficult conditions.
Onisha Dewangan
Roll No. W2301541
ABSTRACT
The presented Java application serves as a comprehensive Library Management System (LMS),
enabling efficient management of library resources through a graphical user interface (GUI). This
system includes key functionalities such as adding books, issuing books to customers, returning
books, and displaying available books. The LMS is built using Java's `Swing` framework for the GUI,
and it utilizes serialization for persistent data storage.
1. Book Class : Represents a book with attributes for title, author, quantity, and a record of issued
copies to customers. It implements the `Serializable` interface to allow for saving and loading book
data to and from a file.
3. Main Class : Acts as the entry point for the application, initializing the
`LibraryManagementSystem` and setting up the main menu interface using `Swing`. It includes
methods to create different activity interfaces for adding, issuing, and returning books, as well as
displaying available books.
The GUI components include various `JFrame`, `JPanel`, `JButton`, `JLabel`, `JTextField`, and
`JTextArea` elements, organized to facilitate user interactions with the system. Action listeners are
implemented to handle user inputs and perform the corresponding library operations, ensuring an
intuitive and responsive user experience.
This LMS application showcases how Java's object-oriented features and GUI capabilities can be
combined to create a functional and user-friendly system for managing library operations.
TABLES OF CONTENT
1. Introduction
Introduction
2. LITERATURE REVIEW
Literature Review on Library Management Systems
3. CHARACTERIZATION OF MATERIAL
Potential Improvements.
Code Structure and Organization.
User Interaction.
Error Handling and Data Validation.
Persistence.
Main Components.
5. CONCLUSION
Conclusion
Future Scope
Chapter-1
Introduction
CHAPTER 1
INTRODUCTION
The Library Management System (LMS) presented here is a robust software application
aimed at simplifying and automating the management of a library's book collection. Developed in
Java, the system utilizes AWT and Swing libraries to create an intuitive graphical user interface,
facilitating ease of use for both librarians and library patrons. The LMS encompasses a range of
fundamental features necessary for efficient library management, including the ability to add new
books, issue books to patrons, and process book returns.
A significant feature of this system is its data persistence capability. Book records are
saved to a file named "library_books.dat" using serialization. This ensures that all data is retained
between sessions, allowing the library to recover its state even after the application is closed and
reopened. This persistence is crucial for maintaining a consistent and reliable record of the
library’s inventory and transactions.
The LMS also offers a user-friendly graphical interface for various operations. The main
menu provides options to add books, issue books, return books, and display available books. Each
of these operations is supported by specific interfaces that collect necessary information from the
user and perform the required actions. For instance, when issuing a book, the system checks the
available quantity and updates the records accordingly.
Moreover, the system provides detailed feedback to the user through text areas and
message dialogs, ensuring that users are informed about the success or failure of their actions. This
feedback loop is essential for maintaining transparency and user satisfaction.
Chapter-2
LITERATURE REVIEW
CHAPTER 2
LITERATURE REVIEW
2) Historical Context and Evolution:- The concept of library automation dates back to the
early 20th century, but significant advancements came with the advent of computers. Early
systems were rudimentary and focused on simple cataloging. Over time, the integration of
databases, internet connectivity, and more sophisticated software capabilities expanded the
functionality of LMS.
In the 1980s and 1990s, systems like VTLS and INNOPAC emerged, utilizing the
capabilities of relational databases and networked environments to offer more advanced
features. With the growth of the internet, web-based LMS solutions became prevalent,
allowing for remote access and more dynamic user interactions.
The provided Java code is a simple Library Management System with a graphical user
interface (GUI) built using Swing. Here's a characterization of the material based on its
structure and functionality:
2) Main Components. Purpose and Functionality:- The system is divided into several
main components:
Classes:
Book:
- Represents a book with attributes `title`, `author`, `quantity`, and a map `issuedTo`
tracking customers who have borrowed the book and the quantities they have
borrowed.
- Implements `Serializable` for object persistence.
GUI Components:
- Main Menu : Provides buttons for adding, issuing, returning books, and
displaying available books.
- Activity Interfaces : Separate interfaces for each activity (Add Book, Issue Book,
Return Book) to gather necessary input from the user and perform the corresponding
actions.
3) Persistence:- The library data is persisted using object serialization. The `saveBooks`
method serializes the `books` list to a file, and the `loadBooks` method deserializes it
back into the system.
- Data validation is rudimentary, mostly checking for non-empty inputs and valid
quantities. More robust validation (e.g., handling non-integer inputs for quantities) could be
beneficial.
5) User Interaction
- User interaction is managed through Swing, with multiple windows and forms to perform
different actions.
- Buttons and text fields gather user input, and `JTextArea` is used for displaying messages
and book lists.
6. Extensibility: - The system is fairly extensible. Adding new features (e.g., searching
for books, adding more detailed book attributes) would involve extending the existing
classes and modifying the GUI accordingly.
8. Potential Improvements
- Data Validation : More robust data validation and error handling, especially for user
inputs.
- User Interface : Enhancements to the GUI to make it more user-friendly and responsive.
- Search Functionality : Implementing search functionality to find books by title, author,
etc.
- Logging : Adding logging for actions like adding, issuing, and returning books for
better tracking and debugging.
In summary, the code provides a functional library management system with a basic GUI.
It demonstrates the use of object-oriented principles, serialization for persistence, and
Swing for building a user interface. There are several areas where the system could be
enhanced for better user experience and robustness.
JAVA Code for the “BookTracker: Library Automation System”: -
import java.awt.*;
import java.io.*;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
import javax.swing.*;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
import java.text.SimpleDateFormat;
import java.util.Date;
@Override
public String toString() {
return "Title: " + title + ", Author: " + author + ", Quantity: " + quantity;
}
}
public IssueDetail(String rollNo, String enrollNo, String className, String yearSem, int
daysToKeep, String mobile) {
this.rollNo = rollNo;
this.enrollNo = enrollNo;
this.className = className;
this.yearSem = yearSem;
this.daysToKeep = daysToKeep;
this.mobile = mobile;
this.issuedDate = new Date(); // Set issued date to current date
this.status = "Issued";
}
@Override
public String toString() {
SimpleDateFormat dateFormat = new SimpleDateFormat("dd-MM-yyyy");
String issuedDateString = issuedDate != null ? dateFormat.format(issuedDate) : "N/A";
String returnDateString = returnDate != null ? dateFormat.format(returnDate) :
"N/A";
return "Roll No: " + rollNo + ", Enroll No: " + enrollNo + ", Class: " + className +
", Year/Sem: " + yearSem + ", Days to keep: " + daysToKeep + ", Mobile: " +
mobile +
", Issued Date: " + issuedDateString + ", Return Date: " + returnDateString +
", Status: " + status;
}
}
public LibraryManagementSystem() {
loadBooks();
}
panel.add(addButton);
panel.add(issueButton);
panel.add(returnButton);
panel.add(displayButton);
panel.add(customerButton);
frame.add(panel);
frame.setVisible(true);
}
// Method to create the activity interface based on the selected activity
private static void createActivityInterface(String activity) {
JFrame frame = new JFrame("Library Management System - " + activity);
frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
frame.setSize(600, 400);
panel.add(titleLabel);
panel.add(titleField);
if (activity.equals("Add Book")) {
panel.add(authorLabel);
panel.add(authorField);
panel.add(quantityLabel);
panel.add(quantityField);
} else {
panel.add(customerLabel);
panel.add(customerField);
panel.add(rollNoLabel);
panel.add(rollNoField);
panel.add(enrollNoLabel);
panel.add(enrollNoField);
panel.add(classLabel);
panel.add(classField);
panel.add(yearSemLabel);
panel.add(yearSemField);
panel.add(daysLabel);
panel.add(daysField);
panel.add(mobileLabel);
panel.add(mobileField);
panel.add(quantityLabel);
panel.add(quantityField);
}
frame.add(panel, BorderLayout.NORTH);
frame.add(scrollPane, BorderLayout.CENTER);
frame.add(actionButton, BorderLayout.SOUTH);
frame.setVisible(true);
}
displayArea.setText(library.displayBooks());
frame.add(scrollPane, BorderLayout.CENTER);
frame.setVisible(true);
}
customerList.addListSelectionListener(new ListSelectionListener() {
@Override
public void valueChanged(ListSelectionEvent e) {
if (!e.getValueIsAdjusting()) {
String selectedCustomer = customerList.getSelectedValue();
if (selectedCustomer != null) {
displayArea.setText("");
for (Book book : library.books) {
if (book.issuedTo.containsKey(selectedCustomer)) {
for (IssueDetail detail : book.issuedTo.get(selectedCustomer)) {
displayArea.append(book.title + ": " + detail + "\n");
}
}
}
}
}
}
});
frame.setLayout(new BorderLayout());
frame.add(new JScrollPane(customerList), BorderLayout.WEST);
frame.add(scrollPane, BorderLayout.CENTER);
frame.setVisible(true); }}
Chapter-4
Result & Discussions
CHAPTER 4
RESULT AND DISCUSSION
1) Result
The implementation of the Library Management System (LMS) provides a functional and
interactive system to manage a library's inventory, issue, and return of books. Here's an
overview of the key functionalities and their results:
1. Adding Books :
- The system allows users to add books with details such as title, author, and quantity.
- Books are stored in an ArrayList and serialized to a file for persistence.
2. Issuing Books :
- Users can issue books to customers by specifying the book title, customer name, and
quantity.
- The system checks if the book exists and if the requested quantity is available before
issuing it.
- Upon successful issuance, the system updates the book's quantity and records the
issuance details.
3. Returning Books:
- Users can return books by specifying the book title, customer name, and quantity.
- The system checks if the customer has issued the specified quantity before accepting the
return.
- Upon successful return, the system updates the book's quantity and records the return
details.
4. Displaying Books:
- The system provides options to display either all books or only those that are available
for issue.
- Book details include title, author, quantity, and issuance details.
5. Persistence :
- The system uses serialization to save the state of the library's books to a file
(`library_books.dat`).
- Upon restarting the system, the state is restored by deserializing the file.
2) Discussion
1. Functionality :
- The LMS covers basic library operations effectively. Users can add new books, issue
books to customers, return books, and view the inventory.
- The use of serialization ensures that the library's state is maintained across sessions,
which is crucial for real-world applications.
2. User Interface :
- The graphical user interface (GUI) is built using Swing, providing a simple but
functional way for users to interact with the system.
- Separate interfaces for adding, issuing, and returning books, along with the main menu,
enhance user experience by compartmentalizing tasks.
3. Data Management :
- The use of an `ArrayList` to manage books and a `HashMap` within each `Book` object
to track issued quantities is effective for this scale of application.
- For larger-scale applications, considering a database might be more efficient in terms of
performance and scalability.
4. Error Handling :
- The system includes basic error handling, such as checking for sufficient quantity
before issuing books and ensuring valid input.
- However, there could be more robust validation, such as handling non-integer inputs for
quantity fields gracefully and providing user feedback.
5. Extensibility :
- The current design allows for easy extension. New functionalities, such as overdue
tracking, notifications, or integration with other systems, can be added with minimal
changes to the existing codebase.
- The separation of GUI and logic ensures that the core functionalities can be reused or
tested independently of the user interface.
6. Future Improvements :
- Enhanced UI/UX : Improving the GUI to be more intuitive and visually appealing can
enhance user experience.
- Search Functionality : Adding a search feature to quickly find books by title or author
would be beneficial.
- User Management : Introducing a user management system to keep track of individual
users' histories and profiles.
- Database Integration : For larger libraries, integrating with a database system like
MySQL or MongoDB for better performance and scalability.
In summary, the provided Library Management System is a solid foundation for managing a small
library's operations. It effectively demonstrates the use of object-oriented principles, serialization
for persistence, and Swing for creating a user-friendly interface. With further enhancements, it
could serve as a comprehensive tool for larger library systems.
Chapter 5
Conclusion and Future Scope
CHAPTER 5
CONCLUSION AND FUTURE SCOPE
Conclusion
The Library Management System presented is a robust and comprehensive solution for managing
library operations. It includes functionalities to add, issue, and return books, as well as to display
both available and all books in the library. The system effectively uses object serialization for
persistent storage, ensuring that book data is preserved across sessions. The GUI, built with Swing,
provides a user-friendly interface for library staff and users, making interactions intuitive and
straightforward.
Future Scope
While the current implementation of the Library Management System is functional, several
enhancements and additional features can be considered for future development:
2. Database Integration :
- Migrate from file-based storage to a relational database management system (RDBMS)
such as MySQL or PostgreSQL for better data management and scalability.
- Implement more complex queries and reporting features using SQL.
3. Web-Based Interface :
- Develop a web-based version of the system to allow remote access via browsers.
- Use modern web technologies such as HTML, CSS, JavaScript, and frameworks like
React or Angular for a responsive user interface.
4. Mobile Application :
- Create mobile applications for Android and iOS to increase accessibility for users.
- Use frameworks like React Native or Flutter for cross-platform development.
6. Notification System :
- Add an email or SMS notification system to remind users of due dates and overdue books.
- Implement push notifications for mobile applications.