This Java project is a simple Library Management System (LMS) that follows the MVC (Model-View-Controller) architectural pattern. The project allows users to manage books in a library by performing operations like adding, removing, updating, and searching for books.
The Library Management System is designed to provide a platform for librarians to manage the books in a library. It allows users to perform various operations, such as adding new books, removing books, updating book prices, searching for books by name, and retrieving a list of all available books.
The project is organized into three main packages: model, view, and controller. Each package contains classes with specific responsibilities:
- LibraryController.java: This class serves as the controller in the MVC pattern. It contains methods for adding books, retrieving all books, searching for books, removing books by name, and updating book prices. It interacts with the model and view components to perform these operations.
- Book.java: The
Bookclass defines the attributes of a book, such as name, author, price, and publication. It includes getters and setters for these attributes. - Library.java: The
Libraryclass represents a library and includes attributes like name, address, pincode, and a list of books. It also has getters and setters for these attributes.
- View.java: The
Viewclass serves as the user interface for the Library Management System. It allows users to interact with the system by providing a command-line interface. Users can add, remove, update, search for, and list books.
The presented user interface (UI) demonstrates the interaction with this Library Management System. Here's a description of the flow and functionalities provided by the UI:
-
Welcome Screen: The UI starts with a welcome message, prompting the user to input the name of the library, its address, and pin code. This sets up the library's details.
-
Main Menu: After library details are entered, the main menu is displayed. The user can select various operations from this menu, such as adding a book, removing a book, updating a book's price, searching for a book, listing all books, or exiting the system. The user inputs their choice by entering a numeric value.
-
Add Book Operation: If the user chooses to add a book, the UI provides a form-like interface to input the book's details, including title, author, price, and publication. Once entered, the book is added to the library.
-
Remove Book Operation: When the user selects the option to remove a book, they are prompted to enter the title of the book to be removed. The system then removes the book if it exists in the library and confirms its removal.
-
Update Book Price Operation: To update a book's price, the user provides the title of the book they wish to update and the new price. The UI then informs the user of the successful price update.
-
Search Book Operation: The user can search for a book by entering its title. If found, the UI displays the book's details.
-
List All Books Operation: Choosing this option lists all the books in the library along with their details.
-
Exiting the System: Finally, the user can choose to exit the system, which closes the program and displays an exit message.
- The project starts with the user providing information about the library, including its name, address, and pincode.
- Users are presented with a menu to select the desired operation.
- The available operations include adding a book, removing a book by name, updating the price of a book by name, searching for a book by name, and listing all available books.
- Users can interact with the system by entering their choice and providing relevant information for each operation.
- Add books to the library.
- Remove books from the library by name.
- Update the price of a book by name.
- Search for a book by name.
- List all available books in the library.
- This project can be further enhanced by adding features such as user authentication, borrowing and returning books, and generating reports.
The Library Management System is a basic implementation of a library management application following the MVC architectural pattern. It provides essential functionality for managing books in a library. It can be expanded and improved to meet the specific requirements of a real-world library management system.
Author: Smit Kalathiya








