library management system(lms)

of 82 /82
TERM PAPER ON LIBRARY MANAGEMENT SYSTEM Department of Information & Communication Technology Comilla University COURSE CODE: ICT-303 COURSE TITLE: OBJECT ORIENTED PROGRAMMING Submitted to: KHONDOKAR FIDA HASAN LECTURER, DEPARTMENT OF ICT COMILLA UNIVERSITY AUTRHORS TO SUBMIT: Group - E 2 nd year, 1 st semester Session: 2009-10 Name Class Id. 1

Upload: khondokar-fida-hasan

Post on 22-Aug-2014

41 views

Category:

Documents


3 download

Embed Size (px)

TRANSCRIPT

Page 1: Library Management System(LMS)

TERM PAPER ON

LIBRARY MANAGEMENT SYSTEM Department of Information & Communication Technology

Comilla University

COURSE CODE: ICT-303COURSE TITLE: OBJECT ORIENTED PROGRAMMING

Submitted to: KHONDOKAR FIDA HASAN LECTURER,

DEPARTMENT OF ICT

COMILLA UNIVERSITY

AUTRHORS TO SUBMIT: Group - E 2nd year, 1st semester Session: 2009-10

Name Class Id. Email

Israt jahan 0909006 [email protected]

Md. Khaled Mosharof 0909008 [email protected]

Md. Shahjahan 0909018 [email protected]

Md. Arifur Rahman 0909014 [email protected]

Date of Submission: 14th April, 2012

1

Page 2: Library Management System(LMS)

 

ACKNOWLEDGEMENT  

At first we thank to Almighty Allah for giving us a greater chance to make this term paper named “Library Management System”. We are extremely grateful and remain indebted to our guide & course teacher Mr. Khondokar Fida Hasan, for being a source of inspiration and for his constant support in the Design, Implementation and Evaluation of the project. We are thankful to them for their constant constructive criticism and invaluable suggestions, which benefited us a lot while developing the project on “LIBRARY MANAGEMENT”. He has been a constant source of inspiration and motivation for hard work. He was very co-operative throughout this project work. Through this column, it would be our utmost pleasure to express our warm thanks to him for his encouragement, co-operation and consent without which we mightn’t be able to accomplish this project.          

We also express our gratitude to Mr. Mohi Uddin Md. Tariq Bhuiyan, the Assistant Librarian of Comilla University for providing us the infrastructure to carry out the project. We wish to say thanks to our classmates who helped us sharing their opinion with a great mind and to all staff members who were directly and indirectly instrument in enabling us to stay committed for the project.

 

               

 

   

2

Page 3: Library Management System(LMS)

                                 PREFACE  

   Library is a treasure house of knowledge. A well organized library is an asset to the school, college, university or the neighborhood. A library is concerned with books, reference, members, and many other issues. Thus the process of handling a library manually is very troublesome and clumsy.

Concerning at this point of view, the computerized system for handling the activities of library management provides a comprehensive way to lessen physical labor, to reduce complexity of the manual system and so on. This project shows a easier way to maintain the records of books, members, book circulation, financial transaction etc. These facilities makes this project more useful.

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 are involved with library such as management authority, the users, and who want to know about Library Management System. We tried to include all essential features to provide best services to the users and management. All of these features can be modified according to the demand of time.

 

     

3

Page 4: Library Management System(LMS)

Table of Contents

SI. No Contents Page No.

1 Introduction 5

1.1 Purpose 6

1.2 Scope 6

1.3 Drawbacks of the present system 7

1.4 Proposed system 7

2 Literature Review 8-9

3.1 Features of library management system 10

3.2 Why we need it 11

4 Process Description 12

4.1 Methodology 12-14

4.2 Result 15

4.3 Discussion 16

4.3.1 Limitations 16

5 Conclusion 17

6 Bibliography 18

7 Appendix 19-57

4

Page 5: Library Management System(LMS)

Objectives :

1. Our objectives is to write a program that enables us to automate the present manual library management system.

2. Update the accessing era of libraries within short times.

3. Gain the best usefulness of technology in course of time.

4. Reduce the probability of mistakes occurred by manual system using machine for any sorts of computation.

5. Accommodate our skills to develop any system software.

5

Page 6: Library Management System(LMS)

1. Introduction

Since the dawn of civilization, men are trying to use the best output from the technology. “Library Management” with computer  is relatively recent addition to the libraries which has turned it more easier and comfortable.

   “Library Management System (LMS)” is a web based solution  which is developed on latest technology focused towards automating the vital activities of the Library. “The Library management system” Solution can be integrated with Barcode for easy access and retrieval of any item from the Library. An online public access catalog facility can be provided for speedy retrieval of any kind of document. This solution can be linked with self service for quick search and online requisition. Different libraries of organization or institution use the software that is designed according to their demand. We have designed a simple and effective procedure of LMS which may manage a library works so far.  The different sites of this system is mentioned briefly below:

6

Page 7: Library Management System(LMS)

 

 

1.1Purpose:- The purpose of this application are as follows :

The software is for automation of library. It provides following facilities to

Operator : Can enter details related to a particular

book. Can provide membership to members.

Admin : Can read and write information about

any Member.

7

Page 8: Library Management System(LMS)

Can update, create, delete the record of

membership as per requirement and implementation plants.

 

1.2 Scope :

The different areas where we can use this application are :

Any education institute can make use of it for providing information about author, content of the available books.

It can be used in offices and modifications can be easily done according to requirements.

1.3 Drawbacks of the present system

Some of the problems being faced in manual system are as follows:

Fast report generation is not possible. Tracing a book is difficult. Information about issue/return of the books

are not properly maintained. No central database can be created as

information is not available in database.

8

Page 9: Library Management System(LMS)

1.4 Proposed system There will be three major components :

Stock maintenance. Transaction entry. Reports.

2. Literature Review                 Library is regarded as the brain of any institute; many institutes understand the importance of the library to the growth of the institute and their esteem users (students). Library Management System (LMS) supports the general requirement of the library like acquisition, cataloguing, circulation.

     An LMS usually comprises a relational database, software to interact with that database, and two graphical user interfaces (one for patrons, one for staff). Most LMSes separate software functions into discrete programs called modules, each of them integrated with a unified interface. Prior to computerization, library tasks were performed manually and independently from one another. Selectors ordered materials with ordering slips, cataloguers manually catalogued items and indexed them with the card catalog system (in which all bibliographic data was kept on a single index card), and users signed books out manually, indicating

9

Page 10: Library Management System(LMS)

their name on cue cards which were then kept at the circulation desk. Early mechanization came in 1936, when the University of Texas began using a punch card system to manage library circulation. While the punch card system allowed for more efficient tracking of loans, library services were far from being integrated, and no other library task was affected by this change.

 

By the mid to late 2000s, LMS vendors had increased not only the number of services offered but also their prices, leading to some dissatisfaction among many smaller libraries. At the same time, open source ILS was in its early stages of testing. Some libraries began turning to such open source ILSs as Koha and Evergreen. Common reasons noted were to avoid vendor lock in, avoid license fees, and participate in software development. Freedom from vendors also allowed libraries to prioritize needs according to urgency, as opposed to what their vendor can offer. Libraries which have moved to open source ILS have found that vendors are now more likely to provide quality service in order to continue a partnership since they no longer have the power of owning the ILS software and tying down libraries to strict contracts. This has been the case with the SC LENDS consortium. Following the success of Evergreen for the Georgia PINES library consortium, the South Carolina State Library along with some local public libraries formed the SC LENDS consortium in order to share resources and to take advantage of the open source nature of the Evergreen ILS to meet their specific needs. By October 2011, just 2 years after SC LENDS began operations, 13 public library systems across 15 counties had already joined the consortium, in addition to the South Caroline State Library. Librarytechnology.org does an annual survey of over 1,500 libraries and noted in 2008, 2% of those surveyed used open source ILS, in 2009 the number increased to 8% and in 2010(most recent year available) 12% of the libraries polled had adopted open source LMSs.

   Library project system that offers many flexible and convenient features, allowing librarians and library users to maximize time and efficiency. Library System gives the all detailed information about students, staffs and books. It will track on the how many books available in library and books issued to the students. It shows popular book among the students. It will provide book lost in library. It keeps the record of the suppliers and book binders. It generates MIS reports for management. Our software is customizable for any library requirement.

10

Page 11: Library Management System(LMS)

3.1 Features of library management system: Only basic knowledge of computers is required for operation

of Library Management System. As it has user-friendly application interface.

Library Management System is Customizable and User Configurable.

11

Page 12: Library Management System(LMS)

An inbuilt Settings module makes Library Management System flexibility to cater to diverse organizational needs.

It is build on .NET technology - one of the most latest and upcoming Technologies in the field of Information Technology, which makes you  a forerunner in the world of Information technology.

Library Management System brings information to the user's desktop through integration across all modules.

Library Management System has pre-defined reports. These are used for normal reporting as well as Administration & Staff development purpose. Additionally, Library Management System can be easily customized for their own customized reports.

Staff as well as student record is maintained Newspapers attendance is maintained Automatic fine fees calculation Keeps record of supplier’s and binder’s Customized Report designing Configurable as per user’s requirements

 

 

 

3.2 Why we need it:

12

Page 13: Library Management System(LMS)

Improved customer service through greater access to accurate information.

Increased productivity and job satisfaction among staff members as it eliminates duplication of effort.

More economical and safer means of storing and keeping track of information.

Easier access to Information like management reports and stock etc, as well as more accurate and faster results from statistical analyses.

Reduces errors and eliminating the ennui of long and repetitive manual processing.

Greater accountability and transparency in operations. Improved efficiency and effectiveness in administration and

management as it has unprecedented access to real-time information.

More reliable security for sensitive and confidential information.

Appropriate knowledge-based action and intervention can now take place in a timelier manner.

 

 

 

13

Page 14: Library Management System(LMS)

4. PROCESS DESCRIPTION              

The Library Project's aim is simple: make it easier for people to find relevant books – specifically, books they wouldn't find any other way such as those that are out of print – while carefully respecting authors' and publishers' copyrights. Our ultimate goal is to work with publishers and libraries to create a comprehensive, searchable, virtual card catalog of all books in all languages that helps users discover new books and publishers discover new readers.

The Library Management System is designed & developed for a receipt and issuance of books in the library along with the student’s details. The books received in the library are entered in Books Entry form and the new student is entered in the student entry form. The library provide a library card and ID. for every member student. 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 the Book Issue form under third menu Book Issue. The student has to pay the fine if any on the basis of no. of days delayed deposit of the book in the library. 

14

Page 15: Library Management System(LMS)

4.1Methodology:

First, we collect data from different sources about library management. We visit different libraries. We also visit different site about library management through internet.

After collecting and analyzing these data, we find out the key points which are needed to accomplish this term paper.

Depending upon these key terms we design a flow diagram which shows the interrelationship among these data, management authority and users. This flow diagram is shown in the page 14.

Based upon these data and the flow diagram we write a source code in C++ programming language. The source code and sample output are shown in the appendix.

At the starting , a welcome message is displays on the screen, three option is there for the user to select to forward.

As a library keeps the records of the books, reference, students, teachers, officers, the source code take inputs these items from the operator.

In the option BOOKS all affairs related to books

such as add new books, view books, search for a particular book etc. are done. The process of book circulation is also need to be done from here.

15

Page 16: Library Management System(LMS)

In option MEMBERS all affairs related with members such as add members, view all members, search for a particular member are included.

In the BOOK CIRCULATION portion the issue and return of the book is done. One need to issue a book from and return a book to the library using this option. This process also calculate the fine if the members don’t return the book in due time.

16

Page 17: Library Management System(LMS)

fig: various aspects of library

4.2 RESULT:

The program (source code) run successfully.

17

Page 18: Library Management System(LMS)

4.3 DISCUSSION:

In the source code we only array, which makes the program most simple and easy to understand.

18

Page 19: Library Management System(LMS)

We use different features of C++ programming language and also use many other features which are actually properties of C such as gets().

This program covers all essential aspects that a library management system does have. Thus both of the user and the authority will be helped by this program.

And all of these aspects are changeable according to the demand of time.

4.3.1 LIMITATIONS:

As we want to see whether the process we working does work properly, we only show some of the most important features of library management system in the source code. Thus many other features are not shown here. But as the source code executes properly for these features, it will also execute the remaining features.

We used only array, but we can also use file,

pointer etc. to make this program more efficient.

We didn’t use any features of graphics.

5.Conclusion

 

19

Page 20: Library Management System(LMS)

   After completion of the term paper, we expect that the problems in the existing system would overcome. The “LIBRARY MANAGEMENT SYSTEM” process made computerized to reduce human errors and to increase the efficiency. The main focus of this project is to lessen human efforts. The maintenance of the records is made efficient, as all the records are stored in the ACCESS database, through which data can be retrieved easily. The navigation control is provided in all the forms to navigate through the large amount of records. If the numbers of records are very large then user has to just type in the search string and user gets the results immediately. The editing is also made simpler. The user has to just type in the required field and press the update button to update the desired field.

   The Books and Students are given a particular unique id no.  So that they can be accessed correctly and without errors. Our main aim of the project is to get the correct information about a particular student and books available in the library. 

  From a paper analysis of positive points and constraints on the component, it can be safely concluded that the whole management system has been made through our level best analysis. We wish our system will go a long way by satisfying users requirements. The computerization of the Library Management will not only improve the efficiency but will also reduce human stress thereby indirectly improving human recourses.

 

             

6. Bibliography

20

Page 21: Library Management System(LMS)

Books:

1. TEACH YOURSELF C++ (McGrawhill; HerbertSchildth)2. Object Oriented Programming in C++ (SAMS; Robert Lafore)

Websites: 

1. *http://en.wikipedia.org/wiki/Integrated_library_system

2. *Vasudha Softaim Innovation PVT. Ltd

3. http://www.google.com/googlebooks/library.html

21

Page 22: Library Management System(LMS)

7. Appendix:

7.1 Source Code:

#include<iostream>#include<iomanip>#include<conio.h>using namespace std;

//**************************************************//**************************************************

int bk=0; // a counter for bookint st=0; // a counter for studentint tbk; // total number of booksint tst; // total number of students

//**************************************************//**************************************************

//**************************************************//**************************************************

//This class defines the attributes of books

class book{public:

int catalogue; // call no. or subject code char bookname[30]; char authorname[40]; char bookpub[30]; int bookcopy;

22

Page 23: Library Management System(LMS)

int bookprice;int status1; //book availableint status2; // book issued

void addbook() //This function is for add new books.{

bk++; // a counter cout<<"\n\t\t*******************************************************"<<endl; catalogue=1000+bk;

cout<<"\n\tCatalogue no :"<<catalogue; cout<<endl;

gets(bookname); // skip the first gets()

cout<<"\n\tEnter book name :"; gets(bookname);

cout<<"\n\tEnter author name :";gets(authorname);

cout<<"\n\tEnter publishing company :"; gets(bookpub); cout<<"\n\tEnter price of the book :"; cin>>bookprice; cout<<"\n\tEnter book copy :"; cin>>bookcopy;

tbk=tbk+bookcopy;status1=bookcopy;

}

23

Page 24: Library Management System(LMS)

void dispbook() //This function display the information of the books

{

cout<<catalogue<<setw(10)<<bookname<<setw(12)<<authorname

<<setw(12)<<bookpub<<setw(8)<<bookprice<<setw(6)<<bookcopy;

}

void liststat() //This function identifies whether a book is available or not

{

if(status1!=0){

cout<<setw(8)<<status2<<setw(8)<<status1<<setw(12)<<"AVAILABLE"<<endl;

}else{

cout<<setw(8)<<status2<<setw(8)<<status1<<setw(12)<<"NOT AVAILABLE"<<endl;

24

Page 25: Library Management System(LMS)

}}

};book b[10];

//**************************************************//**************************************************

//**************************************************//**************************************************

//This class defines the attributes of the students.

class student{public:

int libcardno; // library card no provided by librarychar stid[10]; // student's class ID

char stname[20]; char deptname[20];

char session[20]; int bookcount;

void addstud() //This function add new students{

cout<<"\t\t****************************************************"<<endl; cout<<endl; cout<<endl; cout<<"\t\tEnter Student Name :";

gets(stname); gets(stname);

25

Page 26: Library Management System(LMS)

cout<<endl; cout<<"\t\tEnter Department Name :"; gets(deptname);

cout<<endl;cout<<"\t\tEnter Session :";gets(session);

cout<<endl;cout<<"\t\tEnter class ID :";gets(stid);

cout<<endl;

st++;libcardno=1000+st;

cout<<"\t\tYour Library Card No is: "<<libcardno<<endl;

bookcount=2; cout<<endl; cout<<endl;

}

void dispstud() //Display the student's information{

cout<<"\t"<<setw(5)<<libcardno<<setw(20)<<stname<<setw(18)<<deptname

<<setw(13)<<stid<<setw(12)<<session<<endl; //bookcount=2; cout<<endl;

}

};student s[20];

26

Page 27: Library Management System(LMS)

//**************************************************//**************************************************

//**************************************************//**************************************************

//This class provides the method of book circulation class circulation{public:

int fine;int d,m,y;

int d2,m2,y2; // calculate the duration( return date) int id,im,iy; // issue date, issue month, issue year int rd,rm,ry; // return date, return month, return year

void idcal() // Calculate the duration

{

cout<<"\t\tEnter day:";cin>>d;cout<<"\t\tEnter month:";cin>>m;cout<<"\t\tEnter year:";cin>>y;d2=d;m2=m;y2=y;d2=d2+15;

27

Page 28: Library Management System(LMS)

if(((m2==1)||(m2==3)||(m2==5)||(m2==7)||(m2==8)||(m2==10)||(m2==12))&&((d2>31)))

{d2=d2-31;m2=m2+1;if(m2==13){

y2++;m2=1;

}}else if(((m2==4)||(m2==6)||(m2==9)||

(m2==11))&&((d2>30))){

d2-=30; m2++;}else if(((y2%4==0 && y2%100!=0)||(y2%100==0

&& y2%400==0))&&(d2>29)&&(m2==2)){

d2-=29;m2++;

}else if((y2%4!=0)&&(d2>28)&&(m2==2)){

d2-=28;m2++;

} cout<<endl;}

void isdate() // show issue date{

id=d; im=m; iy=y;

28

Page 29: Library Management System(LMS)

cout<<"\t\tIssued date:"<<id<<"/"<<im<<"/"<<iy; cout<<endl;

}

void retdate() //show return date{

rd=d2; rm=m2; ry=y2; cout<<"\t\tReturn Date:"<<rd<<"/"<<rm<<"/"<<ry<<endl; cout<<endl;

}

void finecal(); //calculate the fine where neccessary};circulation cir;

void circulation::finecal() //This function is not inlined..because it contains loop statements{

int df,mf,yf; // day, month, year for finecout<<"\n\tYour actual return date is:

"<<rd<<"/"<<rm<<"/"<<ry<<endl;cout<<"\n\tEnter today's date: ";

cout<<"\n\tEnter Day : ";cin>>df;cout<<"\n\tEnter month: ";cin>>mf;cout<<"\n\tEnter Year : ";cin>>yf;int d1,m1,y1;

29

Page 30: Library Management System(LMS)

d1=rd;m1=rm;y1=ry;

int days=0; //count the days after the date of returnint k;

for(k=0; ;k++){

days++; d1++; if((m1==1||m1==3||m1==5||m1==7||m1==8||m1==10||m1==12)&&(d1>31))

{d1=1;

m1++;}

else if((mf==4||mf==6||mf==9||mf==11)&&(d1>30)){

d1=1; m1++;

} else if(((y1%4==0 && y1%100!=0)||(y1%100==0 && y1%400==0))&&(m1==2)&&(d1>29))

{d1=1;

m1++;}

else if((y1%4!=0)&&(m1==2)&&(d1>28)){

d1=1; m1++;

}

if(m1>12)

30

Page 31: Library Management System(LMS)

{y1++;

m1=1;}

if(d1==df && m1==mf && y1==yf){

break;}

}

fine=2*days; // Tk.2 per daycout<<"\t\t\tFine amount Tk."<<fine<<endl;

cout<<"\t\t\t*****************"<<endl;}

//**************************************************//**************************************************

int main(){

system("cls"); //For clear screen in visual c++int n,n1; // n= number of books to be added // n1= number of students to be added

int flag,flag1,pos; int sflag,stpos; // sflag for if student found, stpos for student's position int icatalogue; //The catalogue no of a book which is issued int rcatalogue; //The catalogue no of a book which is returned int rflag1,rflag2; int rpos1,rpos2;

31

Page 32: Library Management System(LMS)

char back; // back to main menu

cout<<endl;

do{

system("cls");int ch; // select the optioncout<<endl<<endl;

cout<<"************************************************"<<endl;

cout<<"************************************************"<<endl;

cout<<"\tWELCOME TO LIBRARY MANAGEMENT SYSTEM"<<endl;

cout<<"************************************************"<<endl;

cout<<"************************************************"<<endl;

cout<<endl<<endl;

cout<<"************************************************"<<endl;;

cout<<"\t1. Take a tour of the system."<<endl; cout<<"\t2. Administrative menu."<<endl;

32

Page 33: Library Management System(LMS)

cout<<"\t0. Exit."<<endl;

cout<<"************************************************";

cout<<endl<<endl; cout<<"\tEnter your choice: "; cin>>ch;

switch(ch){

case 1:{

system("cls");

cout<<endl; cout<<endl;

cout<<"*************************************************************"<<endl;

cout<<endl; cout<<"\t The Project Library Management

System contains three "<<endl;cout<<"\t different modules."<<endl;cout<<endl;cout<<"\t We can add new

books,reference, see the list of added books,"<<endl;cout<<"\t search a particular

book."<<endl;cout<<endl;cout<<"\t Similarly, we can add new

members, view the list of"<<endl;cout<<"\t all added members with details

and search"<<endl;cout<<"\t a single member ."<<endl;

33

Page 34: Library Management System(LMS)

cout<<endl;cout<<"\t The main module in the project

is the issue-return module."<<endl;cout<<endl;cout<<"\t We can issue only two books to

a student.The issued period"<<endl;cout<<"\t is for fifteen days.So within

fifteen days, the student should"<<endl;cout<<"\t return the book."<<endl;cout<<"\t If not returned,a fine of

Tk.2/day is"<<endl;cout<<"\t collected on the day of

return."<<endl;cout<<endl<<endl;

cout<<"*************************************************************";

cout<<endl<<endl; cout<<endl<<endl;

cout<<"\t\t\t\t THANK YOU"<<endl; cout<<endl;

cout<<"\t\t\t\t\t\t\t************"<<endl;

cout<<"\t\t\t\t\t\t\t GROUP E "<<endl;cout<<"\t\t\t\t\t\t\t ___________"<<endl;cout<<"\t\t\t\t\t\t\t ___________"<<endl;cout<<"\t\t\t\t\t\t\t ISRAT

JAHAN"<<endl;cout<<"\t\t\t\t\t\t\t MD. KHALED

MOSHAROF"<<endl;cout<<"\t\t\t\t\t\t\t MD.

SHAHJAHAN"<<endl;

34

Page 35: Library Management System(LMS)

cout<<"\t\t\t\t\t\t\t MD. ARIFUR RAHMAN"<<endl<<endl<<endl;

cout<<"\t\t\t***********************"<<endl;

cout<<"\t\t\t***********************"<<endl;

}

break;

case 2:

system("cls");cout<<endl;

cout<<endl;

cout<<"*************************************************************"<<endl; cout<<"*************************************************************"<<endl;

cout<<endl;cout<<"\tWELCOME TO

ADMINISTRATIVE MENU"<<endl;

cout<<"*************************************************************"<<endl;

cout<<"*************************************************************"<<endl;

cout<<endl; int ch1; char back1; // back to administrative menu

35

Page 36: Library Management System(LMS)

do{

system("cls");cout<<endl<<endl;

cout<<"********************************"<<endl;cout<<"\t1. BOOKS."<<endl;cout<<"\t2. REFERENCE."<<endl;

// this item doesn't need to be completed herecout<<"\t3. MEMBERS."<<endl;cout<<"\t0. EXIT."<<endl;

cout<<"*******************************"<<endl;cout<<endl<<endl;

cout<<"\tEnter your choice: ";cin>>ch1;

switch(ch1){case 1:

cout<<endl;char back2; // back to booksdo{

system("cls");cout<<endl<<endl;

cout<<"*************************************************"<<endl<<endl;

cout<<"\t1. ADD NEW BOOKS."<<endl;

cout<<"\t2. SEARCH FOR A BOOK."<<endl;

cout<<"\t3. VIEW BOOKS DETAILS."<<endl;

36

Page 37: Library Management System(LMS)

cout<<"\t4. BOOK CIRCULATION."<<endl;

cout<<"\t0. EXIT."<<endl;

cout<<"*************************************************"<<endl;

cout<<endl;

int ch2;int bsi; // book serial no.

cout<<endl;cout<<"\tEnter your

choice: "; cin>>ch2;

switch(ch2){case 1:

system("cls");cout<<endl;cout<<endl;cout<<"\t\tYOU

HAVE CHOSEN TO ADD NEW BOOKS. "<<endl; cout<<"\t\

t^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^"<<endl; cout<<endl; cout<<endl; cout<<"\t\tEnter number of books to

be added:"; cin>>n;

bsi=bk;

37

Page 38: Library Management System(LMS)

while(n!=0){

bsi++; b[bsi].addbook(); n--;

} cout<<endl; cout<<endl;

break;

case 2:system("cls");int scatalogue; //

catalogue no of a book to searchint i;cout<<endl<<endl;cout<<"\t\t\

tSEARCH A BOOK"<<endl; cout<<"\t\t\t^^^^^^^^^^^^^^"<<endl; cout<<endl<<endl; cout<<"\t\tEnter Catalogue No.to

search:"; cin>>scatalogue; for(i=1;i<=bk;i++)

{

if(scatalogue==b[i].catalogue){

flag=1; // book is found pos=i; //

position}else flag=0;

38

Page 39: Library Management System(LMS)

} if(flag==1)

{

cout<<endl<<endl; cout<<"\t\tBook is found!!"<<endl; cout<<endl<<endl; cout<<"\t\tTHE BOOK DETAILS

ARE..."<<endl; cout<<endl; cout<<"\t\tCatalogue

No :"<<b[pos].catalogue<<endl; cout<<"\t\tBook

name :"<<b[pos].bookname<<endl; cout<<"\t\tAuthor

name :"<<b[pos].authorname<<endl; cout<<"\t\tPublishing

company :"<<b[pos].bookpub<<endl; cout<<"\t\tBook

Price :"<<b[pos].bookprice<<endl; cout<<"\t\tBook

Copy :"<<b[pos].bookcopy<<endl;cout<<"\t\

tIssued Copy :"<<b[pos].status2<<endl;cout<<"\t\

tRemainig Copy :"<<b[pos].status1<<endl;

if(b[pos].status1!=0)

cout<<"\t\tStatus :AVAILABLE"<<endl;else

cout<<"\t\tStatus :UNAVAILABLE"<<endl;

39

Page 40: Library Management System(LMS)

} else

{

cout<<endl<<endl; cout<<"\t\tSorry!..No

Book Exists With this Code:"<<scatalogue<<endl;}

cout<<endl; cout<<endl;

break;

case 3:

system("cls");if(bk==0){

cout<<endl<<endl;

cout<<"\n\tSORRY!!! There is no book to show!\n";

} else

{

cout<<endl<<endl;cout<<"\nThe

number of total books : "<<tbk<<endl; cout<<"\t\t\tLIST OF ALL ADDED

BOOKS"<<endl; cout<<"\t\t\

t^^^^^^^^^^^^^^^^^^^^^^^"<<endl; cout<<endl;

40

Page 41: Library Management System(LMS)

cout<<"********************************************************************************"<<endl;

cout<<"CATALOGUE"<<setw(10)<<"BOOKNAME"<<setw(8)<<"AUTHOR"<<setw(12)<<"PUBLICATION"<<setw(8)<<"PRICE"<<setw(6)<<"COPY"<<setw(7)<<"ISSUED"<<setw(10)<<"REMAINING"<<setw(8)<<"STATUS"<<endl;

cout<<"********************************************************************************"<<endl;

i=1; while(i<=bk)

{

b[i].dispbook();

b[i].liststat();

i++;}

cout<<endl; cout<<endl;

}

cout<<endl;

break;

case 4:

system("cls");char back4;

do{

int ch3;

41

Page 42: Library Management System(LMS)

system("cls");

cout<<endl<<endl;cout<<"\

t**********************"<<endl; cout<<"\t1. ISSUE A

BOOK. "<<endl; cout<<"\t2. RETURN

A BOOK. "<<endl; cout<<"\t0. EXIT.

"<<endl;cout<<"\

t**********************";

cout<<endl<<endl; cout<<"\tEnter your

choice: "; cin>>ch3;

switch(ch3){case 1:

system("cls");

int ipos,spos,lib; //ipos= position of the book which is to be issued

// sops= position of the student

cout<<"\t\t YOU HAVE CHOSEN TO ISSUE A BOOK"<<endl;

cout<<"\t\t^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^"<<endl;

cout<<endl; cout<<"\t\tEnter Library Card

No.:";

42

Page 43: Library Management System(LMS)

cin>>lib; for(i=1;i<=tst;i++)

{

if(lib==s[i].libcardno)

{

flag=1; // student found spos=i; // student's

position

}}

if(flag!=1){

cout<<"\t\tSorry!..No Student Exists With This Library card:"<<lib<<endl;

} else

{

cout<<"\t\tEnter Catalogue no. to issue book:"; cin>>icatalogue; for(i=1;i<=bk;i++)

{

if(icatalogue==b[i].catalogue)

{

flag1=1; // book is found which to be issued

43

Page 44: Library Management System(LMS)

ipos=i; // location of the book

}}

cout<<endl;

if(flag1!=1){

cout<<"\t\tSorry!..No Book Exists With This Code:"<<icatalogue<<endl;

}

else{

if(s[spos].bookcount==0) cout<<"\t\tSorry!.You

cannot take more than two books.."<<endl;

else

{

if(b[ipos].status1==0)

cout<<"\t\tSorry!Book already issued.."<<endl; else

{

s[spos].bookcount--;

44

Page 45: Library Management System(LMS)

b[ipos].status1--;

b[ipos].status2++;

cout<<"\t\tDate of issue"<<endl;

cout<<"\t\t~~~~~~~~~~~~~"<<endl;

cir.idcal(); cir.isdate(); cir.retdate(); cout<<"\t\tThis

book is now issued...."<<endl; cout<<endl;

cout<<"\t\tBooks

allowed now:"<<s[spos].bookcount<<endl; cout<<endl;

cout<<setw(20)<<"Library Card No"<<setw(15)<<"Student Name"<<setw(15)<<"Catalogue No"<<endl;

cout<<setw(20)<<"---------------"<<setw(15)<<"-------------"<<setw(16)<<"-----------"<<endl;

cout<<setw(18)<<s[spos].libcardno<<setw(16)<<s[spos].stname<<setw(15)<<b[ipos].catalogue<<endl;

}

}}

45

Page 46: Library Management System(LMS)

cout<<endl;

break;

case 2:

system("cls");int lib;

cout<<"\t\tYOU HAVE CHOSEN TO RETURN A BOOK"<<endl;

cout<<"\t\t^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^"<<endl;

cout<<endl; cout<<"\t\tEnter Library Card

No:"; cin>>lib; cout<<endl; for(i=1;i<=tst;i++)

{

if(lib==s[i].libcardno){

rflag1=1; rpos1=i;

}}

46

Page 47: Library Management System(LMS)

if(rflag1==1){

cout<<"\t\tEnter catalogue no. to return book:"; cin>>rcatalogue; cout<<endl; for(i=1;i<=bk;i++)

{

if(rcatalogue==b[i].catalogue)

{

rflag2=1; rpos2=i;

}}

} if(rflag1!=1)

{

cout<<endl; cout<<"\t\tSorry!..No Student

Exists With ThisLibrary Card No:"<<lib<<endl;}else

{

if(rflag2!=1){

cout<<endl; cout<<"\t\tSorry!..No

Book Exists With This Code:"<<rcatalogue<<endl;}

47

Page 48: Library Management System(LMS)

else{

char ch;

cout<<"\tIs the catalogue:"<<b[rpos2].catalogue<<" issued to lirary card no:"<<s[rpos1].libcardno<<" ?(y/n):";

cin>>ch; if(ch=='y')

{

if(b[rpos2].status1!=b[rpos2].bookcopy)

{

cout<<endl; cout<<"\t\tYou can

Return the Book..."<<endl; cout<<endl; cir.retdate(); cout<<"\t\tAre you

sure you want to return this book ?(y/n):";

char ch;

cin>>ch; cout<<endl; if(ch=='y')

{

cout<<"\t\t Is the book returned before due date?(y/n):";

48

Page 49: Library Management System(LMS)

char ch; cin>>ch; cout<<endl; if(ch=='y')

{

cout<<"\t\tBook returned before due date"<<endl;

cout<<endl; cout<<"\t\t\

tFine - NIL"<<endl; cout<<endl; cout<<"\t\t\t

THANK YOU"<<endl;

b[rpos2].bookcopy++;

s[rpos1].bookcount++; cout<<endl;

} else

{

cout<<endl; cout<<"\t\

tYOU HAVE TO PAY FINE !!!"<<endl;

cir.finecal(); cout<<endl;

49

Page 50: Library Management System(LMS)

b[rpos2].status1++;

s[rpos1].bookcount++;

}

}

} else

{

cout<<endl; cout<<"\t\tThis Book

is not yet issued from library.. "<<endl;

}

} else

{

cout<<endl; cout<<"\t\t This book is

not issued to you..Sorry!!!"<<endl;

}

50

Page 51: Library Management System(LMS)

}

}

cout<<endl;

break; case 0:

system("cls");

cout<<"\n\tYou want to exit. "<<endl;

break; default:

break;}}

cout<<"\n\t<<-----Back to BOOK CIRCULATION---(press b).";

cout<<"\n\t<<-----Exit-----(press e).";

cout<<"\n\tYou press : ";

cin>>back4; }while(back4=='b');

system("cls"); break;

case 0:

51

Page 52: Library Management System(LMS)

cout<<"\n\tYou want to exit."<<endl;

break;

default: break;

}cout<<endl<<endl;

cout<<"\n\t<<----Back to BOOKS---(press b).";

cout<<"\n\t<<----Exit----(press e).";

cout<<"\n\tYou press : ";cin>>back2;system("cls");

}while(back2=='b');

break;

case 3:

system("cls");char back3;do{

int ch;int ssi;int n2;system("cls");

cout<<endl;

52

Page 53: Library Management System(LMS)

cout<<"*************************************************"<<endl;

cout<<"\t1. ADD NEW MEMBERS. "<<endl;

cout<<"\t2. SEARCH FOR A MEMBERS. "<<endl;

cout<<"\t3. VIEW ALL MEMBERS. "<<endl;

cout<<"\t0. EXIT. "<<endl;

cout<<"*************************************************"<<endl;

cout<<endl; cout<<"\tEnter your choice: "; cin>>ch;

switch(ch){case 1:

system("cls");int ch;cout<<endl<<endl;

cout<<"*********************************************"<<endl;

cout<<"\t1. ADD STUDENT. "<<endl;

cout<<"\t2. ADD TEACHER. "<<endl;

cout<<"\t3. ADD OFFICERS. "<<endl;

53

Page 54: Library Management System(LMS)

cout<<"\t4. OTHERS. "<<endl;

cout<<"\t0. EXIT. "<<endl;

cout<<"*********************************************"<<endl;

cout<<endl; cout<<"\tEnter your

choice: "; cin>>ch;

switch(ch){case 1:

system("cls");

cout<<endl<<endl;cout<<"\t\

tYOU HAVE CHOSEN TO ADD STUDENT DETAILS"<<endl;

cout<<"\t\t^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^"<<endl;

cout<<endl; cout<<"\t\tEnter number of students to

be added:"; cin>>n1;

ssi=tst; n2=n1;

while(n2!=0){

ssi=ssi+1;

54

Page 55: Library Management System(LMS)

s[ssi].addstud(); n2--;

} tst=tst+n1;

cout<<endl<<endl; cout<<"\t\tNumber of newly added

students:"<<n1<<endl; cout<<endl; cout<<endl;

break;

// case 1, 2, 3, 4 are same.

case 0:system("cls");

cout<<"\n\tYou want to exit."<<endl;

break;

default: break;

}

break;

case 2:

55

Page 56: Library Management System(LMS)

system("cls");int lib;cout<<endl<<endl;

cout<<"\t\t\tVIEW A MEMBER. "<<endl;

cout<<"\t\t\t^^^^^^^^^^^^^^"<<endl; cout<<endl; cout<<"\t\tEnter library card no to

view:"; cin>>lib;

int i; for(i=1;i<=n1;i++)

{

if(lib==s[i].libcardno){

sflag=1; stpos=i;

}}

if(sflag==1){

cout<<endl<<endl; cout<<"\t\tStudent found!!"<<endl; cout<<endl; cout<<"\t\tTHE STUDENT

DETAILS ARE..."<<endl; cout<<endl; cout<<"\t\tStudent

name :"<<s[stpos].stname<<endl; cout<<"\t\tDepartment

name :"<<s[stpos].deptname<<endl; cout<<"\t\

tSession :"<<s[stpos].session<<endl;cout<<"\t\

tClass ID :"<<s[stpos].stid<<endl;

56

Page 57: Library Management System(LMS)

} else

{cout<<endl;

cout<<"\n\t\tSorry!..No Student found with this library card:"<<lib<<endl;

} cout<<endl;

cout<<endl;

break;

case 3:system("cls");

if(st==0)cout<<"\n\

tSORRY!!! There is no member to view! \n";

else{

cout<<"\nThe number of total students : "<<tst<<endl<<endl;

cout<<"\t\tLIST OF ALL ADDED STUDENTS"<<endl;

cout<<"\t\t^^^^^^^^^^^^^^^^^^^^^^^^^^"<<endl;

cout<<endl; cout<<"\

t************************************************************************"<<endl;

cout<<"\t"<<setw(5)<<"CARD NO"<<setw(18)<<"NAME"<<setw(20)<<"DEPT."<<setw(11)<<"ID"<<setw(12)<<"SESSION"<<endl;

57

Page 58: Library Management System(LMS)

cout<<"\t************************************************************************"<<endl;

for(ssi=1;ssi<=tst;ssi++){

s[ssi].dispstud();

}}

cout<<endl;

break;

case 0:system("cls");

cout<<"\n\tYou want to exit. "<<endl;

break;

default:break;

}

cout<<endl<<endl; cout<<"\n\t<<----Back to MEMBER---(press b).";

cout<<"\n\t<<----Exit---(press e).";

cout<<"\n\tYou press: ";

58

Page 59: Library Management System(LMS)

cin>>back3;system("cls");

}while(back3=='b');

break;

case 0:

system("cls");cout<<"\tYou want to

exit."<<endl;

break;

default:break;

}cout<<endl<<endl;

cout<<"\n\t<<---Back to ADMINISTRATIVE MENU----(press b).";

cout<<"\n\t<<---Exit---(press e).";cout<<"\n\tYou press: ";

cin>>back1;system("cls");

}while(back1=='b');

break;

case 0:

59

Page 60: Library Management System(LMS)

system("cls");cout<<"\tYou want to exit"<<endl;

break;

default: break;

}

cout<<endl;

cout<<endl; cout<<endl;

cout<<"\t<<---Back to main menu---( press b ).";

cout<<"\n\t<<---Exit---( press e).";cout<<"\n\tYou press: ";cin>>back;

}while(back=='b'); cout<<endl;

system("cls");

cout<<endl<<endl;

cout<<"\tYou want to exit."<<endl;cout<<endl;cout<<"*********************************"<<endl

<<" THANK YOU. Have a nice day."<<endl<<endl<<endl;

return 0;}

60

Page 61: Library Management System(LMS)

61