Eee 2
Eee 2
1. Flowchart
A flowchart visually represents the logical flow of the Library Management System, showing how
users interact with the system from login to managing books.
Start
↓
Admin Login
↓
Login Successful?
↓ ↓
No Yes
↓ ↓
Exit Display Menu
↓
+----------------------+
| 1. Add Book |
| 2. View All Books |
| 3. Search Book by ID |
| 4. Exit |
+----------------------+
↓
Perform Selected Operation
↓
Return to Menu
↓
Exit
Looping mechanism: The menu operations are repeatedly shown until the admin chooses to exit.
Each function handles input, processes data, and outputs results accordingly.
2. System Architecture
The system is designed using a three-tier architecture, dividing functionality across distinct
modules:
1. Input Module
Accepts admin credentials (username and password).
Gathers user inputs for:
o Book title and author when adding books.
3. Object-Oriented Approach
The system uses core Object-Oriented Programming (OOP) principles in Java:
Encapsulation:
The Book class encapsulates book data such as ID, title, and author.
Modularity:
Functionality is split across dedicated methods:
o adminLogin()
o addBook()
o viewBooks()
o searchBook()
Reusability:
The book management functions can be reused and scaled for more advanced operations like
delete/update or database integration.
Class Design
class Book {
int id;
String title;
String author;
System Architecture
The Library Management System is built using a simple, three-tier architecture that separates
functionality into logical modules. This design improves code readability, reusability, and
maintainability. The three core components of the system include the Input Module,
Processing Module, and Output Module, each with clearly defined responsibilities.
The Input Module is responsible for collecting user input via the console. It includes admin
login credentials, book title and author for adding new books, and book ID for search
operations. This module ensures that user interaction is intuitive and well-structured.
The Processing Module handles the core business logic. It verifies login credentials to
control access, assigns unique IDs to books, and manages the internal list of books using
Java’s ArrayList. This module is also responsible for searching the list of books based on the
provided ID using simple conditional logic.
The Output Module displays the results to the user. It provides feedback such as login
success or failure, book addition confirmations, book listings, and search results. Clear
formatting ensures that output is user-friendly and easy to interpret.
This architecture allows smooth integration of additional features in the future, such as
persistent database storage or a graphical user interface.
Object-Oriented Approach
The Library Management System is designed using fundamental Object-Oriented
Programming (OOP) principles in Java. This approach enhances the modularity, clarity, and
extensibility of the system. The main components that illustrate OOP in the project are the
Book class and the structured method-based design of the application.
Encapsulation is implemented through the Book class, which encapsulates the properties of
each book: its ID, title, and author. These attributes are managed as a single entity, allowing
for easy manipulation and scalability. This class acts as a blueprint for creating book objects,
ensuring data consistency across the system.
Modularity is achieved by dividing the system functionality into separate methods. For
instance, addBook(), viewBooks(), searchBook(), and adminLogin() each handle specific
tasks. This separation allows easy testing, maintenance, and further development.
Reusability is evident in how the same logic can manage any number of books. Adding more
operations like delete or update would follow the same OOP structure, making expansion
straightforward.
Overall, the OOP approach ensures that the system is organized, maintainable, and scalable.
It provides a foundation that can support more advanced features in future versions, such as
persistent storage and user-level access control.
Introduction
Features
The Library Management System incorporates a variety of features that make book
management efficient and straightforward for administrators. Designed as a console-based
application, it presents a clear and simple user interface that interacts with the user through a
menu system. Each function is logically structured and easy to navigate, making the system
accessible for beginners and useful for small-scale library environments.
Key features include:
Admin Authentication: A login system restricts access to authorized users only. It
ensures that only the admin with the correct credentials can access the system’s
functions.
Add Book Functionality: The system allows the admin to add books by entering the
book’s title and author. Each book is assigned a unique ID automatically.
View All Books: This feature enables the admin to view all the books currently stored
in the system, displaying the ID, title, and author of each.
Search Book by ID: Admins can search for a specific book using its ID. If found, the
system displays the book’s details; otherwise, it notifies the user that the book is not
available.
Limitations
While the Library Management System offers a functional prototype for managing books, it
comes with several limitations due to its simplified and introductory design. These
constraints highlight opportunities for future development and enhancement.
Firstly, the system uses an in-memory data structure (ArrayList) to store book information.
This means that all data is lost once the application is closed, as there is no database or file
system integration to persist the data. For real-world usage, implementing persistent storage
would be essential.
Secondly, the login system is hardcoded and supports only a single administrator with
predefined credentials. There is no user management module or the ability to add multiple
users with different roles and permissions.
Another limitation is the lack of book update or delete functionality. Once a book is added,
it cannot be modified or removed from the list, which restricts the flexibility needed in real-
world library operations.
Additionally, there is no input validation beyond the basics. For example, the system does not
prevent empty book titles or special characters, nor does it handle unexpected input types
gracefully.
Lastly, the system has no support for borrowing or returning books, making it suitable only
for basic catalog management rather than full-fledged library operations.
Conclusion
In conclusion, the Library Management System is a foundational Java-based application
designed to manage book records in a library environment. It successfully demonstrates the
application of object-oriented programming principles such as encapsulation, modularity, and
reusability. With features like admin login, book addition, search, and listing functionalities,
it provides a basic yet practical tool for managing library resources.
The project highlights how simple logic and structured programming can be used to create a
functional system. It also reinforces the importance of system design through flowcharts and
layered architecture, providing a blueprint for future development. While the application is
currently limited to console-based interactions and in-memory data storage, it effectively
serves its purpose as a learning project and a prototype.
Moving forward, this system could be significantly enhanced by integrating a relational
database like MySQL for data persistence, expanding the user management system, and
incorporating more features such as updating, deleting, issuing, and returning books.
Additionally, building a GUI with JavaFX or Swing would make the application more user-
friendly and suitable for practical deployment.
Overall, the Library Management System represents a solid entry-level project that introduces
core programming concepts while leaving ample room for scalability and enhancement.