0% found this document useful (0 votes)
20 views48 pages

CS Pro 2024

Uploaded by

heiwa8813
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)
20 views48 pages

CS Pro 2024

Uploaded by

heiwa8813
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/ 48

ACADEMIC YEAR: 2024-25 KENDRIYA VIDYALAYA NFR Maligaon,

KAMRUP(M), GUWAHATI-781011

PROJECT REPORT ON

BOOK INVENTORY MANAGEMENT

ROLL NO : 12

NAME : Ritesh Kumar

CLASS : XII

SUBJECT : Computer Science

SUB CODE : 083

PROJECT GUIDE: Mr. RAJESH BHAT , PGT (CS)

1|Page
CERTIFICATE

This is to certify that Ritesh Kumar Roll no: 12 has successfully

completed the project Work entitled COMPUTER SCIENCE PROJECT in

the subject Computer Science (083) laid down in the regulations of CBSE

for the purpose of Practical Examination in Class XII to be held in

KENDRIYA VIDYALAYA CHAMERA 2 on______________.

(RAJESH BHAT)
PGT Comp Science

External Examiner No. :

Name: _______________

Signature:

Page | 2
CONTENTS
1. Acknowledgement ------------------------------- 4
2. Introduction & Objective-----------------------5
3. Self Development Life Cycle------------------ 6
4. The Code-------------------------------------------- 14
5. Code Details----------------------------------------24
6. Output------------------------------------------------30
 WORKING OF ENTERING NAME OF LIBRARY
 WORKING OF REGISTER USER
 WORKING OF LOGIN USER
 WORKING OF ADDING BOOK
 WORKING OF UPDATING BOOK
 WORKING OF DELEATING BOOK
 WORKING OF SEARCH BOOK
 WORKING OF BORROW BOOK
 WORKING OF RETURN BOOK
 WORKING OF GENERATE REPORT
 WORKING OF LOGOUT
 WORKING OF EXIT
7. Error Handling----------------------------------- 42
8. Conclusion----------------------------------------- 43
9. Hardware and Software used----------------44
10. Bibliography-------------------------------------- 45

3|Page
ACKNOWLEDGEMENT
Apart from the efforts of me, the success of any project depends largely on the
encouragement and guidelines of many others. I take this opportunity to express my
gratitude to the people who have been instrumental in the successful completion of this
project.
I express deep sense of gratitude to almighty God for giving me strength for the
successful completion of the project.
I express my heartfelt gratitude to my parents for constant encouragement while
carrying out this project.
I gratefully acknowledge the contribution of the individuals who contributed in
bringing this project up to this level, who continues to look after me despite my flaws,
I express my deep sense of gratitude to the luminary The Principal, Mr. Kanja
Lochan Pathak, KENDRIYA VIDYALAYA NFR MALIGAON, KAMRUP, GUWAHATI,
who has been continuously motivating and extending their helping hand to us.
I am overwhelmed to express my thanks to The Administrative Officer for
providing me an infrastructure and moral support while carrying out this project in the
school.
My sincere thanks to Mr. NARENDER KUMAR, Master In-charge, A guide,
Mentor all the above a friend, who critically reviewed my project and helped in solving
each and every problem, occurred during implementation of the project
The guidance and support received from all the members who contributed and
who are contributing to this project, was vital for the success of the project. I am grateful
for their constant support and help.

PROJECT ON BOOK INVENTORY MANAGEMENT


Page | 4
INTRODUCTION

This programme helps the users in managing a library’s vast collection of books and
resources efficiently is crucial for ensuring accessibility and organization. A Library
Management System (LMS) is a comprehensive software solution designed to
streamline the administration of library operations. This project aims to develop a robust
LMS using python programming language, providing functionalities such as searching,
book issuance, and return tracking. This project not only enhances the user experience
for both librarians and patrons but also introduces aspiring developers to the intricacies
of software development and database management. Through this project, we seek to
create a user-friendly, scalable, and secure system that meets the evolving needs of
contemporary libraries view their registered details. This programme can be used only if
the Login ID and the Password is correct by doing so we enforce security and
restriction of unauthorised access.

OBJECTIVES OF THE PROJECT

The objective of this project is to let the students apply the programming knowledge

into a real- world situation/problem and exposed the students how programming skills

helps in developing a good software.

1. Write programs utilizing modern software tools.

2. Apply object oriented programming principles effectively when developing small

to medium sized projects.

3. Write effective procedural code to solve small to medium sized problems.

4. Students will demonstrate a breadth of knowledge in computer science, as

exemplified in the areas of systems, theory and software development.

5. Students will demonstrate ability to conduct a research or applied Computer

Science project, requiring writing and presentation skills which exemplify

scholarly style in computer science.

SYSTEM DEVELOPMENT LIFE CYCLE (SDLC)


5|Page
The systems development life cycle is a projectmanagement technique that divides
complexprojects into smaller, more easily managedsegments or phases.
Segmenting projectsallows managers to verify the successfulcompletion of project
phases before allocatingresources to subsequent phases.
Software developmentprojects typically include initiation, planning,design,
development, testing, implementation,and maintenance phases. However, the
phasesmay be divided differently depending on theorganization involved.
For example, initialproject activities might be designated asrequest,
requirements-definition, and planningphases, or initiation, concept-development,and
planning phases. End users of the systemunder development should be involved
inreviewing the output of each phase to ensurethe system is being built to deliver the
neededfunctionality.

Page | 6
PHASES OF SYSTEM DEVELOPMENT LIFE CYCLE

INITIATION PHASE

The Initiation Phase begins when a business sponsor identifies a need or an


opportunity.

The purpose of the Initiation Phase is to:

Identify and validate an opportunity to improve business accomplishments of the


organization or a deficiency related to a business need.
Identify significant assumptions and constraints on solutions to that need.
Recommend the exploration of alternative concepts and methods to satisfy the
need including questioning the need for technology, i.e., will a change in the
business process offer a solution?
Assure executive business and executive technical sponsorship. The Sponsor
designates a Project Manager and the business need is documented in a
Concept Proposal. The Concept Proposal includes information about the
business process and the relationship to the Agency/Organization.
Infrastructure and the Strategic Plan. A successful Concept Proposal results in a
Project Management Charter which outlines the authority of the project manager
to begin
the project.

Careful oversight is required to ensure projects support strategic business


objectives and resources are effectively implemented into an organization's enterprise
architecture. The initiation phase begins when an opportunity to add, improve, or correct
a system is identified and formally requested through the presentation of a business
case. The business case should, at a minimum, describe a proposal’s purpose, identify
expected benefits, and explain how the proposed system supports one of the
organization’s business strategies. The business case should also identify alternative

7|Page
solutions and detail as many informational, functional, and network requirements as
possible.

SYSTEM CONCEPT DEVELOPMENT PHASE

The System Concept Development Phase begins after a business need or opportunity
is validated by the Agency/Organization Program Leadership and the
Agency/Organization CIO.

The purpose of the System Concept Development Phase is to:

Determine the feasibility and appropriateness of the alternatives.


Identify system interfaces.
Identify basic functional and data requirements to satisfy the business need.
Establish system boundaries; identify goals, objectives, critical success factors,
and performance measures.
Evaluate costs and benefits of alternative approaches to satisfy the basic
functional requirements
Assess project risks
Identify and initiate risk mitigation actions, and Develop high-level technical
architecture, process models, data models, and a concept of operations. This
phase explores potential technical solutions within the context of the business
need.
It may include several trade-off decisions such as the decision to use COTS
software products as opposed to developing custom software or reusing software
components, or the decision to use an incremental delivery versus a complete,
onetime deployment.
Construction of executable prototypes is encouraged to evaluate technology to
support the business process. The System Boundary Document serves as an

Page | 8
important reference document to support the Information Technology Project
Request (ITPR) process.
The ITPR must be approved by the State CIO before the project can move
forward.

PICTORIAL REPRESENTATION OF SDLC:

PLANNING PHASE

The planning phase is the most critical step in completing development,


acquisition, and maintenance projects. Careful planning, particularly in the early stages
of a project, isnecessary to coordinate activities and manage project risks effectively.
The depth and formality of project plans should be commensurate with the
characteristics and risks of a given project. Project plans refine the information gathered
during the initiation phase by further identifying the specificactivities and resources
required to complete a project.

9|Page
A critical part of a project manager’sjob is to coordinate discussions between
user, audit, security, design, development, and network personnel to identify and
document as many functional, security, and networkrequirements as possible. During
this phase, a plan is developed that documents the approach to be used and includes a
discussion of methods, tools, tasks, resources, project schedules, and user input.
Personnel assignments, costs, project schedule, and target dates are established.
A Project Management Plan is created with components related to acquisition
planning, configuration management planning, quality assurance planning, concept of
operations, system security, verification and validation, and systems engineering
management planning.

REQUIREMENTSANALYSIS PHASE

This phase formally defines the detailed functional user requirements using high-
level requirements identified in the Initiation, System Concept, and Planning phases. It
also delineates the requirements in terms of data, system performance, security, and
maintainability requirements for the system. The requirements are defined in this phase
to a level of detail sufficient for systems design to proceed. They need to be
measurable, testable, and relate to the business need or opportunity identified in the
Initiation Phase. The requirements that will be used to determine acceptance of the
system are captured in the Test and Evaluation Master Plan.

The purposes of this phase are to:

Further define and refine the functional and data requirements and document
them in the Requirements Document,
Complete business process reengineering of the functions to be supported (i.e.,
verify what information drives the business process, what information is
generated, who generates it, where does the information go, and who processes
it),

Page | 10
Develop detailed data and process models (system inputs, outputs, and the
process.
Develop the test and evaluation requirements that will be used to determine
acceptable system performance.

DESIGN PHASE

The design phase involves converting the informational, functional, and network
requirements identified during the initiation and planning phases into unified design
specifications that developers use to script programs during the development phase.
Program designs areconstructed in various ways. Using a top-down approach,
designers first identify and link major program components and interfaces, then expand
design layouts as they identify and link smaller subsystems and connections. Using a
bottom-up approach, designers first identify and link minor program components and
interfaces, then expand design layouts as they identify and link larger systems and
connections. Contemporary design techniques often use prototyping tools that build
mock-up designs of items such as application screens, database layouts, and system
architectures. End users, designers, developers, database managers, and network
administrators should review and refine the prototyped designs in an iterative process
until they agree on an acceptable design. Audit, security, and quality assurance
personnel should be involved in the review and approval process. During this phase, the
system is designed to satisfy the functional requirements identified in the previous
phase. Since problems in the design phase could be very expensive to solve in the later
stage of the software development, a variety of elements are considered in the design
to mitigate risk. These include:

Identifying potential risks and defining mitigating design features.


Performing a security risk assessment.
Developing a conversion plan to migrate current data to the new system.
Determining the operating environment.
Defining major subsystems and their inputs and outputs.

11 | P a g e
Allocating processes to resources.
Preparing detailed logic specifications for each software module. The result is a
draft System Design Document which captures the preliminary design for the
system.
Everything requiring user input or approval is documented and reviewed by the
user. Once these documents have been approved by the Agency CIO and
Business Sponsor, the final System Design Document is created to serve as the
Critical/Detailed Design for the system.
This document receives a rigorous review by Agency technical and functional
representatives to ensure that it satisfies the business requirements. Concurrent
with the development of the system design, the Agency Project Manager begins
development of the Implementation Plan, Operations and Maintenance Manual,
and the Training Plan.

DEVELOPMENT PHASE

The development phase involves converting design specifications into


executable programs. Effective development standards include requirements that
programmers and other project participants discuss design specifications before
programming begins. The procedures help ensure programmers clearly understand
program designs and functional requirements. Programmers use various techniques
to develop computer programs. The large transaction oriented programs associated
with financial institutions have traditionally been developed using procedural
programming techniques. Procedural programming involves the line-by-line scripting
of logical instructions that are combined to form a program. Effective completion of
the previous stages is a key factor in the success of the Development phase. The
Development phase consists of:

Translating the detailed requirements and design into system components.


Testing individual elements (units) for usability.

Page | 12
Preparing for integration and testing of the IT system.

IMPLEMENTATION PHASE

This phase is initiated after the system has been tested and accepted by the
user. In this phase, the system is installed to support the intended business functions.
System performance is compared to performance objectives established during the
planning phase. Implementation includes user notification, user training, installation of
hardware, installation of software onto production computers, and integration of the
system into daily work processes. This phase continues until the system is operating in
production in accordance with the defined user requirements.

OPERATIONS AND MAINTENANCE PHASE

The system operation is on-going. The system is monitored for continued


performance in accordance with user requirements and needed system modifications
are incorporated. Operations continue as long as the system can be effectively adapted
to respond to the organization’s needs. When modifications or changes are identified,
the system may re-enter the planning phase.

The purpose of this phase is to:

Operate, maintain, and enhance the system.


Certify that the system can process sensitive information.
Conduct periodic assessments of the system to ensure the functional
requirements continue to be satisfied.
Determine when the system needs to be modernized, replaced, or retired.

13 | P a g e
The Code
import csv
import pickle
user_file = 'users.csv'
fields = ['Username', 'Password']
try:
with open(user_file, 'r'):
pass
except FileNotFoundError:
with open(user_file, 'w', newline='') as f:
writer = csv.DictWriter(f, fieldnames=fields)
writer.writeheader()
def register_user():
username = input("Enter username: ")
password = input("Enter password: ")
confirm_password = input("Confirm password: ")
if password != confirm_password:
print("Passwords do not match.")
return
user = {'Username': username, 'Password':
password}
with open(user_file, 'a', newline='') as f:
writer = csv.DictWriter(f, fieldnames=fields)
writer.writerow(user)
print("User registered successfully.")
def login_user():

Page | 14
username = input("Enter username: ")
password = input("Enter password: ")
try:
with open(user_file, 'r') as f:
reader = csv.DictReader(f)
for row in reader:
if row['Username'] == username and
row['Password'] == password:
print("Login successful.")
return True
except FileNotFoundError:
print("User file not found.")
print("Invalid username or password.")
return False
book_file = 'books.csv'
book_fields = ['Title', 'Author', 'ISBN', 'Genre',
'Availability']
try:
with open(book_file, 'r'):
pass
except FileNotFoundError:
with open(book_file, 'w', newline='') as f:
writer = csv.DictWriter(f,
fieldnames=book_fields)
writer.writeheader()
def add_book():
book = {
'Title': input("Enter book title: "),
'Author': input("Enter author name: "),
'ISBN': input("Enter ISBN (3 to 13 digits): ")

15 | P a g e
}
if not validate_isbn(book['ISBN']):
print("Invalid ISBN. It should be 3 to 13
digits.")
return
book['Genre'] = input("Enter genre: ")
book['Availability'] = 'Yes'
with open(book_file, 'a', newline='') as f:
writer = csv.DictWriter(f,
fieldnames=book_fields)
writer.writerow(book)
print("Book added successfully.")
def update_book():
isbn = input("Enter ISBN of the book to update:
")
if not validate_isbn(isbn):
print("Invalid ISBN. It should be 3 to 13
digits.")
return
books = []
updated = False
try:
with open(book_file, 'r', newline='') as f:
reader = csv.DictReader(f)
for row in reader:
if row['ISBN'] == isbn:
print("Book found. Enter new details.")
row['Title'] = input("Enter book title: ")
row['Author'] = input("Enter author
name: ")

Page | 16
row['Genre'] = input("Enter genre: ")
row['Availability'] = input("Is the book
available? (Yes/No): ")
updated = True
books.append(row)
if updated:
with open(book_file, 'w', newline='') as f:
writer = csv.DictWriter(f,
fieldnames=book_fields)
writer.writeheader()
writer.writerows(books)
print("Book updated successfully.")
else:
print("Book not found.")
except FileNotFoundError:
print("Book file not found.")
def delete_book():
isbn = input("Enter ISBN of the book to delete: ")
if not validate_isbn(isbn):
print("Invalid ISBN. It should be 3 to 13
digits.")
return
books = []
deleted = False
try:
with open(book_file, 'r', newline='') as f:
reader = csv.DictReader(f)
for row in reader:
if row['ISBN'] != isbn:
books.append(row)

17 | P a g e
else:
deleted = True
if deleted:
with open(book_file, 'w', newline='') as f:
writer = csv.DictWriter(f,
fieldnames=book_fields)
writer.writeheader()
writer.writerows(books)
print("Book deleted successfully.")
else:
print("Book not found.")
except FileNotFoundError:
print("Book file not found.")
def search_book():
isbn = input(" Enter ISBN of the book to search:
")
if not validate_isbn(isbn):
print("Invalid ISBN. It should be 3 to 13
digits.")
return
try:
with open(book_file, 'r', newline='') as f:
reader = csv.DictReader(f)
for row in reader:
if row['ISBN'] == isbn:
print(f"Book Found:\nTitle:
{row['Title']}\nAuthor: {row['Author']}\nGenre:
{row['Genre']}\nAvailability: {row['Availability']}")
return
print("Book not found.")

Page | 18
except FileNotFoundError:
print("Book file not found.")
def validate_isbn(isbn):
return 3 <= len(isbn) <= 13 and isbn.isdigit()
borrow_file = 'borrow_records.dat'
try:
with open(borrow_file, 'rb'):
pass
except FileNotFoundError:
with open(borrow_file, 'wb') as f:
pickle.dump([], f)
def borrow_book():
isbn = input("Enter ISBN of the book to borrow:
")
if not validate_isbn(isbn):
print("Invalid ISBN. It should be 3 to 13
digits.")
return
try:
with open(book_file, 'r') as f:
books = list(csv.DictReader(f))
for book in books:
if book['ISBN'] == isbn and
book['Availability'] == 'Yes':
student_name = input("Enter your name:
")
borrow_record = {'ISBN': isbn, 'Student':
student_name, 'DueDate': '2024-08-30'}
with open(borrow_file, 'rb') as f:
borrow_data = pickle.load(f)

19 | P a g e
borrow_data.append(borrow_record)
with open(borrow_file, 'wb') as f:
pickle.dump(borrow_data, f)
book['Availability'] = 'No'
with open(book_file, 'w', newline='') as f:
writer = csv.DictWriter(f,
fieldnames=book.keys())
writer.writeheader()
writer.writerows(books)
print("Book borrowed successfully.")
return
print("Book is not available or doesn't exist.")
except FileNotFoundError:
print("Book inventory file or borrow records
file not found.")
def return_book():
isbn = input("Enter ISBN of the book to return: ")
if not validate_isbn(isbn):
print("Invalid ISBN. It should be 3 to 13
digits.")
return
try:
with open(borrow_file, 'rb') as f:
borrow_data = pickle.load(f)
for record in borrow_data:
if record['ISBN'] == isbn:
borrow_data.remove(record)
with open(borrow_file, 'wb') as f:
pickle.dump(borrow_data, f)
with open(book_file, 'r') as f:

Page | 20
books = list(csv.DictReader(f))
for book in books:
if book['ISBN'] == isbn:
book['Availability'] = 'Yes'
with open(book_file, 'w', newline='') as f:
writer = csv.DictWriter(f,
fieldnames=book.keys())
writer.writeheader()
writer.writerows(books)
print("Book returned successfully.")
return
print("Record not found.")
except FileNotFoundError:
print("Borrow records file or book inventory
file not found.")
def generate_report():
print("Generating student borrowing history
report...")
student_borrowing_history_report()
def student_borrowing_history_report():
try:
with open(borrow_file, 'rb') as f:
borrow_data = pickle.load(f)
student_borrowing = {}
for record in borrow_data:
student = record['Student']
isbn = record['ISBN']
if student in student_borrowing:
student_borrowing[student].append(isbn)
else:

21 | P a g e
student_borrowing[student] = [isbn]
with open(book_file, 'r') as f:
books = list(csv.DictReader(f))
for student, isbns in
student_borrowing.items():
print(f"\nStudent: {student}")
for isbn in isbns:
for book in books:
if book['ISBN'] == isbn:
print(f" ISBN: {isbn} | Title:
{book['Title']}")
break
except FileNotFoundError:
print("No borrow records found.")
except Exception as e:
print(f"An error occurred: {e}")
def display_menu():
print("\nWelcome to Library System")
print("1. Register User")
print ("2. Login User")
print("3. Add Book")
print("4. Update Book")
print("5. Delete Book")
print("6. Search Book")
print("7. Borrow Book")
print("8. Return Book")
print("9. Generate Report")
print("10. Logout")
print("11. Exit")
def run():

Page | 22
logged_in = False
while True:
display_menu()
choice = input("Enter your choice: ")
if choice == '1':
register_user()
elif choice == '2':
if login_user():
logged_in = True
print("Logged in successfully.")
elif choice == '3' and logged_in:
add_book()
elif choice == '4' and logged_in:
update_book()
elif choice == '5' and logged_in:
delete_book()
elif choice == '6' and logged_in:
search_book()
elif choice == '7' and logged_in:
borrow_book()
elif choice == '8' and logged_in:
return_book()
elif choice == '9' and logged_in:
generate_report()
elif choice == '10':
logged_in = False
print("Logged out successfully.")
elif choice == '11':
print("Exiting...")
break

23 | P a g e
else:
print("Invalid choice or not logged in.
Please enter a valid option.")
if __name__ == "__main__":
library_name = input("Enter the name of the
library: ")
print(f"Welcome to {library_name} Library
System")
run()

Page | 24
25 | P a g e
Page | 26
27 | P a g e
Page | 28
29 | P a g e
Page | 30
1. WORKING OF ENTERING THE NAME OF
LIBRARY-
 OUTPUT:

31 | P a g e
2. WORKING OF REGISTER USER-
 OUTPUT:

Page | 32
3. WORKING OF LOGIN USER-
 OUTPUT:

33 | P a g e
4.WORKING OF ADD BOOK -
 OUTPUT:

Page | 34
2.
WORKING OF UPDATE BOOK -
 OUTPUT:

35 | P a g e
Page | 36
3. WORKING OF DELET BOOK -
 OUTPUT:

37 | P a g e
4. WORKING OF SEARCH BOOK -
 OUTPUT:

Page | 38
5. WORKING OF BORROW BOOK -
 OUTPUT:

39 | P a g e
7. WORKING OF RETURN BOOK -
 OUTPUT:

Page | 40
8. WORKING OF GENERATE REPORT-
 OUTPUT:

41 | P a g e
9. WORKING OF LOGOUT-
 OUTPUT:

Page | 42
9. WORKING OF LOGOUT-
 OUTPUT:

43 | P a g e
Page | 44
45 | P a g e
HARDWARE AND SOFTWARE
REQUIREMENTS

I.OPERATING SYSTEM : WINDOWS 10

II. PROCESSOR : 11th Gen Intel(R) Core(TM) i5-11300H

@ 3.10GHz 3.11 GHz

III. RAM : 16.0 GB (15.8 GB usable)

IV. Hard disk : SATA 40 GB OR ABOVE

SOFTWARE REQUIREMENTS:

I. Windows OS
II. Python
III. MySQL

Page | 46
BIBLIOGRAPHY

1. Computer science With Python - Class XII By : Sumita Arora

2. Websites: https://www.w3resource.com

3. https://pythonworld.in/practical-project/project-list/

4. http://python4csip.com/projects.php

5. http://python.mykvs.in/uploads/showpapers/testproject.php

47 | P a g e
THANK YOU

Page | 48

You might also like