The Library Management System (LMS) is a project designed to manage library operations such as adding books, registering members, borrowing books, and returning books. This project demonstrates the use of Object-Oriented Programming (OOP) concepts to model real-world entities and their interactions.
- Classes like
Book,Member, andLibraryencapsulate their data (fields) and provide methods to interact with them. - Access modifiers (
private,public,protected) are used to restrict direct access to class members, ensuring data integrity.
- The project hides implementation details and exposes only the necessary functionalities through methods like:
AddBook()RemoveMember()LendBook()
- This simplifies the interaction with complex operations.
- A
PremiumMemberclass inherits from theMemberclass to have additional features like extended borrowing limits. - Further extensions can be added using inheritance. For example:
- A
DigitalBookclass can inherit from theBookclass to add properties likefileSizeorformat.
- A
- Polymorphism is demonstrated through method overriding.
- A method
BorrowBook()is overridden in derived classPremium Memberto borrow a book upto higher limits than a normalMemberclass.
- A method
- It can be demonstrated though method overloading as well. For example:
- Methods like
DisplayBookDetails()are overloaded inBookclass to display specific details of books.
- Methods like
- The project defines multiple classes (
Book,Member,Library, etc.) to represent real-world entities. - Objects of these classes are created to perform operations like borrowing books or registering members.
- Static members are used to store global data. For example:
- A static counter
nextIdin theBookclass to generate unique IDs for each book. - A static counter
nextIdin theMemberclass to generate unique IDs for each member.
- A static counter
- Association: The
Libraryclass maintains a list ofBookandMemberobjects. - Aggregation: The
Memberclass contains a list of borrowedBookobjects. - Composition: The
LibraryManagerclass usesLibraryobjects as its own part. It cannot exist without aLibraryclass.- Similarly,
BooksManagerandMembersManagerclasses depend onBookandMemberobjects respectively to manage specific functionalities.
- Similarly,
- Basic error handling is implemented using conditional checks. For example:
- Checking if a book is available before lending it.
- Ensuring a member exists before performing operations.
- Responsibilities are divided into different classes:
BooksManagerhandles book-related operations.MembersManagerhandles member-related operations.LibraryManagercoordinates overall library operations.
- Methods like
DisplayBookDetails()andDisplayMemberDetails()are reusable across different parts of the application, reducing redundancy.
- Add, update, and delete books.
- Register and manage library members.
- Borrow and return books.
- View details of books and members.
- Clone the repository:
git clone https://github.com/vrushalird/LMS-Library-Management-System.git
- Run the solution from terminal:
dotnet run