0% found this document useful (0 votes)
10 views39 pages

OOP MicroProject

This document describes a micro-project report for a library management system created by a group of students. The report includes the student group members, their guide, and signatures from the guide and head of the computer department certifying the project. It also includes an acknowledgement section thanking those who helped with the project. The report consists of several parts that outline the types of management systems, the aim of this library management system project, the action plan and timeline, resources required, and outputs of the project including program code.

Uploaded by

Kartik Karche
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views39 pages

OOP MicroProject

This document describes a micro-project report for a library management system created by a group of students. The report includes the student group members, their guide, and signatures from the guide and head of the computer department certifying the project. It also includes an acknowledgement section thanking those who helped with the project. The report consists of several parts that outline the types of management systems, the aim of this library management system project, the action plan and timeline, resources required, and outputs of the project including program code.

Uploaded by

Kartik Karche
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 39

DY Patil School of Engineering (Charholi)

Via Lohegaon, Pune-412 105

Department of Computer Engineering


2023-24[3th Sem]
Micro-project Report of
Library Management
system On
Management system for library

Submitted by:-
Roll Number Name of Student Enrollment Number
06 Prajwal Dhage 2216490211
07 Tejas Mahajan 2216490213
08 Om Wakhchaure 2216490214
09 Vishal Tengle 2216490215
10 Sahil Jamnik 2216490216

Under the Guidance of


Ms: Nita Pawar
DY PATIL SCHOOL OF ENGINEEERING (CHARHOLI)
Department of Computer Engineering
SEMESTER-3th 2023-24

CERTIFICATE
This is to certify that Project report entitled "Library Management System" is
submitted in the partial fulfilment of requirement for the award of the Diploma in
Computer Engineering by Maharashtra State Board of Technical Education as record
of students' own work carried out by them under the guidance and supervision at DY
Patil School Of Engineering (Charholi), during the academic year 2022-23.

Roll Number Name of Student Enrollment Number

06 Prajwal Dhage 2216490211


07 Tejas Mahajan 2216490213
08 Om Wakhchaure 2216490214
09 Vishal Tengle 2216490215
10 Sahil Jamnik 2216490216

Place: Charholi (Bk)


Date: / /2023.

(Ms. Nita Pawar) (Smt. Priyanka Kasare)


Guide Head of Computer Department
ACKNOWLEDGEMEMT

It is with profoundly sense of gratitude that we acknowledge from our guide


MS: Nita Pawar. She has been guide in the true sense of word, a guide who
satisfaction from our word & progress.

We are highly obliged to Ms. Priyanka Kasare. Head of Computer


Department for aberrance & good co-operation given to us for bringing this project
to almost standard.
We are grateful to our principal Prof. Shelke Sir for proceeding
acknowledgement to us in the connection of this project concluding. We
appreciate the assistance of all staff that helps us in for their sincere & obliging
help to make our project successfully.
Micro Project
Proposal Part
A
Different types of Management systems with Examples.

1. Brief Introduction:
The Management system is the system used to manage the system information by
storing it in sequential manner and in readable format which can be edited When
necessary it can be updated, deleted and used to keep the data secure.

A management system is the way in which an organization manages the


interrelated parts of its business in order to achieve its objectives. For example,
there are many management systems like hospital management system, bank
management system and etc.

In this Project we have made the Library management system in which the
manager can easily find the books necessary easily and enter the updated new
books and maintain the information of giving the books to the students.

2. Aim of The Micro Project:

The main objective of the Library Management System is to manage the


details of Address, Member, Issues, Books, Student.
It manages all the information about Address, Librarian, Student,
Address.
The project is totally built at administrative end and thus only the
administrator is guaranteed the access.
A library management system is used to maintain library records.
It tracks the records of the number of books in the library, how many
books are issued, or how many books have been returned or renewed or
late fine charges, etc.
3. Action Plan:

Sr.no Details of activity


Planned start Planned end Name of responsible
date date group members
1. Searching for the topic Tejas Mahajan
Prajwal Dhage

2. Confirmed the topic we Sahil Jamnik


searched for for the Vishal Tengle
micro project Om Wakhchaure
Tejas Mahajan
Prajwal Dhage

4. Collecting information Tejas Mahajan


Prajwal Dhage

5. Making proposal Sahil Jamnik


Vishal Tengle

6. Testing and analysis of


test result Om Wakhchaure
Tejas Mahajan

7. Preparation of final Sahil Jamnik


project report Vishal Tengle
Om Wakhchaure
Tejas Mahajan
Prajwal Dhage
8. Final submission of the Sahil Jamnik
project Vishal Tengle
Om Wakhchaure
Tejas Mahajan
Prajwal Dhage
4. Resources Required:

Sr. No. Name of Specification


resources/Material
1. Computer system Intel i5 7th gen processor

2. RAM 8GB

3. Hard disk 1TB

4. Operating system Windows 10

5. Name Of Team Members:

Name Roll No.


Prajwal Dhage 06

Tejas Mahajan 07

Om Wakhchaure 08

Vishal Tengle 09

Sahil Jamnik 10

Ms. Nita Pawar


(Micro-project Guide)
Part B
Library Management System

1. Brief Introduction:
A library management system is software that is designed to manage all the functions of a
library. It helps librarian to maintain the database of new books and the books that are borrowed
by members along with their due dates.
This system completely automates all your library’s activities. The best way to maintain,
organize, and handle countless books systematically is to implement a library management
system software.
A library management system is used to maintain library records. It tracks the records of the
number of books in the library, how many books are issued, or how many books have been
returned or renewed or late fine charges, etc.

2. Aim of the Micro Project:


The main objective of the Library Management System is to manage the details of
Address, Member, Issues, Books, Student.

It manages all the information about Address, Librarian, Student, Address.

The project is totally built at administrative end and thus only the administrator is guaranteed
the access.

A library management system is used to maintain library records.

It tracks the records of the number of books in the library, how many books are issued, or
how many books have been returned or renewed or late fine charges, etc.
3. Course Outcomes Integrated:
 Making the Library management system run smoothly.

4. Actual Procedure followed:


• Searching for the topic
• Confirmed the topic we searched for for the micro project
• Distribution of work
• Collecting information about Project
• Making proposal
• Testing and analysis of test result
• Preparation of final project report

• Final submission of the project


5. Actual Resources Required:

Name of Specification
resources/Material
Sr.
No.

1. Computer system Intel i5 11th gen


processor

2. RAM 16GB

3. Hard disk 1TB

4. Operating system Windows 11


6. Outputs of the Micro Projects:

 Program Code for Library Management System:

Code

#include<iostream>
#include<stdio.h>
#include<stdlib.h>
#include<fstream>
#include<string.h>
#include<conio.h>
using namespace std;
class Lib
{
public:
char bookname[100],auname[50],sc[20],sc1[50];
int q,B,p;
Lib()
{
strcpy(bookname,"NO Book Name");
strcpy(auname,"NO Author Name");
strcpy(sc,"NO Book ID");
strcpy(sc1,"NO Book ID");
q=0;
B=0;
p=0;
}
void get();
void student();
void pass();
void librarian();
void password();
void getdata();
void show(int);
void booklist(int);
void modify();
void see(int);
int branch(int);
void issue();
void der(char[],int,int);
void fine(int,int,int,int,int,int);
};
void Lib::getdata()
{
int i;
fflush(stdin);
cout<<"\n\t\tEnter the Details -------->\n";
cout<<"\n\t\tEnter Book's Name :----> ";
cin.getline(bookname,100);
for(i=0;bookname[i]!='\0';i++)
{
if(bookname[i]>='a'&&bookname[i]<='z')
bookname[i]-=32;
}
cout<<"\n\t\tEnter Author's Name :----> ";
cin.getline(auname,50);
cout<<"\n\t\tEnter Publication name :----> ";
cin.getline(sc1,50);
cout<<"\n\t\tEnter Book's ID :----> ";
cin.getline(sc,20);
cout<<"\n\t\tEnter Book's Price :----> ";
cin>>p;
cout<<"\n\t\tEnter Book's Quantity :----> ";
cin>>q;
}
void Lib::show(int i)
{
cout<<"\n\t\tBook Name :----> "<<bookname<<endl;
cout<<"\n\t\tBook's Author Name :----> "<<auname<<endl;
cout<<"\n\t\tBook's ID :----> "<<sc<<endl; cout<<"\n\t\
tBook's Publication :----> "<<sc1<<endl; if(i==2)
{
cout<<"\n\t\tBook's Price :----> "<<p<<endl;
cout<<"\n\t\tBook's Quantity :----> "<<q<<endl;
}
}
void Lib::booklist(int i)
{
int b,r=0;
system("cls");
b=branch(i);
system("cls");
ifstream intf("Booksdata.txt",ios::binary);
if(!intf)
cout<<"\n\t\tBook Not Found. ..........";
else
{
cout<<"\n\t ************ Book List ************ \n\n";
intf.read((char*)this,sizeof(*this));
while(!intf.eof())
{
if(b==B)
{
if(q==0 && i==1)
{

}
else
{
r++;
cout<<"\n\t\t********** "<<r<<". ********** \n";
show(i);
}
}
intf.read((char*)this,sizeof(*this));
}
}
cout<<"\n\t\tPress Any Key To Continue. ......";
getch();
system("cls");
if(i==1)
student();
else
librarian();
}
void Lib::modify()
{
char ch,st1[100];
int i=0,b,cont=0;
system("cls");
cout<<"\n\t\t>>Please Choose One Option ---------->\n";
cout<<"\n\t\t1.Modify Current Books\n\n\t\t2.Add New Book\n\n\t\t3.Delete A
Book\n\n\t\t4.Go Back\n";
cout<<"\n\n\t\tEnter Your Choice : ";
cin>>i;
if(i==1)
{
system("cls");
b=branch(2);
ifstream intf1("Booksdata.txt",ios::binary);
if(!intf1)
{
cout<<"\n\t\tBook Not Found ............\n";
cout<<"\n\t\tPress Any Key To Continue .........";
getch();
system("cls");
librarian();
}
intf1.close();
system("cls");
cout<<"\n\t\tPlease Choose One Option :-\n";
cout<<"\n\t\t1.Search By Book Name\n\n\t\t2.Search By Book's ID\n";
cout<<"\n\t\tEnter Your Choice : ";
cin>>i;
fflush(stdin);
if(i==1)
{
system("cls"); cout<<"\n\t\
tEnter Book Name : ";
cin.getline(st1,100);
system("cls");
fstream
intf("Booksdata.txt",ios::in|ios::out|ios::ate|ios::binary);
intf.seekg(0);
intf.read((char*)this,sizeof(*this));
while(!intf.eof())
{
for(i=0;b==B&&bookname[i]!='\0'&&st1[i]!='\0'&&(st1[
i]==bookname[i]||st1[i]==bookname[i]+32);i++);
if(bookname[i]=='\0'&&st1[i]=='\0')
{
cont++;
getdata();
intf.seekp(intf.tellp()-=sizeof(*this));
intf.write((char*)this,sizeof(*this));
break;
}
intf.read((char*)this,sizeof(*this));
}
intf.close();
}
else if(i==2)
{
cout<<"\n\t\tEnter Book's ID : ";
cin.getline(st1,100);
system("cls");
fstream
intf("Booksdata.txt",ios::in|ios::out|ios::ate|ios::binary);
intf.seekg(0);
intf.read((char*)this,sizeof(*this));
while(!intf.eof())
{
for(i=0;b==B&&sc[i]!='\0'&&st1[i]!='\0'&&st1[i]==sc[
i];i++);
if(sc[i]=='\0'&&st1[i]=='\0')
{
6ont++;
getdata();
intf.seekp(intf.tellp()-=sizeof(*this));
intf.write((char*)this,sizeof(*this));
break;
}
intf.read((char*)this,sizeof(*this));
}

intf.close();
}
else
{
cout<<"\n\t\tIncorrect Input .......(\n";
cout<<"\n\t\tPress Any Key To Continue ........";
getch();
system("cls");
modify();
}
if(cont==0)
{
cout<<"\n\t\tBook Not Found ..........\n";
cout<<"\n\t\tPress Any Key To Continue ........";
getch();
system("cls");
modify();
}
else
cout<<"\n\t\tUpdated Successfully ........\n";

}
else if(i==2)
{
system("cls");
B=branch(2);
system("cls");
getdata();
ofstream outf("Booksdata.txt",ios::app|ios::binary);
outf.write((char*)this,sizeof(*this));
outf.close();
cout<<"\n\t\tBook Added Successfully. ..........\n";
}
else if(i==3)
{
system("cls");
b=branch(2);
ifstream intf1("Booksdata.txt",ios::binary);
if(!intf1)
{
cout<<"\n\t\tBook Not Found ..........\n";
cout<<"\n\t\tPress Any Key To Continue .......";
getch();
intf1.close();
system("cls");
librarian();
}
intf1.close();
system("cls");
cout<<"\n\t\tPlease Choose Any One Option For Deletion:-\n";
cout<<"\n\t\t1.By Book Name\n\n\t\t2.By Book's ID\n"; cout<<"\n\t\
tEnter Your Choice : ";
cin>>i;
fflush(stdin);
if(i==1)
{
system("cls"); cout<<"\n\t\
tEnter Book Name : ";
cin.getline(st1,100);
ofstream outf("temp.txt",ios::app|ios::binary);
ifstream intf("Booksdata.txt",ios::binary);
intf.read((char*)this,sizeof(*this)); while(!
intf.eof())
{
for(i=0;b==B&&bookname[i]!='\0'&&st1[i]!='\0'&&(st1[
i]==bookname[i]||st1[i]==bookname[i]+32);i++);
if(bookname[i]=='\0'&&st1[i]=='\0')
{
cont++;
intf.read((char*)this,sizeof(*this));

}
else
{
outf.write((char*)this,sizeof(*this));
intf.read((char*)this,sizeof(*this));
}
}

intf.close();
outf.close();
remove("Booksdata.txt");
rename("temp.txt","Booksdata.txt");
}
else if(i==2)
{
cout<<"\n\t\tEnter Book's ID : ";
cin.getline(st1,100);
ofstream outf("temp.txt",ios::app|ios::binary);
ifstream intf("Booksdata.txt",ios::binary);
intf.read((char*)this,sizeof(*this)); while(!
intf.eof())
{
for(i=0;b==B&&sc[i]!='\0'&&st1[i]!='\0'&&st1[i]==sc[
i];i++);
if(sc[i]=='\0'&&st1[i]=='\0')
{
cont++;
intf.read((char*)this,sizeof(*this));
}
else
{
outf.write((char*)this,sizeof(*this));
intf.read((char*)this,sizeof(*this));
}
}
outf.close();
intf.close();
remove("Booksdata.txt");
rename("temp.txt","Booksdata.txt");
}
else
{
cout<<"\n\t\tIncorrect Input .......(\n";
cout<<"\n\t\tPress Any Key To Continue ........";
getch();
system("cls");
modify();
}
if(cont==0)
{
cout<<"\n\t\tBook Not Found ..........\n";
cout<<"\n\t\tPress Any Key To Continue ........";
getch();
system("cls");
modify();
}
else
cout<<"\n\t\tDeleted Successfully ..........\n";

}
else if(i==4)
{
system("cls");
librarian();
}
else
{
cout<<"\n\t\tWrong Input. ........\n";
cout<<"\n\t\tPress Any Key To Continue ........";
getch();
system("cls");
modify();
}
cout<<"\n\t\tPress Any Key To Continue ........";
getch();
system("cls");
librarian();

}
int Lib::branch(int x)
{
int i;
cout<<"\n\t\t>>Enter The Branch ---------->\n";
cout<<"\n\t\t1.Computer\n\n\t\t2.Artificial Intelligence\n\n\t\t3.Mechanical\n\n\t\
t4.Go To Main Menu\n";
cout<<"\n\t\tEnter Your Choice : ";
cin>>i;
switch(i)
{
case 1: return 1;
break;
case 2: return 2;
break;
case 3: return 3;
break;
case 4: return 4;
break;
case 5: return 5;
break;
case 6: return 6;
break;
case 7: system("cls");
if(x==1)
student();
else
librarian();
default : cout<<"\n\t\tPlease Enter Correct Option :(";
getch();
system("cls");
branch(x);
}
}
void Lib::see(int x)
{
int i,b,cont=0;
char ch[100];
system("cls");
b=branch(x);
ifstream intf("Booksdata.txt",ios::binary); if(!
intf)
{
cout<<"\n\t\tBook Not Found ..........\n";
cout<<"\n\t\t->Press Any Key to Continue .......";
getch();
system("cls");
if(x==1)
student();
else
librarian();
}

system("cls");
cout<<"\n\t\tPlease Choose One Option ---------->\n";
cout<<"\n\t\t1.Search By Name\n\n\t\t2.Search By Book's ID\n";
cout<<"\n\t\tEnter Your Choice : ";
cin>>i;
fflush(stdin);
intf.read((char*)this,sizeof(*this));
if(i==1)
{
cout<<"\n\t\tEnter Book's Name :-----> ";
cin.getline(ch,100);
system("cls");
while(!intf.eof())
{
for(i=0;b==B&&q!=0&&bookname[i]!='\0'&&ch[i]!='\0'&&(ch[i]==bookname[i]||ch[i]==
bookname[i]+32);i++);
if(bookname[i]=='\0'&&ch[i]=='\0')
{
cout<<"\n\t\tBook Found -------->\n";
show(x);
cont++;
break;
}
intf.read((char*)this,sizeof(*this));
}
}
else if(i==2)
{
cout<<"\n\t\tEnter Book's ID :-----> ";
cin.getline(ch,100);
system("cls");
while(!intf.eof())
{
for(i=0;b==B&&q!=0&&sc[i]!='\0'&&ch[i]!='\0'&&ch[i]==sc[i];i++);
if(sc[i]=='\0'&&ch[i]=='\0')
{
cout<<"\n\t\tBook Found ---------->\n";
show(x);
cont++;
break;
}
intf.read((char*)this,sizeof(*this));
}

}
else
{
cont++;
cout<<"\n\t\tPlease Enter Correct Option :(";
getch();
system("cls");
see(x);
}
intf.close();
if(cont==0)
cout<<"\n\t\tThis Book Is Not Available........( \n";
cout<<"\n\t\tPress Any Key To Continue ........";
getch();
system("cls");
if(x==1)
student();
else
librarian();

}
void Lib::issue()
{
char st[50],st1[20];
int b,i,j,d,m,y,dd,mm,yy,cont=0;
system("cls");
cout<<"\n\t\t->Please Choose One Option -------->\n";
cout<<"\n\t\t1.Issue Book\n\n\t\t2.View Issued Book\n\n\t\t3.Search Student Who Checkout
Books\n\n\t\t4.Reissue Book\n\n\t\t5.Return Book\n\n\t\t6.Go Back To Menu\n\n\t\tEnter Your
Choice : ";
cin>>i;
fflush(stdin);
if(i==1)
{
system("cls");
b=branch(2);
system("cls");
fflush(stdin);
cout<<"\n\t\t->Please Enter Details -------->\n";
cout<<"\n\t\tEnter Book Name : ";
cin.getline(bookname,100);
cout<<"\n\t\tEnter Book's ID : ";
cin.getline(sc,20);
//strcpy(st,sc);
der(sc,b,1);
cout<<"\n\t\tEnter Student Name : ";
cin.getline(auname,100); cout<<"\n\
t\tEnter Student's ID : ";
cin.getline(sc1,20); cout<<"\n\t\
tEnter Date : "; cin>>q>>B>>p;
ofstream outf("student.txt",ios::binary|ios::app);
outf.write((char*)this,sizeof(*this));
outf.close();
cout<<"\n\n\t\tIssued Successfully. ............\n";
}
else if(i==2)
{
ifstream intf("student.txt",ios::binary);
system("cls");
cout<<"\n\t\t->The Details Are ---------->\n";
intf.read((char*)this,sizeof(*this));
i=0;
while(!intf.eof())
{ i+
+;
cout<<"\n\t\t********** "<<i<<". ********** \n";
cout<<"\n\t\tStudent Name : "<<auname<<"\n\t\t"<<"Student's ID : "<<sc1<<"\n\t\t"<<"Book
Name : "<<bookname<<"\n\t\t"<<"Book's ID : "<<sc<<"\n\t\t"<<"Date : "<<q<<"/"<<B<<"/"<<p<<"\
n";
intf.read((char*)this,sizeof(*this));
}
intf.close();
}
else if(i==3)
{
system("cls");
fflush(stdin);
cout<<"\n\t\t->Please Enter Details --------->\n";
cout<<"\n\n\t\tEnter Student Name : ";
cin.getline(st,50); cout<<"\n\n\t\
tEnter Student's ID : ";
cin.getline(st1,20);
system("cls");
ifstream intf("student.txt",ios::binary);
intf.read((char*)this,sizeof(*this));
cont=0;
while(!intf.eof())
{
for(i=0;sc1[i]!='\0'&&st1[i]!='\0'&&st1[i]==sc1[i];i++);
if(sc1[i]=='\0'&&st1[i]=='\0')
{
cont++;
if(cont==1)
{
cout<<"\n\t\t->The Details Are --------->\n";
cout<<"\n\t\tStudent Name : "<<auname;
cout<<"\n\t\tStudent's ID : "<<sc1;
}
cout<<"\n\n\t\t******* "<<cont<<". Book Details *******\n";
cout<<"\n\t\tBook Name : "<<bookname;
cout<<"\n\t\tBook's ID : "<<sc; cout<<"\n\t\
tDate : "<<q<<"/"<<B<<"/"<<p<<"\n";
}
intf.read((char*)this,sizeof(*this));

}
intf.close();
if(cont==0)
cout<<"\n\t\tNo Record Found ..........";
}
else if(i==4)
{
system("cls");
fflush(stdin);
cout<<"\n\t\t->Please Enter Details ---------->\n";
cout<<"\n\n\t\tEnter Student's ID : ";
cin.getline(st,50);
cout<<"\n\t\tEnter Book's ID : ";
cin.getline(st1,20);
fstream intf("student.txt",ios::in|ios::out|ios::ate|ios::binary);
intf.seekg(0);
intf.read((char*)this,sizeof(*this)); while(!
intf.eof())
{
for(i=0;sc[i]!='\0'&&st1[i]!='\0'&&st1[i]==sc[i];i++);
for(j=0;sc1[j]!='\0'&&st[j]!='\0'&&st[j]==sc1[j];j++);
if(sc[i]=='\0'&&sc1[j]=='\0'&&st[j]=='\0'&&st1[i]=='\0')
{
d=q;
m=B;
y=p;
cout<<"\n\t\tEnter New Date : ";
cin>>q>>B>>p;
fine(d,m,y,q,B,p); //fn1
intf.seekp(intf.tellp()-=sizeof(*this)); //fn3
intf.write((char*)this,sizeof(*this)); //fn5
cout<<"\n\n\t\tReissued successfully......."; //fn3
break;
}
intf.read((char*)this,sizeof(*this));
}
intf.close();
}
else if(i==5)
{
system("cls");
b=branch(2);
system("cls");
fflush(stdin);
cout<<"\n\t\t->Please Enter Details -------->\n";
cout<<"\n\t\tEnter Book's ID : ";
cin.getline(st1,20);
der(st1,b,2);
cout<<"\n\n\t\tEnter Student's ID : ";
cin.getline(st,20);
cout<<"\n\t\tEnter Present date : ";
cin>>d>>m>>y;
ofstream outf("temp.txt",ios::app|ios::binary);
ifstream intf("student.txt",ios::binary);
intf.read((char*)this,sizeof(*this)); while(!
intf.eof())
{
for(i=0;sc[i]!='\0'&&st1[i]!='\0'&&st1[i]==sc[i];i++);
for(j=0;sc1[j]!='\0'&&st[j]!='\0'&&st[j]==sc1[j];j++);
if(sc[i]=='\0'&&sc1[j]=='\0'&&st[j]=='\0'&&st1[i]=='\0'&&cont==0)
{
cont++;
intf.read((char*)this,sizeof(*this));
fine(q,B,p,d,m,y);
cout<<"\n\t\tReturned successfully. ..........";
}
else
{
outf.write((char*)this,sizeof(*this));
intf.read((char*)this,sizeof(*this));
}
}

intf.close();
outf.close();
getch();
remove("student.txt");
rename("temp.txt","student.txt");
}
else if(i==6)
{
system("cls");
librarian();
}
else
cout<<"\n\t\tWrong Input.\n";

cout<<"\n\n\t\tPress Any Key To Continue. ......";


getch();
system("cls");
librarian();
}
void Lib::fine(int d,int m,int y,int dd,int mm,int yy)
{
long int n1,n2;
int years,l,i;
const int monthDays[12] = {31, 28, 31, 30, 31, 30,31, 31, 30, 31, 30, 31};
n1 = y*365 + d;
for (i=0; i<m - 1; i++)
n1 += monthDays[i]; //fn1353
years = y;
if (m <= 2)
years--;
l= years / 4 - years / 100 + years /
400; n1 += l;
n2 = yy*365 + dd;
for (i=0; i<mm - 1; i++)
n2 += monthDays[i];
years = yy;
if (m <= 2)
years--;
l= years / 4 - years / 100 + years /
400; n2 += l;
n1=n2-n1;
n2=n1-15;
if(n2>0)
cout<<"\n\t\tThe Total Fine is : "<<n2;

}
void Lib::der(char st[],int b,int x)
{
int i,cont=0;
fstream intf("Booksdata.txt",ios::in|ios::out|ios::ate|ios::binary);
intf.seekg(0);
intf.read((char*)this,sizeof(*this)); while(!
intf.eof())
{
for(i=0;b==B&&sc[i]!='\0'&&st[i]!='\0'&&st[i]==sc[i];i++);
if(sc[i]=='\0'&&st[i]=='\0')
{
cont++;
if(x==1)
{
q--;
}
else
{
q++;
}
intf.seekp(intf.tellp()-=sizeof(*this));
intf.write((char*)this,sizeof(*this));
break;
}
intf.read((char*)this,sizeof(*this));
}
if(cont==0)
{
cout<<"\n\t\tBook Not Found. ........\n";
cout<<"\n\n\t\tPress Any Key To Continue .......";
getch();
system("cls");
issue();
}
intf.close();
}
void Lib::get()
{
int i;
string UserName;
string UserPassword;
int LoginAttempt = 0;

while (LoginAttempt < 5)


{
cout<<"\n\t************* LIBRARY MANAGEMENT SYSTEM *************\n"<<"\n\t\t\t(Coded
By Vishal,Om,Prajwal,Sahil,Tejas)\n";
cout << "Please Enter Your User Name:----> ";
cin >> UserName;
cout << "Please Enter Your User Password:----> ";
cin >> UserPassword;

if (UserName == "abc" && UserPassword == "123")


{
cout << "Welcome To Library Management System \n";
break;
}
else
break;
}
cout<<"\n\t************* LIBRARY MANAGEMENT SYSTEM ***********\n"<<"\n\t\t\t (Coded
By Vishal)\n"; cout<<"\n\t\t>>Login
As:-----> \n";
cout<<"\n\t\t1.Student\n\n\t\t2.Librarian\n\n\t\t3.Close Application\n"; cout<<"\n\
t\tEnter Your Choice : ";
cin>>i;
if(i==1)
{
system("cls");
student();
}
else if(i==2)
pass();

else if(i==3)
exit(0);
else
{
cout<<"\n\t\tPlease Enter Correct Option :(";
getch();
system("CLS");
get();
}
}
void Lib::student()
{
int i;

cout<<"\n\t************ WELCOME STUDENT ************\n";


cout<<"\n\t\t>>Please Choose One Option ------>\n";
cout<<"\n\t\t1.View BookList\n\n\t\t2.Search For A Book\n\n\t\t3.Go To Main
Menu\n\n\t\t4.Close Application\n";
cout<<"\n\t\tEnter Your Choice : ";
cin>>i;
if(i==1)
booklist(1);
else if(i==2)
see(1);
else if(i==3)
{
system("cls");
get();
}
else if(i==4)
exit(0);
else
{
cout<<"\n\t\tPlease Enter Correct Option :(";
getch();
system("cls");
student();
}
}
void Lib::pass()
{
int i=0;
char ch,st[21],ch1[21]={"pass123"};
cout<<"\n\t\tEnter Password : ";
while(1)
{
ch=getch();
if(ch==13)
{
st[i]='\0';
break;
}
else if(ch==8&&i>0)
{
i--;
cout<<"\b \b";
}
else
{
cout<<"*";
st[i]=ch;
i++;
}
}
ifstream inf("password.txt");
inf>>ch1;
inf.close(); for(i=0;st[i]==ch1[i]&&st[i]!='\0'&&ch1[i]!
='\0';i++); if(st[i]=='\0'&&ch1[i]=='\0')
{
system("cls");
librarian();
}
else
{
cout<<"\n\n\t\tWrong Password.......\n\n\t\tTry Again. ......\n";
getch();
system("cls");
get();
}
}
void Lib::librarian()
{
int i;
cout<<"\n\t************ WELCOME LIBRARIAN ************\n";
cout<<"\n\t\t>>Please Choose One Option ------>\n";
cout<<"\n\t\t1.View BookList\n\n\t\t2.Search For A Book\n\n\t\t3.Modify/Add Book\n\
n\t\t4.Issue Book\n\n\t\t5.Go to Main Menu\n\n\t\t6.Change Password\n\n\t\t7.Close
Application\n";
cout<<"\n\t\tEnter Your Choice : ";
cin>>i;
switch(i)
{
case 1:booklist(2);
break;
case 2:see(2);
break;
case 3:modify();
break;
case 4:issue();
break;
case 5:system("cls");
get();
break;
case 6:password();
break;
case 7:exit(0);
default:cout<<"\n\t\tPlease Enter Correct Option :(";
getch();
system("cls");
librarian();
}
}
void Lib::password()
{
int i=0,j=0;
char ch,st[21],ch1[21]={"pass123"};
system("cls");
cout<<"\n\n\t\tEnter Old Password : ";
while(1)
ch=getch();
if(ch==13)
{
st[i]='\0';
break;
}
else if(ch==8&&i>0)
{
i--;
cout<<"\b \b";
}
else
{
cout<<"*";
st[i]=ch;
i++;
}
}
ifstream intf("password.txt");
intf>>ch1;
intf.close(); for(i=0;st[i]==ch1[i]&&st[i]!='\0'&&ch1[i]!
='\0';i++); if(st[i]=='\0'&&ch1[i]=='\0')
{
system("cls");
cout<<"\n\t**The Password Should Be Less Than 20 Characters Without Spaces & Special
Symbols**\n\n";
cout<<"\n\t\tEnter New Password : ";
fflush(stdin);
i=0;
while(1)
{ j+
+;
ch=getch();
if(ch==13)
{
for(i=0;st[i]!=' '&&st[i]!='\0';i++);
if(j>20 || st[i]==' ')
{
cout<<"\n\n\t\tWrong Entry.....\n\n\t\tPress Any Key To Try Again. ......";
getch();
system("cls");
password();
librarian();
}
st[i]='\0';
break;
}
else if(ch==8&&i>0)
{
i--;
cout<<"\b \b";
}
else
{
cout<<"*";
st[i]=ch;
i++;
}
}
ofstream outf("password.txt");
outf<<st;
outf.close();
cout<<"\n\n\t\tYour Password Has Been Changed Successfully ........";
cout<<"\n\t\tPress Any Key To Continue. ........";
getch();
system("cls");
librarian();
}
else
{
cout<<"\n\n\t\tPassword Is Incorrect ........\n";
cout<<"\n\t\tEnter 1 for Retry or 2 for Menu";
cin>>i;
if(i==1)
{
system("cls");
password();
}
else
{
system("cls");
librarian();
}
}
}
int main()
{
Lib obj;
obj.get();
getch();
return 0;
}
Brief Explanation

Library management system is a project which aims in developing a computerized


system to maintain all the daily work of library. This project has many features which
are generally not available in normal library management systems like facility of user
login and a facility of admin login. It also has a facility of admin login through which
the admin can monitor the whole system. It has also a facility where student after
logging in their accounts can see list of books issued and its issue date and return date

Overall this project of ours is being developed to help the students as well as staff
of library to maintain the library in the best way possible and also reduce the
human efforts

Books and student maintenance modules are also included in this system which would
keep track of the students using the library and also a detailed description about the
books a library contains. With this computerized system there will be no loss of book
record or member record which generally happens when a non-computerized system is
used
Working of Program:
1. NORMAL USER
1.1 USER LOGIN
Description of
feature
This feature used by the user to login into system. They are required to enter user id
and password before they are allowed to enter the system. The user id and password
will be verified and if invalid id is there user is allowed to not enter the system.

Working
-user id is provided when they register
-The system must only allow user with valid id and password to enter the system
-The system performs authorization process which decides what user level can access to.
-The user must be able to logout after they finished using system.

1.2 REGISTER NEW USER


Description of feature
This feature can be performed by all users to register new user to create account.
Functional requirements
-System must be able to verify information
-System must be able to delete information if information is wrong

Admin Features
 Admin Dashboard
 Admin can add/update/ delete category
 Admin can add/update/ delete author
 Admin can add/update/ delete books
 Admin can issue a new book to student and also update the details
when student return book
 Admin can search student by using their student ID
 Admin can also view student details

Students-
• Student can register yourself and after registration they will get student
• After login student can view own dashboard.
• Student can update own profile.
• Student can view issued book and book return date-time.
2.3 SOFTWARE TOOLS USED

Here We have used the VS Code Editor to Type the code in C++ language using Object
Oriented Programming.

 C++:
C++ is a cross-platform language that can be used to create high-
performance applications. C++ was developed by Bjarne Stroustrup, as an
extension to the C language. C++ gives programmers a high level of control over
system resources and memory.

 oop (Object Oriented Programming):


Object-oriented programming is based on the concept of objects. In
object-oriented programming data structures, or objects are defined,
each with its own properties or attributes. Each object can also contain
its own procedures or methods. Software is designed by using objects
that interact with one another.

 Vs Code:
Visual Studio Code is a streamlined code editor with support
for development operations like debugging, task running, and
version control. It aims to provide just the tools a developer needs for
a quick code-build-debug cycle and leaves more complex workflows to
fuller featured IDEs, such as Visual Studio IDE.

 Wikipedia:
Wikipedia is a free, open content online encyclopedia created through
the collaborative effort of a community of users known as Wikipedians.
Anyone registered on the site can create an article for publication;
registration is not required to edit articles.
Program Output:
Here’s the output of the program

To Enter the user name and Password of the user.


Here it takes the input from user.

Here it is used to login to the account so it takes the user name and
Password.

After Login you will get these options choose the options.
If you are student, then chose the option 1.

If you are the librarian, then chose the option 2.


If you want to exit the app then choose option 3.
Here we have entered into student profile
There are the options for viewing the booklist, Search for a book, go to main
menu, and close the application.
Here student can get which books are there in the library.
He can also Search for book.
He can go back to main menu.
And also close the application.

Here when we chose the option to view booklist then it takes us to Branch info.
There are again four options:
First is of computer,
Then there is Artificial intelligence, Mechanical, and Go to main menu.
Options and a choice to select any one.
After choosing computer from above list it will ask for the book name and will
show the author name and book info if the book is not available then it will not
show the name of author and it will show book not found massage Then it will
take us back to the welcome student.

It will ask the password to login to librarian account then it will take us to next
page.
After choosing the librarian option then it will take us to welcome librarian Then
it will ask for options like view booklist, search for a book, modify/add book,
issue book, go to main menu, and close application.

After choosing view booklist option, It will ask to select the branch then it will
take us to next page.
There are 4 options computer, Artificial Intelligence, Mechanical, and go to main
menu
After choosing the option in the given list you will get the lists of the books which
are present in the library.
There the user can see the Name of the book, author name, book id, and etc.

After choosing the search option then there will be two option then choose any
one of them to search by the name to search by book id
After choosing the options and after inserting the input you will get the output of
book found and the info of book and if the book is not available it will show book
not found and take you to the librarian page

After choosing issue book it will take you to this options it will show the following
options in the given figure.
After choosing to issue a book it will ask the following things to fill and then it will
shoe book issued successfully.

After choosing to view the issued books details it will show the following
information.
This option shows the students who checks the books on this system

This pages appears when we choose return book.


Other Options are used to change password and to go back to main menu and to
close the applications.
7. Skill Development:

• Presentation skill increased.

• Technical knowledge increased.

• Get more knowledge about Class, pointer, functions and etc.

• Management of time.

8. Reference:

• Google Chrome- Wikipedia.


• Suggestions given by mam.

9. Conclusion:
We understood about the concept of types of Classes pointers functions and etc. and
also we understand examples of it by team work.

Ms. Nita Pawar


(Project Guide)

You might also like