Library Management System Project
CBSE School Project in Java programming
language submitted for Class XII-IT for the
session 2023-2024
Submitted by:(Name)
(Class and Section)
(Roll no)
Guided by: Dibyodak Pai Majumder
CAESAR SCHOOL, MALBAZAR
ACKNOWLEDGEMENT
I am very thankful to everyone who supported me
for I have effectively completed my project. I am equally
thankful to my teacher who guided me in different
matters regarding the topic. I thank them all for the
overall support.
I am extremely thankful to Mr. Dilip Sarkar,
Principal of Caesar School for his support.
DECLARATION
I hereby declare that I have undertaken
development of Library Management System Project as
a result of my hard work in the fulfillment of my
academic requirement for the course of Information
Technology in CBSE Class 12 curriculum.
Name
Class and Stream
Roll no
CONTENTS
1. INTRODUCTION
2. SYSTEM ANALYSIS
3. CODING
4. SCREENSHOTS
5. CONCLUSION
6. BIBLIOGRAPHY
INTRODUCTION
The Library Management System is targeted to
automate the management process of students to reduce
the labour of the user, using it for administrative
purpose. This project demonstrates the basic
functionalities such as adding books, displaying all the
books, displaying book details, deleting books, and
borrowing books. Clerks or any other administrative
person using the software have better and faster control
by avoiding manual errors.
SYSTEM ANALYSIS
• SOFTWARE REQUIREMENT SPECIFICATION:
It is the starting point of the software developing
activity. As the system is a little bit complicated it
became evident that the system cannot be easily
comprehended. Hence the need for the requirement
phase arose. The existing system for the 'Student
Management System' uses, Java Development Kit,
NetBeans, Java Runtime Environment and BlueJ.
• FEASILITY STUDY: The next step is feasibility
study, which is a high level version of Softwere
Requirement and Design. In technical feasibility one
has to test whether the proposed project can be
developed using existing technology. In operational
feasibility it is checked if the system works with
least difficulties when it is developed and installed.
CODING
1. Defining the Book Class
Firstly, we'll define our core entity, the Book class, which represents individual books.
public class Book {
private int isbn;
private String title;
private String author;
public Book(int isbn, String title, String author) {
this.isbn = isbn;
this.title = title;
this.author = author;
}
// Getters and setters
public int getIsbn() {
return isbn;
}
public void setIsbn(int isbn) {
this.isbn = isbn;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getAuthor() {
return author;
}
public void setAuthor(String author) {
this.author = author;
}
@Override
public String toString() {
return "ISBN: " + isbn + ", Title: " + title + ", Author: " + author;
}
}
2. Implementing the LibraryManagementSystem Class
With our Book class in place, we can now implement the core functionalities:
import java.util.ArrayList;
import java.util.List;
public class LibraryManagementSystem {
private List<Book> books = new ArrayList<>();
// Add a book
public void addBook(Book book) {
books.add(book);
}
// View all books
public void viewBooks() {
books.forEach(System.out::println);
}
// Update a book's details
public void updateBook(int isbn, String newTitle, String newAuthor) {
for (Book b : books) {
if (b.getIsbn() == isbn) {
b.setTitle(newTitle);
b.setAuthor(newAuthor);
break;
}
}
}
// Delete a book by ISBN
public void deleteBook(int isbn) {
books.removeIf(b -> b.getIsbn() == isbn);
}
// Search for a book by title
public Book searchBookByTitle(String title) {
for (Book b : books) {
if (b.getTitle().equalsIgnoreCase(title)) {
return b;
}
}
return null;
}
}
This class manages the collection of books. It allows adding, viewing, updating, deleting,
and searching for books in the library.
3. Main Execution
Let's put our system into action:
public class Main {
public static void main(String[] args) {
LibraryManagementSystem lms = new LibraryManagementSystem();
// Add new books
lms.addBook(new Book(1010, "Learn Java", "John Doe"));
lms.addBook(new Book(1011, "Learn Advanced Java", "Jane Doe"));
// Display all books
System.out.println("Library Books:");
lms.viewBooks();
// Update the title of "Learn Advanced Java"
lms.updateBook(1011, "Learn Java: Advanced Topics", "Jane Doe");
// Search for a book by title
System.out.println("\nSearching for 'Learn Java':");
Book foundBook = lms.searchBookByTitle("Learn Java");
System.out.println(foundBook != null ? foundBook : "Book not found.");
// Delete the "Learn Java" book
lms.deleteBook(1010);
System.out.println("\nAfter deleting 'Learn Java':");
lms.viewBooks();
}
}
SREENSHOT
CONCLUSION
In this project 'Library Management System' I have
created after full inspection, requirement study and
thoroughly checking it's feasibility. As a result of this
project, manual overload and mistakes are reduced.
This project at the end can be said to be a very
interesting and helpful school project to nurture our
knowledge.
BIBLIOGRAPHY
1. Google
2. Java Point
3. Geek For Geeks
4. Tutorials Point