You are on page 1of 30

A PROJECT REPORT

ON
“ LIBRARY MANAGEMENT”
SUBMITTED FOR PARTIAL
FULLFILMENT OF
PGDCA
OF
BILASPUR UNIVERSITY
BILASPUR (CG)

SESSION 2019-20

UNDER GUIDANCE OF, SUBMITTED BY,


MR. AMIT LAHRE MR. SANJAY SAHU
&
MR. DHEERAJ KUMAR GUJAR
CONTENTS

TOPIC

1. Acknowledgement

2. About Project

3. About C++

4. Preface

5. Flowchart / Data Flow Diagram

6. File Structure

7. Source Code

8. Input Form

9. Output Form

10. Bibliography
Acknowledgement
First and foremost, I thank Almighty God for all His blessings
showered on me.

We wish & express our heart full gratitude to the project guide Mr. AMIT
LAHRE the guidance and suggestions throughout the project, without which I
would not have been able to complete this project successfully.

I extend my thanks to all my friends for their moral support and


encouragement. Last but not least I thank my parents and relatives
who inspired us always to do the best.
About Project:

The software developed by us can used in any small scale


library in order to remove the burden of manual working
process which were used in small library for daily working
process for the issue/ deposit of books and creation of new
user , modification and deletion which is time consuming
and error prone. So for the removal of all the burdens from
the library their employee wants a computerized system for
the entry process in the library.

About C++

We have chosen C++ programming for the development of


the software Library Management system because C++
programming language has many features ,due to which c++
language is called the most powerful language for
developing an application software for various purposes. The
object oriented model in C++ is simple and easy to
implements.
Preface

The human computer interface, commonly


called the “User Interface” is the doorway to an Interactive
software application. The design of user interfaces demands
an understanding of human factors and interface technology
with the use of computers. Human perception, the skilled
level and behavioral profile of the user, the overall tasks that
the user must conduct are the factor to be considered in an
interface design. Visually presented in a most natural way,
complex structures and Relationships can be perceived in
less time, in greater number and with fewer errors than in
any other way. A good user interface makes the program not
only easy but also versatile and efficient to operate
conversely by the user. The main purpose of the use of
computer’s in the modern times is to save the time, money,
speedup the process of any work in the company or institute.
It also saves large space by storing data in small hard disk in
place of files and books.

The increased use of computers is gradually replacing


manual system due to their error prone and time-consuming
behavior. Database management has evolved from a
specialized computer application to a central Component of
a modern computing environment. Its primary goal is to
provide an Environment that is covenant and using,
retrieving and storing database information.

The need of this system arises from error prone results and
need to save the time.

Flowchart / Data Flow Diagram

Data Flow Diagrams are part of a structured model in the


development of software. Data flow diagrams are graphical technique
that depicts information flow and that transforms that are applied as
data move from input to output.
Basically, the function of data flow diagrams is to show the user a
graphical analysis of a software system. It is kind of like a flowchart,
except Data Flow Diagrams show the flow of data throughout the
system.

A data flow diagram (DFD) is a graphical technique that


depicts information flow and the transforms that are applied
as data moves from input to output. The DFD is also known
as a data flow graph or a bubble chart.

A DFD shows the functional relationship of the values


computed by a system, including input values, output
values, and internal data stores. It’s a graph showing the
flow of data values from their sources in objects through
processes that transform them to their destinations in other
objects. Some authors use a DFD to show control
information, others might not. A DFD can be seen as a
method of organizing data from its raw state.

General Information

What is a Data flow diagram? Data flow diagrams are


diagrams, which show the flow of data from one place to
another. DFDs describe the processes of a system, showing
how these processes link together through data stores and
how the processes relate to the users-the outside world.
They are sent to record the systems analysis as part of the
design documentation. At their lowest level of details, as we
shall see, DFD’s are often included in a programmers
working specifications when the system analysis is
complete and the system is being.

Why data flow diagrams?

This is also true for a graphical description, model. It’s


difficult, if not impossible, to describe a model in words and
still being clear and not complex. This was one of the main
reasons to develop a graphical modeling technique like
Data flow diagrams.

There are a certain number of ways Data flow diagrams


can be represented.

Data flow diagrams usually are made after a Context


Diagram has been made, because the Context diagram
functions as the basis of a Data flow diagram.
It’s important not to forget that Data flow diagrams are not a
model of flow of control or sequence of processing in a
system. Data flow diagrams must be seen as a model, which
show the flow of data through a system.

DFD FOR ADD NEW MEMBER OPENING

OPERATOR ADD NEW MEMBER TEMP.DAT

INITIAL.DAT
DFD FOR TRANSACTION OF BOOKS

ISSUE OF BOOKS
OPERATOR OUTPUT

ISSUEBOOK.DAT TEMP.DAT

DFD FOR EDITING THE ACCOUNT OF MEMBER

EDIT MEMBER
OPERATOR DATA INITIAL.DAT

INITIAL.DAT TEMP.DAT
DFD FOR EDITING THE ACCOUNT OF BOOK

EDIT BOOK
OPERATOR DATA INITIAL.DAT

INITIAL.DAT TEMP.DAT

DFD FOR DELETING ACCOUNT OF MEMBER

DELETE
OPERATOR MEMBER

INITIAL.DAT MEMBER.DAT

File Structure

INITIAL.DAT TABLE
In the INITIAL.DAT FILE details of the MEMBERS are stored during
the opening of New Account in the LIBRARY in this file his Name,
Address, Caution Money are stored.

FIELD FIELD NAME TYPE


1 Member Id Integer
2 Name Character
3 Address Charadter
4 Initial Deposit Long integer

BOOK.DAT TABLE
In the BOOK.DAT FILE details of the books are stored.

FIELD FIELD NAME TYPE


1 BookId Integer
2 BookName char
3 Author Name char
4 Price Long int

ISSUE.DAT TABLE
In the ISSUE.DAT FILE content of issued Book.

FIELD FIELD NAME TYPE


1 BookId Integer
2 MemberId Integer
3 BookName Char
4 Issue Date date

Source Code
LIBRARY.CPP

#include<graphics.h>
#include<dos.h>
#include <math.h>
#include "mainmenu.cpp"
void main()
{
int gd=DETECT,gm,i;
initgraph(&gd,&gm," ");
setcolor(2);
settextstyle(1,0,4);
outtextxy(200,50,"PROJECT REPORT");
setcolor(4);
delay(100);
settextstyle(1,0,4);
outtextxy(300,100,"ON");
delay(1000);
setcolor(9);
settextstyle(1,0,4);
outtextxy(150,150,"LIBRARY MANAGEMENT");
delay(1000);
setcolor(10);
settextstyle(1,0,3);
outtextxy(350,250,"DEVELOPED BY:");
delay(1000);
setcolor(12);
settextstyle(1,0,2);
outtextxy(350,300," ");
settextstyle(1,0,2);
outtextxy(350,350," ");

delay(1000);
setcolor(13);
settextstyle(1,0,2);
outtextxy(350,330,"");
delay(1000);
setcolor(14);
settextstyle(1,0,2);
outtextxy(400,380," ");
delay(1000);
setcolor(15);
settextstyle(1,0,2);
outtextxy(400,390,"");
getch();
cleardevice();
setbkcolor(14);
settextstyle(3,0,1);

for(i=0;i<=400;i++)
{
setcolor(RED);
circle(320,240,i);
sound(500);
delay(10);
}
nosound();

for(i=400;i>=0;i--)
{
setcolor(BLUE);
circle(320,240,i);
delay(10);
}
delay(1000);
getch();
closegraph();
mainmenu();
}

MAINMENU.CPP
#include <conio.h>
#include <iostream.h>
#include <stdlib.h>
#include "memmenu.cpp"
#include "bookmenu.cpp"
#include "issuemen.cpp"
char x[4][22]={"MEMBERS DETAILS " ,"BOOK DETAILS ",
"BOOK ISSUE ", "TO EXIT"};
int r=10,c=30;
void printmenu();
void mainmenu()
{
int i=0;
int r=10,c=30;
char ch;
textcolor(15);
textbackground(BLUE);
clrscr();
printmenu();
do
{
ch=getch();
switch(ch)
{
case 80:
textbackground(BLUE);
gotoxy(c,r);
cprintf("%s",x[i]);
if(i<3)
{
i++;r++;
}
textbackground(RED);
gotoxy(c,r);
cprintf("%s",x[i]);
break;

case 72:
textbackground(BLUE);
gotoxy(c,r);
cprintf("%s",x[i]);
if(i>0)
{
i--;r--;
}
textbackground(RED);
gotoxy(c,r);
cprintf("%s",x[i]);
break;
case 13:
if (i==0)
{
textbackground(9);
clrscr();
memmenu();
textbackground(9);
clrscr();
printmenu();
i=0;
}
else if (i==1)
{
textbackground(9);
clrscr();
bookmenu();
textbackground(9);
clrscr();
printmenu();
i=0;
r=10;
}

else if (i==2)
{
textbackground(9);
clrscr();
issuemenu();
textbackground(9);
clrscr();
printmenu();
i=0;
r=10;
}
if(i==3)
exit(1);
}
}while(1);
}

void printmenu()
{
int i;

int x1=25,y1=9,x2=50,y2=15;
textcolor(15);
textbackground(9);
for(i=x1;i<=x2;i++)
{
gotoxy(i,y1);
cout<<char(205);
}
for(i=x1;i<=x2;i++)
{
gotoxy(i,y2);
cout<<char(205);
}

for(i=y1+1;i<=y2-1;i++)
{
gotoxy(x1,i);
cout<<char(186);
}
for(i=y1+1;i<=y2-1;i++)
{
gotoxy(x2,i);
cout<<char(186);
}
gotoxy(x2,y1);
cout<<char(187);
gotoxy(x1,y1);
cout<<char(201);
gotoxy(x2,y2);
cout<<char(188);
gotoxy(x1,y2);
cout<<char(200);
gotoxy(x1+5,y1-3);
cout<<"LIBRARY MANAGEMENT";
for(i=0;i<=3;i++)
{
gotoxy(c,r);
cprintf("%s",x[i]);
r++;
}
i=0;r=10;
textbackground(RED);
gotoxy(c,r);
cprintf("%s",x[i]);
}

memmenu.cpp

#include <conio.h>
#include <iostream.h>
#include <fstream.h>
#include <stdio.h>
class member
{
private:
int memberid,deposit,id;
char name[20],address[10];
fstream file;
public:
void addmember();
void delmember();
void listmember();
}m;
void printmenu1();
void memmenu()
{
int i=0;
char x[4][20]={"TO ADD NEW MEMBER" ,"TO DELETE MEMBER","TO LIST
MEMBER","TO EXIT"};
int r=10,c=30;
char ch;
textcolor(15);
textbackground(BLUE);
clrscr();
printmenu1();
do
{
ch=getch();
switch(ch)
{
case 80:
textbackground(BLUE);
gotoxy(c,r);
cprintf("%s",x[i]);
if(i<3)
{
i++;r++;
}
textbackground(RED);
gotoxy(c,r);
cprintf("%s",x[i]);
break;

case 72:
textbackground(BLUE);
gotoxy(c,r);
cprintf("%s",x[i]);
if(i>0)
{
i--;r--;
}
textbackground(RED);
gotoxy(c,r);
cprintf("%s",x[i]);
break;

case 13:
if (i==0)
{
textbackground(9);
clrscr();
m.addmember();
clrscr();
printmenu1();
}
else if (i==1)
{
textbackground(9);
clrscr();
m.delmember();
clrscr();
printmenu1();
}
else if(i==2)
{
textbackground(9);
clrscr();
m.listmember();
clrscr();
printmenu1();
}
else if(i==3)
return;
i=0;
r=10;
}
}while(1);
}

void printmenu1()
{
int i=0;
char x[4][20]={"TO ADD NEW MEMBER" ,"TO DELETE MEMBER","TO LIST
MEMBER","TO EXIT"};
int r=10,c=30;
int x1=25,y1=9,x2=50,y2=15;
for(i=x1;i<=x2;i++)
{
gotoxy(i,y1);
cout<<char(205);
}
for(i=x1;i<=x2;i++)
{
gotoxy(i,y2);
cout<<char(205);
}

for(i=y1+1;i<=y2-1;i++)
{
gotoxy(x1,i);
cout<<char(186);
}
for(i=y1+1;i<=y2-1;i++)
{
gotoxy(x2,i);
cout<<char(186);
}
gotoxy(x2,y1);
cout<<char(187);
gotoxy(x1,y1);
cout<<char(201);
gotoxy(x2,y2);
cout<<char(188);
gotoxy(x1,y2);
cout<<char(200);
gotoxy(x1+5,y1-3);
cout<<"MEMBER MENU";
for(i=0;i<=3;i++)
{
gotoxy(c,r);
cprintf("%s",x[i]);
r++;
}
i=0;r=10;
textbackground(RED);
gotoxy(c,r);
cprintf("%s",x[i]);
}

void member::addmember()
{
file.open("member.dat",ios::app);
cout<<"enter memberid, name,address,deposit money";
cin>>memberid>>name>>address>>deposit;
file<<"\n"<<memberid<<"\t"<<name<<"\t"<<address<<"\t"<<deposit;
file.close();
gotoxy(10,22);
textbackground(2);
textcolor(4+128);
cprintf("Recode added successfuly");
textcolor(15);
textbackground(9);
getch();
}

void member::delmember()
{
fstream f1;
file.open("member.dat",ios::in);
f1.open("temp.dat",ios::out);
cout<<"enter memberid";
cin>>id;
do
{
file>>memberid>>name>>address>>deposit;
if(memberid!=id)
{
f1<<"\n"<<memberid<<"\t"<<name<<"\t"<<address<<"\t"<<deposit;
}
}while(file);
file.close();
f1.close();
remove("member.dat");
rename("temp.dat","member.dat");
gotoxy(10,22);
textbackground(2);
textcolor(4+128);
cprintf("Recode deleted successfuly");
textcolor(15);
textbackground(9);
getch();
}

void member::listmember()
{
file.open("member.dat",ios::in);
cout<<"\nmemberid\tname\taddress\t\tdeposit";
do
{
file>>memberid>>name>>address>>deposit;
if(!file.eof())
cout<<"\n"<<memberid<<" \t"<<name<<" \t"<<address<<"\t"<<deposit;
}while(!file.eof());
file.close();
getch();
}

bookmenu.cpp
#include <conio.h>
#include <iostream.h>
class book
{
private:
int bookid,price,id;
char name[20],authors[10];
//fstream file;
public:
void addbook();
void delbook();
void listbook();
}b;
void printmenu2();
void bookmenu()
{
int i=0;
char x[4][20]={"TO ADD NEW BOOK" ,"TO DELETE BOOK","TO LIST BOOK","TO EXIT"};
int r=10,c=30;
char ch;
textcolor(15);
textbackground(BLUE);
clrscr();
printmenu2();
do
{
ch=getch();
switch(ch)
{
case 80:
textbackground(BLUE);
gotoxy(c,r);
cprintf("%s",x[i]);
if(i<3)
{
i++;r++;
}
textbackground(RED);
gotoxy(c,r);
cprintf("%s",x[i]);
break;

case 72:
textbackground(BLUE);
gotoxy(c,r);
cprintf("%s",x[i]);
if(i>0)
{
i--;r--;
}
textbackground(RED);
gotoxy(c,r);
cprintf("%s",x[i]);
break;

case 13:
if (i==0)
{
textbackground(9);
clrscr();
b.addbook();
clrscr();
printmenu2();
}
else if (i==1)
{
textbackground(9);
clrscr();
b.delbook();
clrscr();
printmenu2();
}
else if(i==2)
{
textbackground(9);
clrscr();
b.listbook();
clrscr();
printmenu2();
}
else if(i==3)
return;
i=0;
r=10;
}
}while(1);
}

void printmenu2()
{
int i=0;
char x[4][20]={"TO ADD NEW BOOK" ,"TO DELETE BOOK","TO LIST BOOK","TO EXIT"};
int r=10,c=30;
int x1=25,y1=9,x2=50,y2=15;
for(i=x1;i<=x2;i++)
{
gotoxy(i,y1);
cout<<char(205);
}

for(i=x1;i<=x2;i++)
{
gotoxy(i,y2);
cout<<char(205);
}

for(i=y1+1;i<=y2-1;i++)
{
gotoxy(x1,i);
cout<<char(186);
}
for(i=y1+1;i<=y2-1;i++)
{
gotoxy(x2,i);
cout<<char(186);
}
gotoxy(x2,y1);
cout<<char(187);
gotoxy(x1,y1);
cout<<char(201);
gotoxy(x2,y2);
cout<<char(188);
gotoxy(x1,y2);
cout<<char(200);
gotoxy(x1+5,y1-3);
cout<<"BOOK MENU";
for(i=0;i<=3;i++)
{
gotoxy(c,r);
cprintf("%s",x[i]);
r++;
}
i=0;r=10;
textbackground(RED);
gotoxy(c,r);
cprintf("%s",x[i]);
}

void book::addbook()
cprintf("Record deleted successfuly");
textcolor(15);
textbackground(9);
getch();
}

void book::listbook()
{
fstream file;
file.open("book.dat",ios::in);
cout<<"\nbookid\tname\tauthors\t\tprice";
while(!file.eof())
{
file>>bookid>>name>>authors>>price;
if(!file.eof())
cout<<"\n"<<bookid<<"\t"<<name<<"\t"<<authors<<"\t"<<price;
}
file.close();
getch();
}

issuemen.cpp
#include <conio.h>
#include <iostream.h>
class issue
{
private:
int bookid,memberid,id;
char bookname[20],date[20];
fstream file;
public:
void issuebook();
void returnbook();
void listibook();
}m1;
void printmenu3();

void issuemenu()
{
int i=0;
char x[4][20]={"TO ISSUE BOOK" ,"TO RETURN BOOK","TO LIST ISSUED BOOK","TO
EXIT"};
int r=10,c=30;
char ch;
textcolor(15);
textbackground(BLUE);
clrscr();
printmenu3();
do
{
ch=getch();
switch(ch)
{
case 80:
textbackground(BLUE);
gotoxy(c,r);
cprintf("%s",x[i]);
if(i<3)
{
i++;r++;
}
textbackground(RED);
gotoxy(c,r);
cprintf("%s",x[i]);
break;

case 72:
textbackground(BLUE);
gotoxy(c,r);
cprintf("%s",x[i]);
if(i>0)
{
i--;r--;
}
textbackground(RED);
gotoxy(c,r);
cprintf("%s",x[i]);
break;

case 13:
if (i==0)
{
textbackground(9);
clrscr();
m1.issuebook();
clrscr();
printmenu3();
}
else if (i==1)
{
textbackground(9);
clrscr();
m1.returnbook();
clrscr();
printmenu3();
}
else if(i==2)
{
textbackground(9);
clrscr();
m1.listibook();
clrscr();
printmenu3();
}
else if(i==3)
return;
i=0;
r=10;
}
}while(1);
}

void printmenu3()
{
int i=0;
char x[4][20]={"TO ISSUE BOOK" ,"TO RETURN BOOK","TO LIST ISSUED BOOK","TO
EXIT"};
int r=10,c=30;
int x1=25,y1=9,x2=50,y2=15;
for(i=x1;i<=x2;i++)
{
gotoxy(i,y1);
cout<<char(205);
}
for(i=x1;i<=x2;i++)
{
gotoxy(i,y2);
cout<<char(205);
}

for(i=y1+1;i<=y2-1;i++)
{
gotoxy(x1,i);
cout<<char(186);
}
for(i=y1+1;i<=y2-1;i++)
{
gotoxy(x2,i);
cout<<char(186);
}
gotoxy(x2,y1);
cout<<char(187);
gotoxy(x1,y1);
cout<<char(201);
gotoxy(x2,y2);
cout<<char(188);
gotoxy(x1,y2);
cout<<char(200);
gotoxy(x1+5,y1-3);
cout<<"BOOK ISSUE MENU";
for(i=0;i<=3;i++)
{
gotoxy(c,r);
cprintf("%s",x[i]);
r++;
}
i=0;r=10;
textbackground(RED);
gotoxy(c,r);
cprintf("%s",x[i]);
}

void issue::issuebook()
{
file.open("issue.dat",ios::app);
cout<<"enter bookid, memberid,bookname,date";
cin>>bookid>>memberid>>bookname>>date;
file<<"\n"<<bookid<<"\t"<<memberid<<"\t"<<bookname<<"\t"<<date;
file.close();
gotoxy(10,22);
textbackground(2);
textcolor(4+128);
cprintf("Record added successfuly");
textcolor(15);
textbackground(9);
getch();
}

void issue::returnbook()
{
fstream f1;
file.open("issue.dat",ios::in);
f1.open("temp.dat",ios::out);
cout<<"enter bookid";
cin>>id;
do
{
file>>bookid>>memberid>>bookname>>date;
if(bookid!=id)
{
f1<<"\n"<<bookid<<"\t"<<memberid<<"\t"<<bookname<<"\t"<<date;
}
}while(!file.eof());
file.close();
f1.close();
remove("issue.dat");
rename("temp.dat","issue.dat");
gotoxy(10,22);
textbackground(2);
textcolor(4+128);
cprintf("Record deleted successfuly");
textcolor(15);
textbackground(9);
getch();
}

void issue::listibook()
{
file.open("issue.dat",ios::in);
cout<<"\nbookid\tmemberid\tbookname\t\tdate";
do
{
file>>bookid>>memberid>>bookname>>date;
cout<<"\n"<<bookid<<"\t"<<memberid<<"\t"<<bookname<<"\t"<<date;
}while(!file.eof());
file.close();
getch();

Input Form
Output Form
BIBLIOGRAPHY

The following books and manuals provided a lot of help to us in making this project a
reality.
C++ COMPLETE REFERENCE
HERBERT SCHILDT
HOW TO PROGRAM C++
DEITERL & DEITEL

C++ PROGRAMMING
O’RELLY
SOFTWARE ENGINEERING
R. E. FAIRELY
SOFTWARE ENGINEERING
PRESSMAN
AN INTEGRATED APPROACH TO SOFTWARE
ENGINNERING
PANKAJ JALOTE
NAROSA PUBLISING HOUSE
SYSTEM ANALYSIS AND DESIGN
ELIAS M AWAD
GALGOTIA
C++ Programming
Yaswant Kanetkar

You might also like