Library_Management_System_Project
Library_Management_System_Project
Submitted by:
Course: MCA
Submitted to:
1. Introduction
2. Code Breakdown
3. Output
4. Conclusion
Introduction
This project demonstrates the development of a Library Management System using Python. The
system includes
modules for managing books, members, and library operations such as borrowing and returning
books. The
programming
class Book:
self.title = title
self.author = author
self.isbn = isbn
self.genre = genre
self.available = True
def borrow(self):
if self.available:
self.available = False
def return_book(self):
if not self.available:
self.available = True
class Member:
self.name = name
self.member_id = member_id
book.borrow()
return f"Borrowing unsuccessful. Either the book is not available or not found
in the library."
book.return_book()
return f"Returning unsuccessful. Either the book was not borrowed or not found
in the library."
library.py
class Library:
def __init__(self):
self.book_list = []
self.member_list = []
if isinstance(book, Book):
self.book_list.append(book)
if isinstance(member, Member):
self.member_list.append(member)
my_library = Library()
# Add books
print(my_library.add_book(book1))
print(my_library.add_book(book2))
# Add members
print(my_library.add_member(member1))
print(my_library.add_member(member2))
# Borrow books
print(member1.borrow_book(book1, my_library))
print(member1.borrow_book(book2, my_library))
# Return books
print(member1.return_book(book1, my_library))
print(member1.return_book(book2, my_library))
Output
Adding Books:
Adding Members:
Borrowing unsuccessful. Either the book is not available or not found in the library.
Python.
It highlights the use of classes, methods, and objects to solve real-world problems. This project
serves
as a stepping stone to more complex systems and provides insight into designing modular and
scalable code.