Arya Shinde Patil
Arya Shinde Patil
Student
Library management
system
Level 1: Detailed Data Flow Diagram
This shows the different processes involved within the library system
such as borrowing, returning, donating, and tracking books.
Library Book
Borrow
Student -book name: string
-name: string -student: string
Code Documentation
1. Class: Library
The Library class is responsible for managing the collection of books
and performing library operations like displaying, borrowing,
returning, and donating books.
Attributes:
o books: A list of available books in the library.
Methods:
o __init__(self, listofBooks): Initializes the library with a list
of books.
o displayAvailableBooks(self): Displays the list of books
available in the library.
o borrowBook(self, name, bookname): Allows a student to
borrow a book if it's available. If the book is not available,
a message is shown, and the borrowed book is tracked.
o returnBook(self, bookname): Adds a returned book back
to the library's collection.
o donateBook(self, bookname): Adds a donated book to
the library's collection.
2. Class: Student
The Student class manages the actions a student can take, such as
requesting to borrow, return, or donate a book.
Methods:
o requestBook(self): Prompts the student to input the
name of the book they want to borrow and returns the
book name.
o returnBook(self): Handles the return of a book by
checking if the student borrowed it, then removing it from
the tracking system.
o donateBook(self): Prompts the student to donate a book
by inputting its name, adding it to the library.
2.
3.
4.
5.
Conclusion
This Student Library Management System provides a simple yet
effective way to manage books in a library. It allows students to
borrow, return, and donate books while ensuring that the library staff
can keep track of borrowed books. This system could be further
enhanced by adding user authentication, due dates for books, and an
interface for more intuitive interactions.