CSC Project Class 12a3
CSC Project Class 12a3
Science
Project
Topic: Library management
system.
Index
1. Introduction
2. Aim of the project
3. Problem statement
4. Background of the project
5. Objectives
6. Flow diagram
7. System requirements
8. Source code
9. Output screen shot
10. Conclusion
11. Future enhancement
12. Bibliography
Introduction:
Order request
by customer
Order form
Customers
receives
Order Input order the
database detail product
Management personnel
System requirements:
NON -FUNCTIONAL REQUIREMENTS:
PRODUCT REQUIREMENT:
Efficiency Requirement: When a library
management system will be implemented librarian
and user will easily access library as searching and
book transaction will be very faster.
Reliability Requirement: The system should
accurately perform member registration, member
validation, report generation, book transaction and
search
Usability Requirement: The system is
designed for a user-friendly environment so that
student and staff of library can perform the various
tasks easily and in an effective way.
ORGANIZATIONAL REQUIREMENT:
Implementation Requirements: In implementing
whole system, it uses html in front end with PHP as
server-side scripting language which will be used for
database connectivity and the backend i.e. the
database part is developed using MySQL.
Delivery Requirements: The whole system is
expected to be delivered in six months of time with
a weekly evaluation by the project guide.
Functional requirements:
User login:
Description of feature:
This feature used by the user to login into system.
They are required to enter user id and password
before they are allowed to enter the system. The
user id and password will be verified and if invalid id
is their user is allowed to not enter the system.
Functional requirements:
-user id is provided when they register. The system
must only allow user with valid id and password
to enter the system.
-The system performs authorization process which
decides what user level can access to.
-The user must be able to logout after they finished
using system.
SEARCH BOOK:
Description of feature:
This feature is found in book maintenance part. We
can search book based on book id, book name,
publications by author name.
Functional requirements:
- System must be able to search the database based
on select search type.
- System must be able to filter book based on
keyword enter.
- System must be able to show the filtered book in
table view.
Source code:
class Library:
def __init__(self): # Fixed the constructor method name
self.books = {}
self.users = {}
self.borrowed_books = {}
def display_books(self):
if not self.books:
print("No books in the library.")
else:
print("Books in the library:")
for book_id, book_info in self.books.items():
status = "Borrowed" if book_id in self.borrowed_books
else "Available"
print(f"ID: {book_id}, Title: {book_info['title']}, Author:
{book_info['author']}, Status: {status}")
def display_users(self):
if not self.users:
print("No users in the system.")
else:
print("Users:")
for user_id, user_info in self.users.items():
print(f"ID: {user_id}, Name: {user_info['name']}")
# Main program
library = Library()
def main():
while True:
print("\nLibrary Management System")
print("1. Add Book")
print("2. Remove Book")
print("3. Add User")
print("4. Remove User")
print("5. Borrow Book")
print("6. Return Book")
print("7. Display Books")
print("8. Display Users")
print("9. Exit")
if choice == "1":
try:
book_id = int(input("Enter Book ID: "))
book_title = input("Enter Book Title: ")
author = input("Enter Author Name: ")
library.add_book(book_id, book_title, author)
except ValueError:
print("Invalid input. Book ID must be a number.")
elif choice == "2":
try:
book_id = int(input("Enter Book ID: "))
library.remove_book(book_id)
except ValueError:
print("Invalid input. Book ID must be a number.")
elif choice == "3":
try:
user_id = int(input("Enter User ID: "))
user_name = input("Enter User Name: ")
library.add_user(user_id, user_name)
except ValueError:
print("Invalid input. User ID must be a number.")
elif choice == "4":
try:
user_id = int(input("Enter User ID: "))
library.remove_user(user_id)
except ValueError:
print("Invalid input. User ID must be a number.")
elif choice == "5":
try:
user_id = int(input("Enter User ID: "))
book_id = int(input("Enter Book ID: "))
library.borrow_book(user_id, book_id)
except ValueError:
print("Invalid input. IDs must be numbers.")
elif choice == "6":
try:
book_id = int(input("Enter Book ID: "))
library.return_book(book_id)
except ValueError:
print("Invalid input. Book ID must be a number.")
elif choice == "7":
library.display_books()
elif choice == "8":
library.display_users()
elif choice == "9":
print("Exiting the system. Goodbye!")
break
else:
print("Invalid choice. Please try again.")
www.google.com
https://www.w3schools.com
https://www.geeksforgeeks.org
https://docs.python.org
https://code.visualstudio.com/docs
https://www.researchgate.net
https://www.scribd.com