library manegment system

33
ANNIE BESNT INTER COLLEGE LIBRARY MANAGEMENT SYSTEM [2012-13] PROJECT ON …………………………………………….. ……………………………………………… DEVELOPED BY  Name Class Session ANNIE BESANT INTER COLLEGE AFFILIATED TO U.P. BOARD SUPERVISED BY SUBMITTED BY Dharmveer Paswan (Lecturer) (C.S. Department) Deepak Yadav Page 1

Upload: chandan-srivastava

Post on 03-Apr-2018

227 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Library Manegment System

7/28/2019 Library Manegment System

http://slidepdf.com/reader/full/library-manegment-system 1/32

ANNIE BESNT INTER COLLEGELIBRARY MANAGEMENT SYSTEM [2012-13]

PROJECT ON……………………………………………..

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

DEVELOPED BY

 Name

Class

Session

ANNIE BESANT INTER COLLEGE

AFFILIATED TO U.P. BOARD

SUPERVISED BY SUBMITTED BY

Dharmveer Paswan(Lecturer)

(C.S. Department)

Deepak Yadav Page 1

Page 2: Library Manegment System

7/28/2019 Library Manegment System

http://slidepdf.com/reader/full/library-manegment-system 2/32

ANNIE BESNT INTER COLLEGELIBRARY MANAGEMENT SYSTEM [2012-13]

CERTIFICATE

This is to certify that Mr./Miss……………………………………………….. student of 

ANNIE BESANT INTER COLLEGE has successfully completed his/her project reporton …………………………………………………….. during session 2011 – 2012 as

requirement for class 12th Board Examination.

We wish him/her all the best for the future.

Approved by Date 

Deepak Yadav Page 2

Page 3: Library Manegment System

7/28/2019 Library Manegment System

http://slidepdf.com/reader/full/library-manegment-system 3/32

ANNIE BESNT INTER COLLEGELIBRARY MANAGEMENT SYSTEM [2012-13]

ACKNOWLEDEMENTS 

 No task is a single man’s effort; co-operation and co-ordination of various people at

various places go into the successful implementation. It is impossible to thank them

individually but I hereby make a humble effort to thank some of them.

First of all, I would like to thank…………………………………….. for his continuing

support and guidance throughout the progress of the project and finally the timely

accomplishment of the same.

I would also lime to mention the invaluable assistance by ………………………….. who

 provided most of the reference material for the project. Due to their efforts the project has

 been completed in due time with the least possible error. I wish to forward my sincere

thanks to them and hope for the same kind of help in future.

Last but not least, I wish to thank and deliver my heartfelt gratitude to everyone else who

have encouraged and helped me for the preparation and completion of this project.

 Name :

Signature :

Deepak Yadav Page 3

Page 4: Library Manegment System

7/28/2019 Library Manegment System

http://slidepdf.com/reader/full/library-manegment-system 4/32

ANNIE BESNT INTER COLLEGELIBRARY MANAGEMENT SYSTEM [2012-13]

TABLE OF CONTENTS

SNO TOPIC PAGE NO

1Cover page of the project

1-1

2

Certificate

2-2

3Acknowledgements

3-3

4Table of contents

4-4

5

INTRODUCTION

5-5

6SOFTWARE AND HARDWARE

REQUIREMENTS

6-6

7Coding

7-21

8 Screen shoots 22-24

9Bibliography

25-25

10Conclusion

26-26

Deepak Yadav Page 4

Page 5: Library Manegment System

7/28/2019 Library Manegment System

http://slidepdf.com/reader/full/library-manegment-system 5/32

ANNIE BESNT INTER COLLEGELIBRARY MANAGEMENT SYSTEM [2012-13]

INTRODUCTION

Man’s quest for constant knowledge is what has resulted in today’s sophisticated

technological hi-tech lives of the 21st century man. As knowledge becomes the most

critical resource and new, varied technologies evolve rapidly, IT plays a key role in

fuelling the economic growth.

The main objective of this project……………………………………….. is to give us a

feeling of application development in the real world.

The twenty first century is slated to belong to the information technology. It is the new

axis on which the world revolves and impels the global economy. Our development of

this project on …………………………………………….. is our first step towards a

dynamic multifaceted IT world.

Deepak Yadav Page 5

Page 6: Library Manegment System

7/28/2019 Library Manegment System

http://slidepdf.com/reader/full/library-manegment-system 6/32

ANNIE BESNT INTER COLLEGELIBRARY MANAGEMENT SYSTEM [2012-13]

SOFTWARE AND HARDWARE REQUIREMENTS

The resources that are required for the project are hardware, software etc, these are all

summarized below:

Hardware Requirements :

1.7 GHz CPU

256 MB RAM 40 GB HDD

CD-ROM

Monitor 

Keyboard

Mouse

Software Requirements:

Operating System : Windows XP/ 2007

Programming Language : C++/C;

Deepak Yadav Page 6

Page 7: Library Manegment System

7/28/2019 Library Manegment System

http://slidepdf.com/reader/full/library-manegment-system 7/32

ANNIE BESNT INTER COLLEGELIBRARY MANAGEMENT SYSTEM [2012-13]

Introduction of C++

C++ began as an expanded version of C. The C++ extensions were first inventedby Bjarne Stroustrup in 1979 at Bell Laboratories in Murray Hill, New Jersey. Heinitially called the new language "C with Classes." However, in 1983 the name waschanged to C++.

Object-based programming languages,

Object-based programming is the style of programming that primarily supports encapsulation and

object identity. Major features that are required for object-based programming are:

• Data encapsulation

• Data hiding and access mechanism

• Automatic initialization and clear-up of objects

• Operator overloading

Languages that support programming with objects are said to be object-based programming

languages. They do not support inheritance and dynamic binding. Ad is a typical object-based

programming language.

. Classes:

We just mentioned that objects contained that objects contain data, and code to manipulate tha

data. The entire set of data and code of an object can be made a user-defined data type with the

help of a class. In fact, objects are variables of that class type. Once a class has been defined , we

can create any number of objects belonging to that class. Each object is associated with the data o

type class with which they are created. A class is thus a collection of objects of similar type. Foe

example, mango, apple and orange are member of the class fruit. Classes are user-defined data

types and behave like the built-in types of a programming language. The syntax is used to create

an object is no different than the syntax used to create an integer object in C. If fruit has been

defined as a class, then the statement: Fruit mango; Will create an object mango belonging to theclass fruit.

1.3.3 Encapsulation: 

Deepak Yadav Page 7

Page 8: Library Manegment System

7/28/2019 Library Manegment System

http://slidepdf.com/reader/full/library-manegment-system 8/32

ANNIE BESNT INTER COLLEGELIBRARY MANAGEMENT SYSTEM [2012-13] The wrapping of data and functions into a single unit (called class) is known as encapsulation. Data

encapsulation is the most striking feature of a class. The data is not accessible to the outside world

and those functions, which are wrapped in the class, can access it. These function provide the

interface between the object’s data and the program. This insulation of the data from direct access

by the program is called data hiding .

1.3.4 Data Abstraction: 

Abstraction refers to the act of representing essential features with out including the background

details or explanations. Classes use the concept of abstraction and are defined as a list of abstrac

attributes such as size, weight and cost and functions to operate on these attributes. Sometimesthese are called data members because they hold information. The functions that operate on these

data are called methods or member functions.

1.3.5 Inheritance

Inheritance is the process by which objects of one class acquire the properties of objects of anotherclass. It supports the concept of hierarchical classification. For example, the bird ‘robin’ is a part of the class ‘flying bird’ which is again a part of the class ‘bird’. The principle behind this sort of division is that each derived class shares common characteristics with the class from which it isderived

Deepak Yadav Page 8

Page 9: Library Manegment System

7/28/2019 Library Manegment System

http://slidepdf.com/reader/full/library-manegment-system 9/32

ANNIE BESNT INTER COLLEGELIBRARY MANAGEMENT SYSTEM [2012-13]

  CODING

Deepak Yadav Page 9

Page 10: Library Manegment System

7/28/2019 Library Manegment System

http://slidepdf.com/reader/full/library-manegment-system 10/32

ANNIE BESNT INTER COLLEGELIBRARY MANAGEMENT SYSTEM [2012-13]

//C++ LIBRARY MANAGEMENT SYSTEM PROJECT - SOURCE CODE OF //PROGRAM 

//C++ LIBRARY MANAGEMENT SYSTEM PROJECT - SOURCE CODE OF //PROGRAM 

//***************************************************************// HEADER FILE USED IN PROJECT

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

#include<fstream.h>

#include<conio.h>

#include<stdio.h>#include<process.h>

#include<string.h>

#include<iomanip.h>

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

// CLASS USED IN PROJECT

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

class book 

{

char bno[6];char bname[50];

char aname[20];

public:

void create_book()

{cout<<"\nNEW BOOK ENTRY...\n";

cout<<"\nEnter The book no.";

cin>>bno;

cout<<"\n\nEnter The Name of The Book ";

Deepak Yadav Page 10

Page 11: Library Manegment System

7/28/2019 Library Manegment System

http://slidepdf.com/reader/full/library-manegment-system 11/32

ANNIE BESNT INTER COLLEGELIBRARY MANAGEMENT SYSTEM [2012-13]gets(bname);

cout<<"\n\nEnter The Author's Name ";

gets(aname);

cout<<"\n\n\nBook Created..";}

void show_book()

{cout<<"\nBook no. : "<<bno;

cout<<"\nBook Name : "; puts(bname);cout<<"Author Name : ";

 puts(aname);

}

void modify_book()

{

cout<<"\nBook no. : "<<bno;cout<<"\nModify Book Name : ";

gets(bname);

cout<<"\nModify Author's Name of Book : ";gets(aname);

}

char* retbno()

{

return bno;}

void report()

{cout<<bno<<setw(30)<<bname<<setw(30)<<aname<<endl;}

}; //class ends here

Deepak Yadav Page 11

Page 12: Library Manegment System

7/28/2019 Library Manegment System

http://slidepdf.com/reader/full/library-manegment-system 12/32

ANNIE BESNT INTER COLLEGELIBRARY MANAGEMENT SYSTEM [2012-13]

class student

{

char admno[6];char name[20];

char stbno[6];int token;

 public:

void create_student(){

clrscr();

cout<<"\nNEW STUDENT ENTRY...\n";

cout<<"\nEnter The admission no. ";cin>>admno;

cout<<"\n\nEnter The Name of The Student ";gets(name);token=0;

stbno[0]='/0';

cout<<"\n\nStudent Record Created..";

}

void show_student(){

cout<<"\nAdmission no. : "<<admno;

cout<<"\nStudent Name : "; puts(name);

cout<<"\nNo of Book issued : "<<token;

if(token==1)cout<<"\nBook No "<<stbno;

}

void modify_student()

{

cout<<"\nAdmission no. : "<<admno;

cout<<"\nModify Student Name : ";

gets(name);}

char* retadmno()

{

return admno;}

Deepak Yadav Page 12

Page 13: Library Manegment System

7/28/2019 Library Manegment System

http://slidepdf.com/reader/full/library-manegment-system 13/32

ANNIE BESNT INTER COLLEGELIBRARY MANAGEMENT SYSTEM [2012-13]char* retstbno()

{

return stbno;

}

int rettoken(){

return token;}

void addtoken(){token=1;}

void resettoken()

{token=0;}

void getstbno(char t[]){

strcpy(stbno,t);

}

void report()

{cout<<"\t"<<admno<<setw(20)<<name<<setw(10)<<token<<endl;}

}; //class ends here

//***************************************************************// global declaration for stream object, object

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

fstream fp,fp1;

 book bk;

student st;

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

// function to write in file//****************************************************************

void write_book(){

char ch;

Deepak Yadav Page 13

Page 14: Library Manegment System

7/28/2019 Library Manegment System

http://slidepdf.com/reader/full/library-manegment-system 14/32

ANNIE BESNT INTER COLLEGELIBRARY MANAGEMENT SYSTEM [2012-13]fp.open("book.dat",ios::out|ios::app);

do

{

clrscr();

 bk.create_book();fp.write((char*)&bk,sizeof(book));

cout<<"\n\nDo you want to add more record..(y/n?)";cin>>ch;

}while(ch=='y'||ch=='Y');

fp.close();}

void write_student()

{char ch;

fp.open("student.dat",ios::out|ios::app);do{

st.create_student();

fp.write((char*)&st,sizeof(student));cout<<"\n\ndo you want to add more record..(y/n?)";

cin>>ch;

}while(ch=='y'||ch=='Y');

fp.close();

}

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

// function to read specific record from file//****************************************************************

void display_spb(char n[])

{

cout<<"\nBOOK DETAILS\n";

int flag=0;

fp.open("book.dat",ios::in);while(fp.read((char*)&bk,sizeof(book)))

{if(strcmpi(bk.retbno(),n)==0)

{

 bk.show_book();flag=1;

}

Deepak Yadav Page 14

Page 15: Library Manegment System

7/28/2019 Library Manegment System

http://slidepdf.com/reader/full/library-manegment-system 15/32

ANNIE BESNT INTER COLLEGELIBRARY MANAGEMENT SYSTEM [2012-13]}

fp.close();

if(flag==0)

cout<<"\n\nBook does not exist";

getch();}

void display_sps(char n[])

{

cout<<"\nSTUDENT DETAILS\n";int flag=0;

fp.open("student.dat",ios::in);

while(fp.read((char*)&st,sizeof(student)))

{if((strcmpi(st.retadmno(),n)==0))

{st.show_student();flag=1;

}

}

fp.close();

if(flag==0)

cout<<"\n\nStudent does not exist";getch();

}

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

// function to modify record of file//****************************************************************

void modify_book()

{

char n[6];

int found=0;

clrscr();cout<<"\n\n\tMODIFY BOOK REOCORD.... ";

cout<<"\n\n\tEnter The book no. of The book";cin>>n;

fp.open("book.dat",ios::in|ios::out);

while(fp.read((char*)&bk,sizeof(book)) && found==0){

if(strcmpi(bk.retbno(),n)==0)

Deepak Yadav Page 15

Page 16: Library Manegment System

7/28/2019 Library Manegment System

http://slidepdf.com/reader/full/library-manegment-system 16/32

ANNIE BESNT INTER COLLEGELIBRARY MANAGEMENT SYSTEM [2012-13]{

 bk.show_book();

cout<<"\nEnter The New Details of book"<<endl;

 bk.modify_book();

int pos=-1*sizeof(bk);

fp.seekp(pos,ios::cur);fp.write((char*)&bk,sizeof(book));

cout<<"\n\n\t Record Updated";found=1;

}

}

fp.close();

if(found==0)

cout<<"\n\n Record Not Found ";getch();

}

void modify_student()

{char n[6];

int found=0;

clrscr();

cout<<"\n\n\tMODIFY STUDENT RECORD... ";cout<<"\n\n\tEnter The admission no. of The student";

cin>>n;

fp.open("student.dat",ios::in|ios::out);while(fp.read((char*)&st,sizeof(student)) && found==0)

{if(strcmpi(st.retadmno(),n)==0)

{

st.show_student();cout<<"\nEnter The New Details of student"<<endl;

st.modify_student();

int pos=-1*sizeof(st);

fp.seekp(pos,ios::cur);

fp.write((char*)&st,sizeof(student));cout<<"\n\n\t Record Updated";

found=1;}

}

fp.close();

if(found==0)

Deepak Yadav Page 16

Page 17: Library Manegment System

7/28/2019 Library Manegment System

http://slidepdf.com/reader/full/library-manegment-system 17/32

ANNIE BESNT INTER COLLEGELIBRARY MANAGEMENT SYSTEM [2012-13]cout<<"\n\n Record Not Found ";

getch();

}

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

// function to delete record of file//****************************************************************

void delete_student()

{char n[6];

int flag=0;

clrscr();

cout<<"\n\n\n\tDELETE STUDENT...";cout<<"\n\nEnter The admission no. of the Student You Want To Delete : ";

cin>>n;fp.open("student.dat",ios::in|ios::out);fstream fp2;

fp2.open("Temp.dat",ios::out);

fp.seekg(0,ios::beg);while(fp.read((char*)&st,sizeof(student)))

{

if(strcmpi(st.retadmno(),n)!=0)

fp2.write((char*)&st,sizeof(student));else

flag=1;

fp2.close();

fp.close(); 

remove("student.dat");

rename("Temp.dat","student.dat");if(flag==1)

cout<<"\n\n\tRecord Deleted ..";

else

cout<<"\n\nRecord not found";

getch();}

void delete_book()

{char n[6];

clrscr();

Deepak Yadav Page 17

Page 18: Library Manegment System

7/28/2019 Library Manegment System

http://slidepdf.com/reader/full/library-manegment-system 18/32

ANNIE BESNT INTER COLLEGELIBRARY MANAGEMENT SYSTEM [2012-13]cout<<"\n\n\n\tDELETE BOOK ...";

cout<<"\n\nEnter The Book no. of the Book You Want To Delete : ";

cin>>n;

fp.open("book.dat",ios::in|ios::out);

fstream fp2;fp2.open("Temp.dat",ios::out);

fp.seekg(0,ios::beg);while(fp.read((char*)&bk,sizeof(book)))

{

if(strcmpi(bk.retbno(),n)!=0){

fp2.write((char*)&bk,sizeof(book));

}

fp2.close();fp.close();remove("book.dat");

rename("Temp.dat","book.dat");

cout<<"\n\n\tRecord Deleted ..";getch();

}

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

// function to display all students list//****************************************************************

void display_alls(){

clrscr();

fp.open("student.dat",ios::in);if(!fp)

{

cout<<"ERROR!!! FILE COULD NOT BE OPEN ";

getch();

return;}

cout<<"\n\n\t\tSTUDENT LIST\n\n";

cout<<"==================================================================\n"cout<<"\tAdmission No."<<setw(10)<<"Name"<<setw(20)<<"Book Issued\n";

Deepak Yadav Page 18

Page 19: Library Manegment System

7/28/2019 Library Manegment System

http://slidepdf.com/reader/full/library-manegment-system 19/32

ANNIE BESNT INTER COLLEGELIBRARY MANAGEMENT SYSTEM [2012-13]

cout<<"==================================================================\n"

while(fp.read((char*)&st,sizeof(student)))

st.report();}

 

fp.close();getch();

}

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

// function to display Books list//****************************************************************

void display_allb()

{clrscr();

fp.open("book.dat",ios::in);

if(!fp)

{cout<<"ERROR!!! FILE COULD NOT BE OPEN ";

getch();

return;}

cout<<"\n\n\t\tBook LIST\n\n";

cout<<"====================================================================

=====\n";cout<<"Book Number"<<setw(20)<<"Book Name"<<setw(25)<<"Author\n";

cout<<"====================================================================

=====\n";

while(fp.read((char*)&bk,sizeof(book)))

{

 bk.report();

}fp.close();

getch();

Deepak Yadav Page 19

Page 20: Library Manegment System

7/28/2019 Library Manegment System

http://slidepdf.com/reader/full/library-manegment-system 20/32

ANNIE BESNT INTER COLLEGELIBRARY MANAGEMENT SYSTEM [2012-13]}

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

// function to issue book 

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

void book_issue()

{char sn[6],bn[6];

int found=0,flag=0;

clrscr();

cout<<"\n\nBOOK ISSUE ...";cout<<"\n\n\tEnter The student's admission no.";

cin>>sn;fp.open("student.dat",ios::in|ios::out);fp1.open("book.dat",ios::in|ios::out);

while(fp.read((char*)&st,sizeof(student)) && found==0)

{if(strcmpi(st.retadmno(),sn)==0)

{

found=1;

if(st.rettoken()==0){

cout<<"\n\n\tEnter the book no. ";

cin>>bn;while(fp1.read((char*)&bk,sizeof(book))&& flag==0)

{

if(strcmpi(bk.retbno(),bn)==0){

 bk.show_book();

flag=1;st.addtoken();

st.getstbno(bk.retbno());

int pos=-1*sizeof(st);

fp.seekp(pos,ios::cur);

fp.write((char*)&st,sizeof(student));cout<<"\n\n\t Book issued successfully";

cout<<"\n\n\tPlease Note: Write current date in backside of book and";cout <<"\n\tsubmit within 15 days fine Rs. 1 for each day after 15 days period";

Deepak Yadav Page 20

Page 21: Library Manegment System

7/28/2019 Library Manegment System

http://slidepdf.com/reader/full/library-manegment-system 21/32

ANNIE BESNT INTER COLLEGELIBRARY MANAGEMENT SYSTEM [2012-13]}

  }

if(flag==0)

cout<<"Book no does not exist";}

else

 

cout<<"You have not returned the last book ";

}}

if(found==0)

cout<<"Student record not exist...";

getch();fp.close();

fp1.close();}

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

// function to deposit book //****************************************************************

void book_deposit()

{char sn[6],bn[6];

int found=0,flag=0,day,fine;

clrscr();cout<<"\n\nBOOK DEPOSIT ...";

cout<<"\n\n\tEnter The student’s admission no.";

cin>>sn;fp.open("student.dat",ios::in|ios::out);

fp1.open("book.dat",ios::in|ios::out);

while(fp.read((char*)&st,sizeof(student)) && found==0){

if(strcmpi(st.retadmno(),sn)==0)

{

found=1;

if(st.rettoken()==1){

while(fp1.read((char*)&bk,sizeof(book))&& flag==0){

if(strcmpi(bk.retbno(),st.retstbno())==0)

{ bk.show_book();

flag=1;

Deepak Yadav Page 21

Page 22: Library Manegment System

7/28/2019 Library Manegment System

http://slidepdf.com/reader/full/library-manegment-system 22/32

ANNIE BESNT INTER COLLEGELIBRARY MANAGEMENT SYSTEM [2012-13]cout<<"\n\nBook deposited in no. of days";

cin>>day;

if(day>15){

fine=(day-15)*1;

cout<<"\n\nFine has to deposited Rs. "<<fine;}

st.resettoken();

int pos=-1*sizeof(st);fp.seekp(pos,ios::cur);

fp.write((char*)&st,sizeof(student));

cout<<"\n\n\t Book deposited successfully";

}}

if(flag==0)cout<<"Book no does not exist";}

else

cout<<"No book is issued..please check!!";}

}

if(found==0)

cout<<"Student record not exist...";getch();

fp.close();

fp1.close();}

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

// INTRODUCTION FUNCTION

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

void intro()

{clrscr();

gotoxy(35,11);

cout<<"------WEL COME ------\n";cout<<"\n\n::::::::::::::::::::::::::::::::\n\n";

Deepak Yadav Page 22

Page 23: Library Manegment System

7/28/2019 Library Manegment System

http://slidepdf.com/reader/full/library-manegment-system 23/32

ANNIE BESNT INTER COLLEGELIBRARY MANAGEMENT SYSTEM [2012-13]cout<<"LIBRARY";

gotoxy(35,14);

cout<<"MANAGEMENT";

gotoxy(35,17);cout<<"SYSTEM";

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

 

cout<<"________________\n\n";cout<<"\n\nMADE BY : Akash Kashyap";

cout<<"\n\nSCHOOL : ANNIE BESANT INTER COLLEGE";

cout<<"__________________________\n";cout<<"---------------------------------------------\n";

getch();

}

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

// ADMINISTRATOR MENU FUNCTION

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

void admin_menu()

{

clrscr();int ch2;

 

cout<<"----------------------------------------------------------------------------------------------------------------"; 

cout<<"----------------------------------------------------------------------------------------------------------------";

cout<<"\n\n\n\tMAIN MENU";cout<<"\n\n\t1.CREATE STUDENT RECORD";

cout<<"\n\n\t2.DISPLAY ALL STUDENTS RECORD";

cout<<"\n\n\t3.DISPLAY SPECIFIC STUDENT RECORD ";cout<<"\n\n\t4.MODIFY STUDENT RECORD";

cout<<"\n\n\t5.DELETE STUDENT RECORD";

cout<<"\n\n\t6.CREATE BOOK ";

cout<<"\n\n\t7.DISPLAY ALL BOOKS ";

cout<<"\n\n\t8.DISPLAY SPECIFIC BOOK ";cout<<"\n\n\t9.MODIFY BOOK ";

cout<<"\n\n\t10.DELETE BOOK ";cout<<"\n\n\t11.BACK TO MAIN MENU";

 

cout<<"----------------------------------------------------------------------------------------------------------------";cout<<"\n\n\tPlease Enter Your Choice (1-11) ";

cin>>ch2;

Deepak Yadav Page 23

Page 24: Library Manegment System

7/28/2019 Library Manegment System

http://slidepdf.com/reader/full/library-manegment-system 24/32

ANNIE BESNT INTER COLLEGELIBRARY MANAGEMENT SYSTEM [2012-13]switch(ch2)

{

case 1: clrscr();

write_student();break;case 2: display_alls();break;

case 3:

 

char num[6];clrscr();

cout<<"\n\n\tPlease Enter The Admission No. ";

cin>>num;display_sps(num);

break;

case 4: modify_student();break;

case 5: delete_student();break;case 6: clrscr();

write_book();break;case 7: display_allb();break;case 8: {

char num[6];

clrscr();cout<<"\n\n\tPlease Enter The book No. ";

 

cin>>num;

display_spb(num);break;

}

case 9: modify_book();break;case 10: delete_book();break;

case 11: return;

default:cout<<"\a";}

admin_menu();

}

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

// THE MAIN FUNCTION OF PROGRAM

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

void main()

{

char ch;intro();

do

Deepak Yadav Page 24

Page 25: Library Manegment System

7/28/2019 Library Manegment System

http://slidepdf.com/reader/full/library-manegment-system 25/32

ANNIE BESNT INTER COLLEGELIBRARY MANAGEMENT SYSTEM [2012-13]{

clrscr();

cout<<"\n\n\n\t MENU";

cout<<"\n\n\t01. BOOK ISSUE";cout<<"\n\n\t02. BOOK DEPOSIT";

cout<<"\n\n\t03. ADMINISTRATOR MENU";

 

cout<<"\n\n\t04. EXIT";cout<<"\n\n\tPlease Select Your Option (1-4) ";

ch=getche();

switch(ch){

case '1':clrscr();

book_issue();

break;case '2':book_deposit();

break;case '3':admin_menu();

break;

case '4':exit(0);

default :cout<<"\a";}

}while(ch!='4');

}

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

//

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

Introduction of C++

C++ began as an expanded version of C. The C++ extensions were first inventedby Bjarne Stroustrup in 1979 at Bell Laboratories in Murray Hill, New Jersey. Heinitially called the new language "C with Classes." However, in 1983 the name waschanged to C++.

Object-based programming languages,

Object-based programming is the style of programming that primarily supports encapsulation and

object identity. Major features that are required for object-based programming are:

• Data encapsulation

• Data hiding and access mechanism

Deepak Yadav Page 25

Page 26: Library Manegment System

7/28/2019 Library Manegment System

http://slidepdf.com/reader/full/library-manegment-system 26/32

ANNIE BESNT INTER COLLEGELIBRARY MANAGEMENT SYSTEM [2012-13]• Automatic initialization and clear-up of objects

• Operator overloading

Languages that support programming with objects are said to be object-based programming

languages. They do not support inheritance and dynamic binding. Ad is a typical object-based

programming language.

. Classes:

We just mentioned that objects contained that objects contain data, and code to manipulate tha

data. The entire set of data and code of an object can be made a user-defined data type with the

help of a class. In fact, objects are variables of that class type. Once a class has been defined , we

can create any number of objects belonging to that class. Each object is associated with the data o

type class with which they are created. A class is thus a collection of objects of similar type. Foe

example, mango, apple and orange are member of the class fruit. Classes are user-defined datatypes and behave like the built-in types of a programming language. The syntax is used to create

an object is no different than the syntax used to create an integer object in C. If fruit has been

defined as a class, then the statement: Fruit mango; Will create an object mango belonging to the

class fruit.

1.3.3 Encapsulation: 

 The wrapping of data and functions into a single unit (called class) is known as encapsulation. Data

encapsulation is the most striking feature of a class. The data is not accessible to the outside world

and those functions, which are wrapped in the class, can access it. These function provide the

interface between the object’s data and the program. This insulation of the data from direct access

by the program is called data hiding .

1.3.6 Data Abstraction: 

Abstraction refers to the act of representing essential features with out including the background

details or explanations. Classes use the concept of abstraction and are defined as a list of abstrac

attributes such as size, weight and cost and functions to operate on these attributes. Sometimes

these are called data members because they hold information. The functions that operate on these

data are called methods or member functions.

Deepak Yadav Page 26

Page 27: Library Manegment System

7/28/2019 Library Manegment System

http://slidepdf.com/reader/full/library-manegment-system 27/32

ANNIE BESNT INTER COLLEGELIBRARY MANAGEMENT SYSTEM [2012-13]

1.3.7 Inheritance

Inheritance is the process by which objects of one class acquire the properties of objects of anotherclass. It supports the concept of hierarchical classification. For example, the bird ‘robin’ is a part of 

the

class ‘flying bird’ which is again a part of the class ‘bird’. The principle behind this sort of division isthat each derived class shares common characteristics with the class from which it is derived

Deepak Yadav Page 27

Page 28: Library Manegment System

7/28/2019 Library Manegment System

http://slidepdf.com/reader/full/library-manegment-system 28/32

ANNIE BESNT INTER COLLEGELIBRARY MANAGEMENT SYSTEM [2012-13]

SCREEN

MAIN SCREEN

Deepak Yadav Page 28

Page 29: Library Manegment System

7/28/2019 Library Manegment System

http://slidepdf.com/reader/full/library-manegment-system 29/32

ANNIE BESNT INTER COLLEGELIBRARY MANAGEMENT SYSTEM [2012-13]

ADMINISTRATOR MENU

Deepak Yadav Page 29

Page 30: Library Manegment System

7/28/2019 Library Manegment System

http://slidepdf.com/reader/full/library-manegment-system 30/32

ANNIE BESNT INTER COLLEGELIBRARY MANAGEMENT SYSTEM [2012-13]

Deepak Yadav Page 30

Page 31: Library Manegment System

7/28/2019 Library Manegment System

http://slidepdf.com/reader/full/library-manegment-system 31/32

ANNIE BESNT INTER COLLEGELIBRARY MANAGEMENT SYSTEM [2012-13]

BIBLOGRAPHY

Websites Referred :

www.google.com

www.sourcecode.com

Book Referred:

C++ in depth Sumit

C++ class XIIth U.P Board Deepti Mittal

 

Deepak Yadav Page 31

Page 32: Library Manegment System

7/28/2019 Library Manegment System

http://slidepdf.com/reader/full/library-manegment-system 32/32

ANNIE BESNT INTER COLLEGELIBRARY MANAGEMENT SYSTEM [2012-13]

CONCLUSION

The successful completion of the project gave us a sense of self- achievement. Project

making involved immense hard work, solving practical problems and preparation of the

final project report. Such practical approach leads to a better understanding of the lessons

We conclude with a firm belief that such practical experiences lead to constant learning

and the same would not have been accomplished without the joint efforts of our teachers

friends and our family.