0% found this document useful (0 votes)
9 views10 pages

Arya Shinde Patil

Uploaded by

bhushang0546
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views10 pages

Arya Shinde Patil

Uploaded by

bhushang0546
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 10

Introduction

The Student Library Management System is a Python-based


command-line program that manages books in a library. It allows
students to interact with the library to perform actions such as
borrowing, returning, and donating books. This system can also track
which books are issued and to whom they are issued.
The main goal of this project is to simulate a basic library system that
could help libraries maintain records and track the borrowing and
returning of books, making it easier to manage library operations.
Key Features
 Display Available Books: Lists all the available books in the
library.
 Borrow Book: Allows a student to borrow a book if it's available
and keeps track of borrowed books.
 Return Book: Facilitates the return of a borrowed book and
updates the available books list.
 Donate Book: Allows students to donate new books to the
library.
 Track Borrowed Books: Displays a list of books currently
borrowed, along with the names of the borrowers.
Data Flow Diagram (DFD)
Level 0: Context Diagram
At this level, the interaction between the Student and the Library
System is illustrated. The student interacts with the system to
perform operations like borrowing, returning, or donating books.

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.

Display available books

Borrow books (remove from


Track borrowed books / users
library)

Return book(add to available


books) Return to available book list

Donate books(add to available


lists)
Entity-Relationship (ER) Diagram
The ER diagram highlights the relationship between the entities
Library, Student, and Book. Each student can borrow or return books,
and the library keeps track of available and borrowed books.

Library Book

-List of books: List -book name: String

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.

Main Program Logic


The main logic of the program is a loop that continuously prompts
the user to select a task from a menu. The user can choose to list
available books, borrow a book, return a book, donate a book, or
track borrowed books. The loop continues until the user chooses to
exit the system.
Menu Options:
1. Listing Available Books: Shows all the books that are currently
available in the library.
2. Borrow Books: Allows a student to borrow a book and keeps
track of borrowed books.
3. Return Books: Handles the return of a book and adds it back to
the available books list.
4. Donate Books: Allows a student to donate new books to the
library.
5. Track Books: Displays a list of books that are currently
borrowed and who borrowed them.
6. Exit the Library: Exits the program.
Outputs:
1.

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.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy