You are on page 1of 12

-Term paper-

CSE -202

Topic: Library Management System

DOS: 17/11/2010

Submitted to: - Submitted by:-

Ms. Chetna Kwatra Name : Rajat Jain

Dept. of Computer Science Roll# : RG6901-A03

Regd. # :10901999
ACKNOWLEDGEMENT

I take this opportunity to express my gratitude to Ms. Chetna Kwatra

for assigning me the respective term paper which helped me to explore the

fact about the topic (Library Management ) which I never knew and shown me

the direction to make this as virtual system on machine.

I`m also beholden to my colleagues who gave me valuable pieces of advice

and were good enough to find time for a fruitful discussion.

-----Rajat Jain

INDEX

• Introduction INTRODUCTION

• Description
I will start this project by describing the
• Process Flow word “TECHNOLOGY” this word is
rapidly changing day by day. Earlier where
• Source code people were totally dependent on paper to
store their data have now moved to the
• Testing(Screen Shots of world of computers. Today we see
working program) everything is computerized and which is
also getting enhanced day by day.
• Further Readings (Future
Scope)
In earlier days people use to write the
• Reference(Bibliography) records for every transaction as a proof but
as if now its all on computer. Hence we
derive the library maintenance on computer
which can be useful for maintaining, editing,
saving the records. As we know it was very
difficult to modify the information on the
peace of papers, but in case of computers its
an easy task and therefore we moved in this
direction.

Our project is very useful. User is no longer


required to check his register in search of
records, as now it can be searched over the
software by choosing some options. The
user need not to type in most of the
information. He/she is just required to enter
the desired options. On the whole it liberates
the user from keeping lengthy manual
records. In a nutshell, it abates the work load
of an organization.

In today’s world, no one likes to perform


calculations on calculator or manually when
computer is there. Every one wants his/her
work to be done by computer automatically
and displaying the result for further
manipulations.
DESCRIPTION:-
This Library Management System is
designed to make the library
management virtual by making this
live on computer systems, such
helping the maintenance team,
saving the time, and collecting the
database. I have tried here to
make this in the most famous
programming language C++.
Where I have used few of its inbuilt
libraries to make the system more
simplified and fruitful. This
management system can help the
library managers to save more
then 1000 records, and
modification and deletion at
instant.

PROCESS FLOW:-

START

MENU DISPLAY

Process OF
SELECTED
INPUT OPTIONS OPERATIONS have
the modules of
saving, deleting and
adding respectively.

PROCESS OF SELECTED
OPERATIONS

SAVE
(or)
STOP EXIT
THE PROCESS OF SELECTED public: static char date[10];
OPERATIONS HAS DIFFERENT SAVING,
MODIFIENG, DELETING PROCESS FLOW void issuebook(); void returnbook();

void background();

void mainmenu();

SOURCE CODE:- void introduc(); int c; int k[3],a;

char ch,d; static int da;

static int fine;

static char name[10];


//**********************************
************************ static long int reg;
// LIBRARY MANAGEMENT int bcode;
SYSTEM- RAJAT JAIN
void addnewbook(int,char
//********************************** tname[33],int);
************************
// char *bookname(int);

int bookfound(int);
//**********************************
************************ // int booknamefound(char[]);

// INCLUDED HEADER FILES void addbook();

//********************************** int available(int);


************************
int s;

int n; char bname[29]; int avail;


#include<iostream.h>

#include<conio.h>
private:
#include<stdio.h>

#include<fstream.h>

#include<string.h>
};
class lib

{
lib l[120];

fstream filin;

filin.open("lib.dat",ios::in|ios::out|ios::app);

if(!filin)

{ cout<<"\nCan't open file";

cout<<"\nHow many books u want to


enter ";
//Main function where all the parts of
program are invoked and called. cin>>n;

int main() for(int i=0;i<n;i++)

{int a,n; { filin.seekg(0);

clrscr(); cout<<"\nEnter book's name ";

lib k; cin>>l[i].bname;

k.background(); cout<<"Enter book code ";

return(0); cin>>l[i].bcode;

} l[i].avail=1;

l[i].addnewbook(l[i].bcode,l[i].bname,l[i].av
ail);

filin.write((char *)&l[i],sizeof(l[i]));

cout<<"\nThe entries u did are as


//Add book function this function is used follows\n";
for adding book to library . ifstream fin;

for(i=0;i<n;i++)
void lib::addbook() { filin.read((char *)&l[i],sizeof(l[i]));
{int a,n; cout<<"\n book's name ";
cout<<l[i].bname; cout<<"\nTO GET ENTER IN LIBRARY
PRESS ENTER";
cout<<"\n book code ";
cout<<"\nWELCOME TO";
cout<<l[i].bcode;
cout<<"\nLPU";
} fin.close();
cout<<"\nLIB";
getch(); }
getch();
//Background this functions containing front
page and others page graphics most of them mainmenu();
are designed inside it. It controls graphic
part of whole program. }

void lib::background()

{ //Static data members definition globally


they are to be defined globally so that they
char stylestr[40]; can be used any where.

char lib::name[10];

cout<<"\n Lovely Professional University"; long int lib::reg;

char lib::date[10];

cout<<"\n***************************
***********************************
*****************"; //Issuebook function this function is used for
issuing book ie it is controlling the part from
cout<<"\nC++ PROJECT"; where student can issue book it is containing
details required for issuing book.
cout<<"\nLIBRARY MANAGEMENT";

cout<<"\nThis Software is for Library


management"; void lib::issuebook()

cout<<"\nIn this Project student has to enter { lib l[120];int n;


its name,reg no etc.";
clrscr();
cout<<"\nSubmitted by:";
cout<<"\nHave u added book(y/n): ";
cout<<"\nRajat Jain";
cin>>ch;
getch();
if(ch=='y'|ch=='Y') { cout<<"\n Book issued to";

{ cout<<"\n Ur name "<<name;

cout<<"\nEnter ur name "; cout<<"\n\n Registration number is


"<<reg;
cin>>name;
cout<<"\n\n U have to return after 5
cout<<"\nenter date eg 12 dec"; days";
cin>>date;

cout<<"\nEnter ur reg. no "; // cout<<"\n\nUr date of returning book is


cin>>reg; "<<a;

cout<<"\n\n how many books are there"; // showdetails();

cin>>n; // else cout<<"Wrong entered";

for(int m=0;m<n;m++) } }

{cout<<"\n\nEnter the book code u want getch();


to issue "; } }
cin>>l[m].bcode; else cout<<" \nPlease add ";
c=bookfound(l[m].bcode); getch();
cout<<"\n O available otherwise 1 "<<c; }
if(c==0) int lib::fine;
{ cout<<"\n\n Book not found"; int lib::da;
}

else

if(c==1)

{cout<<"\n\n Book found";

cout<<"\n\n U want to issue this book(y/n):


";
//Return book function as that of issue book
cin>>d; function it is similarly controlling the return
if(d=='y'|d=='Y') book part of function it is containing return
book related information ie datamembers program can be menu driven. User just have
etc. to enter or press key what he has to do hence
it is a menudriven program.
void lib::returnbook()
void lib:: mainmenu()
{ lib l[100];
{
int n;

cout<<"\n\nHow many books are there ";

cin>>n;

for(int i=0;i<n;i++)
char ch;
{
int p;
cout<<"\n\nEnter ur book name ";
while(1)
cin>>l[i].bname;
{
cout<<"\n\nEnter ur book code ";

cin>>l[i].bcode;

}
clrscr();
cout<<"\n\nHow many days late ";

cin>>da;

fine=da*5;
cout<<"\nLIBRARY
cout<<"\n\nPay Fine Rs "<<fine; MANAGEMENT SYSTEM- BOOK ";
cout<<"\n\n Success fully returned ";

getch();

} cout<<"\n-------------------------------";

cout<<"\n1.Introduction";

cout<<"\n2.Add Book(s)";

cout<<"\n3.Issue book";

//Void mainmenu function this function is cout<<"\n4.Return Book(s)";


used for showing a menu screen so that cout<<"\n5.List of Book(s)";
cout<<"\n0.QUIT";

cout<<"\nEnter Your Choice: ";

flushall();

ch=getchar();

//This function is containing introduction of


the program.

void lib::introduc ()
if(ch=='1')
{
introduc();
clrscr();

char stylestr[40];
else

if(ch=='3')
cout<<"\nINTRODUCTION";
issuebook();

cout<<"\nLIBRARY MANGEMENT";
else if(ch=='2')

addbook();
cout<<"\nThis software is made by Rajat
Jain";
else cout<<" this software is for library
if(ch=='0') management";

break; cout<<" ie wnever u want to issue book


from lib.";
else
cout<<" just have to enter few entry & that
if(ch=='4') are";

returnbook(); cout<<" related to book and student who


wants to";
}}
cout<<" issue book he will get the return
date.";
cout<<" If he wants to return book it'll file.close();
check";
return found;
cout<<" whether u are returning on date or
not"; }

cout<<" if not u will be fined ocassionally.";

getch();

} //Add new book function this function is


used for adding new book ie if there are no
books available then a user can add book.
User just have to enter book code with book
//Book found this function helps a user to name.
find a book it automatically executes when a
user press key or fulfill the required fields so
it is helpful user to know whether the book
is available or not.

int lib::bookfound(int tcode) void lib::addnewbook(int tcode,char


tname[33],int tavail)
{
{
fstream file;
fstream file;
file.open("lib.DAT",ios::in);
file.open("lib.DAT",ios::out);
file.seekg(0,ios::beg);
file.write((char *)this,sizeof(lib));
int found=0;
bcode=tcode;
while(file.read((char
*)this,sizeof(lib))) strcpy(name,tname);

{ avail=tavail;

if(bcode==tcode) file.close();

found=1; }

break; TESTING ( Screenshots of working


program):-
}
Testing is very important part of
} programming as everything is executed and
checked before we assure that our program THESE ARE THE FEW SCREENSHOTS
is successfully generated and hence testing OF WORKING MODEL. WHERE WE
is needed. CAN ADD BOOKS AND MEMBERS AS
WELL. LATER ON IN THE FOLLOWING
PROGRAM WE ALSO COME ACROSS
In this context I have snapped few pictures ISSUING AND RETURNING BOOKS
of working model of my program. OPTIONS.

Further Readings (Future Scope):-

The Working model of program can help


lots of maintainer of library and can reduce
their efforts. This program can be
implemented in any kind of educational
institutes and also several kind of library
stores.

Still the program can be converted with lots


of add on options and functionality, which
can enhance the procedure of library
handling in professional manner.

REFERENCE(BIBLIOGRAPHY)

 E. BALAGURUSAMY, text
book of C++

 YASHWANT KANEDKAR,
REFERENCE OF C++

 LPU LIBRARY FOR THE


CURRENT
FUNCTIONALILTY &
AMANGEMENT

 PROGRAMMING
STRUCTURE> Various
websites.

You might also like