Computer Project

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 59

Sun

Rise
English
School

A Project Report On
“Library
Management System”
Submitted by Submitted to
Sajjan Deepak sir
Gautam
Class:10
Prepared By: Sajjan Gautam
Remark 1
PREFA
CE
This project of “LIBRARY MANAGEMENT
SYSTEM” gives us the complete information about
the library. We can enter the record of new books
and retrieve the details of books available in the
library. We can issue the books to the students and
maintain their records and can also check how many
books are issued and stock available in the library. In
this project we can maintain the late fine of students
who return the issued books after the due date.
Throughout the project the focus has been on
presenting information and comments in an easy and
intelligible manner. The project is very useful for
those who want to know about Library Management
System.
In the last, I gratefully acknowledge and
express my gratitude to friends who supported me in
preparing this project.

Table of
Content
Prepared By: Sajjan Gautam 2
s

Background of project………………4
Designing the solution
(Algorithm and Flowchart)…………5
Coding with output screen………40
Conclusion ………………………4

Prepared By: Sajjan Gautam 3


Backgrou
nd and
The Library Management System is designed &
Aims of
developed for a receipt and issuance of books in the
Project
library along with the student’s details. The books
received in the library are entered in Books Entry
Dara file and the new student is entered in the
student entry data file. When the student wants to get
the desired book the same is issued on the
availability basis to the student. The issuance and
due date for the returning of the book is also entered
into Book Issue data file. The student has to pay the
fine if any on the basis of no. of days delayed
deposit of the book in the library.
Designing
the solution
(Using
Algorithm
and
Flowchart)
Algorithm for the main menu.

Prepared By: Sajjan Gautam 4


Step 1: Start
Step 2: Display main menu
Step 3: Ask user to input choice
Step 4: Check the Choice number
If choice=1 then run the procedure “Add record”
If choice=2 then run the procedure “Display record”
If choice=3 then run the procedure “Filter record”
If choice=4 then run the procedure “Delete record”
If choice=5 then run the procedure “Update record”
Step 5: Stop

Flowchart for the Main menu

Start

Display main
menu

Prepared By: Sajjan Gautam 5


Input your choice

Is choice NO
Display invalid
=1-5
choice

Yes

1 2 3 4 5

Add record Display record Filter record Delete record Update record

Stop

Algorithm to add record

Step 1: Start
Step 2: Open data file “lib.dat” in append mode

Prepared By: Sajjan Gautam 6


Step 3: Input data from user
Step 4: Write data in data file “lib.dat”
Step 5: Do you want to add more record?
If yes Go to step 3
Else
Step 6: Close data file
Step 7: Close

Flowchart to add records

Start

Open data file “lib.dat”

Prepared By: Sajjan Gautam 7


………………………………

Yes Want to add


more record

No

Close data file

Algorithm toStop
display records

Step 1: Start
Step 2: Display menu
Step 3: Ask user to Input choice
Step 4: Check the choice number
If the choice=1 then run the procedure “Display

Prepared By: Sajjan Gautam 8


all record”
If the choice=2 then run the procedure “Display
name of book”
If the choice=3 then run the procedure “Display
name of book with author name”
If the choice=4 then run the procedure “Display
name of book with its code”
If the choice=5 then run the procedure “Display
name of book with its price”
Step 5: Stop

Start

Display menu

Input your choice

Prepared By: Sajjan Gautam 9


No
Display invalid
choice

Yes
1 2 3 4 5

Prepared By: Sajjan Gautam 10


Algorithm to display all record

Step 1: Start
Step 2: Open data file “Lib.dat” in input mode
Step 3: Read data from file
Step 4: Print data file
Step 5: Check end of file using EOF function
Step 6: Is EOF reached?
If no, then go to step 3 else
Step 7: Close data file
Step 8: Stop

Prepared By: Sajjan Gautam 11


Flowchart to display all record

Start

Open data file “Lib.dat”

Read data

Print data

No Is EOF
reached?

Yes
Close data file

Stop

Prepared By: Sajjan Gautam 12


Algorithm to display name of book

Step 1: Start
Step 2: Open data file “Lib.dat” in input mode
Step 3: Read data from file
Step 4: Print book name
Step 5: Check end of file using EOF function
Step 6: Is EOF reached?
If no, then go to step 3 else
Step 7: Close data file
Step 8: Stop

Prepared By: Sajjan Gautam 13


Flowchart to display name of book

Start

Open data file “Lib.dat”

Read data

Print book
name

No
Is EOF
reached?

Yes

Close data file

Stop

Prepared By: Sajjan Gautam 14


Algorithm to display name of book with author
name

Step 1: Start
Step 2: Open data file “Lib.dat” in input mode
Step 3: Read data from file
Step 4: Print book name and author name
Step 5: Check end of file using EOF function
Step 6: Is EOF reached?
If no, then go to step 3 else
Step 7: Close data file
Step 8: Stop

Prepared By: Sajjan Gautam 15


Flowchart to display name of book with author
name

Start

Open data file “Lib.dat”

Read data

Print book name and


author name

No
Is EOF
reached?

Yes

Close data file

Stop
Prepared By: Sajjan Gautam 16
Algorithm to display name of book with its code

Step 1: Start
Step 2: Open data file “Lib.dat” in input mode
Step 3: Read data from file
Step 4: Print book name and its code
Step 5: Check end of file using EOF function
Step 6: Is EOF reached?
If no, then go to step 3 else
Step 7: Close data file
Step 8: Stop

Prepared By: Sajjan Gautam 17


Flowchart to display name of book with its code

Start

Open data file “Lib.dat”

Read data

Print book name and its


code

No
Is EOF
reached?

Yes

Close data file

Algorithm to display name of book with its price


Stop

Prepared By: Sajjan Gautam 18


Step 1: Start
Step 2: Open data file “Lib.dat” in input mode
Step 3: Read data from file
Step 4: Print book name and its price
Step 5: Check end of file using EOF function
Step 6: Is EOF reached?
If no, then go to step 3 else
Step 7: Close data file
Step 8: Stop

Prepared By: Sajjan Gautam 19


Flowchart to display name of book with its code

Start

Open data file “Lib.dat”

Read data

Print book name and its


price

No
Is EOF
reached?

Yes

Close data file

Algorithm to filter the data


Stop

Prepared By: Sajjan Gautam 20


Step 1: Start
Step 2: Display menu
Step 3: Ask user to input choice
Step 4: Check the choice number
If choice=1 then run the procedure “Filter with
author name”
If choice=2 then run the procedure “Filter with
price”
Step 5: Stop

Prepared By: Sajjan Gautam 21


Flowchart to filter the data

Start

Display menu

Input your choice

Is choice
=1-2?
No Display invalid
choice

Yes
1 2
Filter with author name Filter with price

Stop

Prepared By: Sajjan Gautam 22


Algorithm to filter the data with author name

Step 1: Start
Step 2: Open data file “Lib.dat” in input mode
Step 3: Input author name from user: author
Step 4: Read data from file
Step 5: Is author name=author?
If yes then go to step 6
If no then go to step 7
Step 6: Print data
Step 7: Is EOF reached?
If yes then go to step 8
If no then go to step 3
Step 8: Close data file
Step 9: Stop

Prepared By: Sajjan Gautam 23


Flowchart to filter the data with author name
Start

Open data file “Lib.dat”


in input mode

Input author name:


author

Read data

No
Is author
name=
author?

Yes
Display the data

No Is EOF
reached?

Yes
Close data file

Stop
Prepared By: Sajjan Gautam 24
Algorithm to filter the data with price

Step 1: Start
Step 2: Open data file “Lib.dat” in input mode
Step 3: Input beginning and final price: b, f
Step 4: Read data from file
Step 5: Is b>price and f<price?
If yes then go to step 6
If no then go to step 7
Step 6: Print data
Step 7: Is EOF reached?
If yes then go to step 8
If no then go to step 3
Step 8: Close data file
Step 9: Stop

Prepared By: Sajjan Gautam 25


Flowchart to filter the data with price
Start

Open data file “Lib.dat”


in input mode

Input beginning and


final price: b, f

Read data

No
Is b>price
and f<price?

Yes
Display the data

No Is EOF
reached?

Yes
Close data file

Stop
Prepared By: Sajjan Gautam 26
Algorithm to delete record

Step 1: Start

Step 2: Open data file “Lib.dat” in input mode

Step 3: Open data file “Tem.dat” in output mode

Step 4: Input book’s code: new code

Step 5: Read data from data file

Step 6: Is code=new code?

If yes then go to step 8

If no then go to step 7

Step 7: Write data in data file “Tem.dat”

Step 8: Is EOF () reached?

If yes then go to step 9

If no then go to step 5

Step 9: Close both the data file

Step 10: Delete the data file “Lib.dat”

Step 11: Rename the data file “Tem.dat” to “Lib.dat”

Step 12: Stop

Prepared By: Sajjan Gautam 27


Flowchart to update author name

Start

Open data file “Lib.dat” in input mode

Open data file “Tem.dat” in output mode

Input book code: new code

Read data

Yes
Is code=new code?

No
Write data

No
Is EOF reached?

Yes
Close data file

Delete data file “Lib.dat”

Rename data file “Tem.dat” to “Lib.dat”

Stop

Prepared By: Sajjan Gautam 28


Algorithm to update the data
Step 1: Start
Step 2: Display menu
Step 3: Ask user to input choice
Step 4: Check the choice number
If choice=1 then run the procedure “Update
author name”
If choice=2 then run the procedure “Update
book code”
If choice=3 then run the procedure “Update
book price”
If choice=4 then run the procedure “Update
book number”
Step 5: Stop

Prepared By: Sajjan Gautam 29


Flowchart to
update
the
data
Start

Display menu

Input your choice

No
Is choice
=1-5 Display invalid
choice
Yes

1 2 3 4
Update author name Update book code Update book price Update book number

Algorithm to Stop
update author name

Prepared By: Sajjan Gautam 30


Step 1: Start

Step 2: Open data file “Lib.dat” in input mode

Step 3: Open data file “Tem.dat” in output mode

Step 4: Input new author name and book name:author, book

Step 5: Read data from data file

Step 6: Is book=book name?

If yes then go to step 7

If no then go to step 8

Step 7: Edit data author name=author

Step 8: Write data in data file “Tem.dat”

Step 9: Is EOF () reached?

If yes then go to step 10

If no then go to step 5

Step 10: Close both the data file

Step 11: Delete the data file “Lib.dat”


Flowchart
Step 12: Rename the datatofile
update author
“Tem.dat” name
to “Lib.dat”

Step 13: Stop


Start

Open data file “Lib.dat” in input mode

Prepared By: Sajjan Gautam 31


Open data file “Tem.dat” in output mode
Algorithm to update book code
Step 1: Start

Step 2: Open data file “Lib.dat” in input mode

Step 3: Open data file “Tem.dat” in output mode

Step 4: Input new book code and book name: code, book

Step 5: Read data from data file

Step 6: Is book=book name?

If yes then go to step 7

If no then go to step 8

Step 7: Edit data book code=code

Step 8: Write data in data file “Tem.dat”

Step 9: Is EOF () reached?

If yes then go to step 10

If no then go to step 5

Step 10: Close both the data file

Step 11: Delete the data file “Lib.dat”

Step 12: Rename the data file “Tem.dat” to “Lib.dat”

Step 13: Stop

Prepared By: Sajjan Gautam 32


Flowchart to update book code

Start

Open data file “Lib.dat” in input mode

Open data file “Tem.dat” in output mode

Input book code and book


name: code, book

Read data

No
Is book=book name?

Yes
Book code= code

Write data to “Tem.dat”

No
Is EOF reached?

Yes
Close data file

Delete data file “Lib.dat”

Rename data file “Tem.dat” to “Lib.dat”

Stop

Prepared By: Sajjan Gautam 33


Algorithm to update book price
Step 1: Start

Step 2: Open data file “Lib.dat” in input mode

Step 3: Open data file “Tem.dat” in output mode

Step 4: Input new book price and book name: price, book

Step 5: Read data from data file

Step 6: Is book=book name?

If yes then go to step 7

If no then go to step 8

Step 7: Edit data book price=price

Step 8: Write data in data file “Tem.dat”

Step 9: Is EOF () reached?

If yes then go to step 10

If no then go to step 5

Step 10: Close both the data file

Step 11: Delete the data file “Lib.dat”

Step 12: Rename the data file “Tem.dat” to “Lib.dat”

Step 13: Stop

Prepared By: Sajjan Gautam 34


Flowchart to update book price

Start

Open data file “Lib.dat” in input mode

Open data file “Tem.dat” in output mode

Input book price and book


name: price, book

Read data

No
Is book=book name?

Yes
Book price= price

Write data to “Tem.dat”

No
Is EOF reached?

Yes
Close data file

Delete data file “Lib.dat”

Rename data file “Tem.dat” to “Lib.dat”

Stop

Prepared By: Sajjan Gautam 35


Algorithm to update book number
Step 1: Start

Step 2: Open data file “Lib.dat” in input mode

Step 3: Open data file “Tem.dat” in output mode

Step 4: Input new book number and book name: num, book

Step 5: Read data from data file

Step 6: Is book=book name?

If yes then go to step 7

If no then go to step 8

Step 7: Edit data book number=num

Step 8: Write data in data file “Tem.dat”

Step 9: Is EOF () reached?

If yes then go to step 10

If no then go to step 5

Step 10: Close both the data file

Step 11: Delete the data file “Lib.dat”

Step 12: Rename the data file “Tem.dat” to “Lib.dat”

Step 13: Stop

Prepared By: Sajjan Gautam 36


Flowchart to update book number

Start

Open data file “Lib.dat” in input mode

Open data file “Tem.dat” in output mode

Input book number and book


name: num, book

Read data

No
Is book=book name?

Yes
Book number= num

Write data to “Tem.dat”

No
Is EOF reached?

Yes
Close data file

Delete data file “Lib.dat”

Rename data file “Tem.dat” to “Lib.dat”

Stop

Prepared By: Sajjan Gautam 37


Coding

declare sub add()


declare sub display()
declare sub filter()
declare sub delete()
declare sub update()
Cls
tt:
Print "1.Add record"
Print "2.Display record"
Print "3.Filter record"
Print "4.Delete record"
Print "5.Update record"
Input "Enter your choice"; ch
If ch = 1 Then Call add
If ch = 2 Then Call display
If ch = 3 Then Call filter
If ch = 4 Then Call delete
If ch = 5 Then Call update
Input "Do you want to perform other activities(Y/N)?"; c$
If LCase$(c$) = "y" Then GoTo tt
End

Output screen:

Sub add ()
Open "lib.dat" For Append As #1
top:
Input "Enter name of book"; n$
Input "Enter name of author"; a$
Input "Enter code of book"; c

Prepared By: Sajjan Gautam 38


Input "Enter number of book"; n
Input "Enter price of book"; p
Write #1, n$, a$, c, n, p
Input "do you want to add more record(Y/N)?"; ch$
If UCase$(ch$) = "Y" Then GoTo top
End Sub

Output screen:

Prepared By: Sajjan Gautam 39


Sub display
declare sub all()
declare sub book()
declare sub author()
declare sub code()
declare sub price()
Print "1.display all record"
Print "2.display name of book"
Print "3.display name of book with author name"
Print "4.display name of book with code"
Print "5.display name of book with price"
Input "enter your choice"; ch
If ch = 1 Then Call all
If ch = 2 Then Call book
If ch = 3 Then Call author
If ch = 4 Then Call code
If ch = 5 Then Call price
End Sub

Output screen:

Prepared By: Sajjan Gautam 40


Sub all
Open "lib.dat" For Input As #1
Print "Book name", "author name", "code", "number", "price"
While Not EOF(1)
Input #1, n$, a$, c, n, p
Print n$, a$, c, n, p
v=v+1
Wend
Close #1
Print "total number of record"; v
End Sub

Output Screen:

Prepared By: Sajjan Gautam 41


Sub book
Open "lib.dat" For Input As #1
Print "Book name"
While Not EOF(1)
Input #1, n$, a$, c, n, p
Print n$
v=v+1
Wend
Print "total number of books"; v
End Sub

Output Screen:

Prepared By: Sajjan Gautam 42


Prepared By: Sajjan Gautam 43
Prepared By: Sajjan Gautam 44
Prepared By: Sajjan Gautam 45
Prepared By: Sajjan Gautam 46
Prepared By: Sajjan Gautam 47
Prepared By: Sajjan Gautam 48
Prepared By: Sajjan Gautam 49
Prepared By: Sajjan Gautam 50
Prepared By: Sajjan Gautam 51
Prepared By: Sajjan Gautam 52
Prepared By: Sajjan Gautam 53
Prepared By: Sajjan Gautam 54
Prepared By: Sajjan Gautam 55
Prepared By: Sajjan Gautam 56
Prepared By: Sajjan Gautam 57
Prepared By: Sajjan Gautam 58
Prepared By: Sajjan Gautam 59

You might also like