SlideShare a Scribd company logo
1 of 47
🎃COMPUTER SCIENCE PROJECT 🎃
(BASED ON C++ PROGRAMMING) (2015-16)
NAME 👽 SUMIT KUMAR PANDIT
CLASS 👽 XII SCIENCE
TOPIC 👽 LIBRARY MANAGEMENT
NEHRUINTERNATIONAL PUBLIC SCHOOL
🐉 CONTENTS 🐉
🗽 CERTIFICATE
🗽 ACKNOWLEDGEMENT
🗽 SOURCE CODE
🗽 OUTPUT
🎭CERTIFICATE 🎭
This computer project on “LIBRARY MANAGEMENT” is
certified to be a bonafide work of SUMIT KUMAR PANDIT of
class XII science in the computer laboratory during the academic
session 2015-16 under my guidance.
🎆 ACKNOWLEDGEMENT 🎆
I,here by acknowledge my deep sense of gratitude and
indebtness to Mrs. Rajni Verma whose immense help , genius
guidance , encouragement and inspiration made this work a
master art and a joint enterprise .
SOURCE CODE

 //***************************************************************
 // 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 ENTRYno";
• cout<<"nEnter The book no.";
• cin>>bno;
• cout<<"nnEnter The Name of The Book ";
• gets(bname);
• cout<<"nnEnter The Author's Name ";
• gets(aname);
• cout<<"nnnBook 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
•
• class student
• {
• char admno[6];
• char name[20];
• char stbno[6];
• int token;
•
• public:
• void create_student()
• {
• clrscr();
• cout<<"nNEW STUDENT ENTRYn";
• cout<<"nEnter The admission no.";
• cin>>admno;
• cout<<"nnEnter The Name of The Student ";
• gets(name);
• token=0;
• stbno[0]='/0';
• cout<<"nnStudent 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;
• }
•
• 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;
• fp.open("book.dat",ios::out|ios::app);
• do{
• clrscr();
• bk.create_book();
• fp.write((char*)&bk,sizeof(book));
• cout<<"nnDo 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<<"nndo you want to add more record..(y/n?)";
• cin>>ch;
• }while(ch=='y'||ch=='Y');
• fp.close();
• }
•
• void display_sps(char n[])
• {
• cout<<"nSTUDENT DETAILSn";
• 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<<"nnStudent does not exist";
• getch();
• }
•
• //***************************************************************
• // function to modify record of file
• //****************************************************************
•
• void modify_book()
• {
• char n[6];
• int found=0;
• clrscr();
• cout<<"nntMODIFY BOOK REOCORD. ";
• cout<<"nntEnter 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)
• {
• 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<<"nnt Record Updated";
• found=1;
• }
• }
• fp.close();
• if(found==0)
• cout<<"nn Record Not Found ";
• getch();
• }
•
• void modify_student()
• {
• char n[6];
• int found=0;
• clrscr();
• cout<<"nntMODIFY STUDENT RECORD ";
• cout<<"nntEnter 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<<"nnt Record Updated";
• found=1;
• }
• }
• fp.close();
• if(found==0)
• cout<<"nn Record Not Found ";
• getch();
• }
•
• //***************************************************************
• // function to delete record of file
• //****************************************************************
•
• void delete_student()
• {
• char n[6];
• int flag=0;
• clrscr();
• cout<<"nnntDELETE STUDENT";
• cout<<"nnEnter 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<<"nntRecord Deleted ..";
• else
• cout<<"nnRecord not found";
• getch();
• }
•
• void delete_book()
• {
• char n[6];
• clrscr();
• cout<<"nnntDELETE BOOK ";
• cout<<"nnEnter 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) //change later
• {
• fp2.write((char*)&bk,sizeof(book));
• }
• }
• fp2.close();
• fp.close();
• remove("book.dat");
• rename("Temp.dat","book.dat");
• cout<<"nntRecord Deleted ..";
• 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();
• exit(0);
• }
• cout<<"nnttBook LISTnn";
• cout<<"=========================================================================n";
• cout<<"Book Number"<<setw(20)<<"Book Name"<<setw(25)<<"Authorn";
• cout<<"=========================================================================n";
• while(fp.read((char*)&bk,sizeof(book)))
• {
• bk.report();
• }
• fp.close();
• getch();
• }
•
• //***************************************************************
• // function to issue book
• //****************************************************************
•
• void book_issue()
• {
• char sn[6],bn[6];
• int found=0,flag=0;
• clrscr();
• cout<<"nnBOOK ISSUE ";
• cout<<"nntEnter 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<<"nntEnter 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<<"nnt Book issued successfullynnPlease Note: Write the current date in backside of your book and submit within 15 days fine Rs. 1 for each day after 15
days period";
• }
• }
• 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<<"nnBOOK DEPOSIT ";
• cout<<"nntEnter 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;
• cout<<"nnBook deposited in no. of days";
• cin>>day;
• if(day>15)
• {
• fine=(day-15)*1;
• cout<<"nnFine has to deposited Rs. "<<fine;
• }
• st.resettoken();
• int pos=-1*sizeof(st);
• fp.seekp(pos,ios::cur);
• fp.write((char*)&st,sizeof(student));
• cout<<"nnt 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();
• cout<<"nt@@ @@ %%%%%%% ## $$$$$$ ****** @@@@ @@@@ %%%%%%%";
• cout<<"nt@@ @@ %% ## $$ ** ** @@ @@ @@ %% ";
• cout<<"nt@@ @@ @@ %%%%% ## $$ ** ** @@ @@ @@ %%%%% ";
• cout<<"nt@@ @@ @@ %% ## $$ ** ** @@ @@ %% ";
• cout<<"nt@@@@ @@@@ %%%%%%% ####### $$$$$$ ****** @@ @@ %%%%%%% ";
• cout<<"nnttt !!!!!!! !!!!! ";
• cout<<"nttt !! ! ! ";
• cout<<"nttt !! !!!!! ";
•
• cout<<"nnntt******** COMPUTER PROJECT *******";
• cout<<"nnttt LIBRARY MANAGEMENT";
• cout<<"nttt ===================";
• cout<<"nntttt MADE BY :-";
• cout<<"nnttt SUMIT PANDIT"<<"t XII science";
• cout<<" nnntt press any KEY???? to continue: ";
• getch();
•
• }
•
• //***************************************************************
• // ADMINISTRATOR MENU FUNCTION
• //****************************************************************
• void admin_menu()
• {
• clrscr();
• int ch2;
• cout<<"nnntADMINISTRATOR MENU";
• cout<<"nnt1.CREATE STUDENT RECORD";
• cout<<"nnt2.DISPLAY STUDENT RECORD ";
• cout<<"nnt3.MODIFY STUDENT RECORD";
• cout<<"nnt4.DELETE STUDENT RECORD";
• cout<<"nnt5.CREATE BOOK ";
• cout<<"nnt6.DISPLAY ALL BOOKS ";
• cout<<"nnt7.MODIFY BOOK ";
• cout<<"nnt8.DELETE BOOK ";
• cout<<"nnt9.BACK TO MAIN MENU";
• cout<<"nntPlease Enter Your Choice (1-11) ";
• ch2=getche();
• switch(ch2)
• {
• case '1': clrscr();
• write_student();break;
• case '2':
• char num[6];
• clrscr();
• cout<<"nntPlease Enter The Admission No. ";
• cin>>num;
• display_sps(num);
• break;
• case '3': modify_student();break;
• case '4': delete_student();break;
• case '5': clrscr();
• write_book();break;
• case '6': display_allb();break;
• case '7': modify_book();break;
• case '8': delete_book();break;
• case '9': return;
• default:cout<<"a";
• }
• admin_menu();
• }
•
• //***************************************************************
• // THE MAIN FUNCTION OF PROGRAM
• //****************************************************************
•
• void main()
• {
• char ch;
• intro();
• do
• {
• clrscr();
• cout<<"nnntMAIN MENU";
• cout<<"nnt01. BOOK ISSUE";
• cout<<"nnt02. BOOK DEPOSIT";
• cout<<"nnt03. ADMINISTRATOR MENU";
• cout<<"nnt04. EXIT";
• cout<<"nntPlease 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');
•
• }
• //***************************************************************
• // END OF PROJECT
• //***************************************************************
IF YOU LIKE THIS PPT. !!!!
THEN
CLICK ON
LIKE BUTTON
THANK
YOU
Sumit pandit

More Related Content

Similar to Sumit pandit

Library management system code
Library management system codeLibrary management system code
Library management system codeNaman Maheshwari
 
Computer Science investigatory project class 12
Computer Science investigatory project class 12Computer Science investigatory project class 12
Computer Science investigatory project class 12Raunak Yadav
 
c++ project on restaurant billing
c++ project on restaurant billing c++ project on restaurant billing
c++ project on restaurant billing Swakriti Rathore
 
CS Project-Source code for shopping inventory for CBSE 12th
CS Project-Source code for shopping inventory for CBSE 12thCS Project-Source code for shopping inventory for CBSE 12th
CS Project-Source code for shopping inventory for CBSE 12thSudhindra Mudhol
 
Library Management System in c++
Library Management System in c++Library Management System in c++
Library Management System in c++vikram mahendra
 
Cbse project computer science xii 2018
Cbse project computer science xii 2018Cbse project computer science xii 2018
Cbse project computer science xii 2018Kaushalesh Upadhyay
 
Mcs011 solved assignment by divya singh
Mcs011 solved assignment by divya singhMcs011 solved assignment by divya singh
Mcs011 solved assignment by divya singhDIVYA SINGH
 
c++ project
c++ projectc++ project
c++ projectTrish004
 
Power & flexibility of the Google Sheets API
Power & flexibility of the Google Sheets APIPower & flexibility of the Google Sheets API
Power & flexibility of the Google Sheets APIwesley chun
 
Friend this-new&delete
Friend this-new&deleteFriend this-new&delete
Friend this-new&deleteShehzad Rizwan
 
LJC Conference 2014 Cassandra for Java Developers
LJC Conference 2014 Cassandra for Java DevelopersLJC Conference 2014 Cassandra for Java Developers
LJC Conference 2014 Cassandra for Java DevelopersChristopher Batey
 
Schema design with MongoDB (Dwight Merriman)
Schema design with MongoDB (Dwight Merriman)Schema design with MongoDB (Dwight Merriman)
Schema design with MongoDB (Dwight Merriman)MongoSF
 
JSLT: JSON querying and transformation
JSLT: JSON querying and transformationJSLT: JSON querying and transformation
JSLT: JSON querying and transformationLars Marius Garshol
 
C# 6 and 7 and Futures 20180607
C# 6 and 7 and Futures 20180607C# 6 and 7 and Futures 20180607
C# 6 and 7 and Futures 20180607Kevin Hazzard
 
development, ruby, conferences, frameworks, ruby on rails, confreaks, actsasc...
development, ruby, conferences, frameworks, ruby on rails, confreaks, actsasc...development, ruby, conferences, frameworks, ruby on rails, confreaks, actsasc...
development, ruby, conferences, frameworks, ruby on rails, confreaks, actsasc...ActsAsCon
 

Similar to Sumit pandit (20)

Library management system code
Library management system codeLibrary management system code
Library management system code
 
Computer Science investigatory project class 12
Computer Science investigatory project class 12Computer Science investigatory project class 12
Computer Science investigatory project class 12
 
c++ project on restaurant billing
c++ project on restaurant billing c++ project on restaurant billing
c++ project on restaurant billing
 
programming fundamentals
programming fundamentalsprogramming fundamentals
programming fundamentals
 
CS Project-Source code for shopping inventory for CBSE 12th
CS Project-Source code for shopping inventory for CBSE 12thCS Project-Source code for shopping inventory for CBSE 12th
CS Project-Source code for shopping inventory for CBSE 12th
 
Library Management System in c++
Library Management System in c++Library Management System in c++
Library Management System in c++
 
BOOK SHOP SYSTEM C++
BOOK SHOP SYSTEM C++BOOK SHOP SYSTEM C++
BOOK SHOP SYSTEM C++
 
Cbse project computer science xii 2018
Cbse project computer science xii 2018Cbse project computer science xii 2018
Cbse project computer science xii 2018
 
Mcs011 solved assignment by divya singh
Mcs011 solved assignment by divya singhMcs011 solved assignment by divya singh
Mcs011 solved assignment by divya singh
 
Czzawk
CzzawkCzzawk
Czzawk
 
Lec 2.pptx
Lec 2.pptxLec 2.pptx
Lec 2.pptx
 
c++ project
c++ projectc++ project
c++ project
 
Intro to C++
Intro to C++Intro to C++
Intro to C++
 
Power & flexibility of the Google Sheets API
Power & flexibility of the Google Sheets APIPower & flexibility of the Google Sheets API
Power & flexibility of the Google Sheets API
 
Friend this-new&delete
Friend this-new&deleteFriend this-new&delete
Friend this-new&delete
 
LJC Conference 2014 Cassandra for Java Developers
LJC Conference 2014 Cassandra for Java DevelopersLJC Conference 2014 Cassandra for Java Developers
LJC Conference 2014 Cassandra for Java Developers
 
Schema design with MongoDB (Dwight Merriman)
Schema design with MongoDB (Dwight Merriman)Schema design with MongoDB (Dwight Merriman)
Schema design with MongoDB (Dwight Merriman)
 
JSLT: JSON querying and transformation
JSLT: JSON querying and transformationJSLT: JSON querying and transformation
JSLT: JSON querying and transformation
 
C# 6 and 7 and Futures 20180607
C# 6 and 7 and Futures 20180607C# 6 and 7 and Futures 20180607
C# 6 and 7 and Futures 20180607
 
development, ruby, conferences, frameworks, ruby on rails, confreaks, actsasc...
development, ruby, conferences, frameworks, ruby on rails, confreaks, actsasc...development, ruby, conferences, frameworks, ruby on rails, confreaks, actsasc...
development, ruby, conferences, frameworks, ruby on rails, confreaks, actsasc...
 

Recently uploaded

Issues in the Philippines (Unemployment and Underemployment).pptx
Issues in the Philippines (Unemployment and Underemployment).pptxIssues in the Philippines (Unemployment and Underemployment).pptx
Issues in the Philippines (Unemployment and Underemployment).pptxJenniferPeraro1
 
do's and don'ts in Telephone Interview of Job
do's and don'ts in Telephone Interview of Jobdo's and don'ts in Telephone Interview of Job
do's and don'ts in Telephone Interview of JobRemote DBA Services
 
Ch. 9- __Skin, hair and nail Assessment (1).pdf
Ch. 9- __Skin, hair and nail Assessment (1).pdfCh. 9- __Skin, hair and nail Assessment (1).pdf
Ch. 9- __Skin, hair and nail Assessment (1).pdfJamalYaseenJameelOde
 
Gray Gold Clean CV Resume2024tod (1).pdf
Gray Gold Clean CV Resume2024tod (1).pdfGray Gold Clean CV Resume2024tod (1).pdf
Gray Gold Clean CV Resume2024tod (1).pdfpadillaangelina0023
 
Final Completion Certificate of Marketing Management Internship
Final Completion Certificate of Marketing Management InternshipFinal Completion Certificate of Marketing Management Internship
Final Completion Certificate of Marketing Management InternshipSoham Mondal
 
Storytelling, Ethics and Workflow in Documentary Photography
Storytelling, Ethics and Workflow in Documentary PhotographyStorytelling, Ethics and Workflow in Documentary Photography
Storytelling, Ethics and Workflow in Documentary PhotographyOrtega Alikwe
 
8377877756 Full Enjoy @24/7 Call Girls in Pitampura Delhi NCR
8377877756 Full Enjoy @24/7 Call Girls in Pitampura Delhi NCR8377877756 Full Enjoy @24/7 Call Girls in Pitampura Delhi NCR
8377877756 Full Enjoy @24/7 Call Girls in Pitampura Delhi NCRdollysharma2066
 
Ethics of Animal Research Laika mission.ppt
Ethics of Animal Research Laika mission.pptEthics of Animal Research Laika mission.ppt
Ethics of Animal Research Laika mission.pptShafqatShakeel1
 
办澳洲詹姆斯库克大学毕业证成绩单pdf电子版制作修改
办澳洲詹姆斯库克大学毕业证成绩单pdf电子版制作修改办澳洲詹姆斯库克大学毕业证成绩单pdf电子版制作修改
办澳洲詹姆斯库克大学毕业证成绩单pdf电子版制作修改yuu sss
 
Escort Service Andheri WhatsApp:+91-9833363713
Escort Service Andheri WhatsApp:+91-9833363713Escort Service Andheri WhatsApp:+91-9833363713
Escort Service Andheri WhatsApp:+91-9833363713Riya Pathan
 
定制(NYIT毕业证书)美国纽约理工学院毕业证成绩单原版一比一
定制(NYIT毕业证书)美国纽约理工学院毕业证成绩单原版一比一定制(NYIT毕业证书)美国纽约理工学院毕业证成绩单原版一比一
定制(NYIT毕业证书)美国纽约理工学院毕业证成绩单原版一比一2s3dgmej
 
办理老道明大学毕业证成绩单|购买美国ODU文凭证书
办理老道明大学毕业证成绩单|购买美国ODU文凭证书办理老道明大学毕业证成绩单|购买美国ODU文凭证书
办理老道明大学毕业证成绩单|购买美国ODU文凭证书saphesg8
 
MIdterm Review International Trade.pptx review
MIdterm Review International Trade.pptx reviewMIdterm Review International Trade.pptx review
MIdterm Review International Trade.pptx reviewSheldon Byron
 
定制(Waikato毕业证书)新西兰怀卡托大学毕业证成绩单原版一比一
定制(Waikato毕业证书)新西兰怀卡托大学毕业证成绩单原版一比一定制(Waikato毕业证书)新西兰怀卡托大学毕业证成绩单原版一比一
定制(Waikato毕业证书)新西兰怀卡托大学毕业证成绩单原版一比一Fs
 
tools in IDTelated to first year vtu students is useful where they can refer ...
tools in IDTelated to first year vtu students is useful where they can refer ...tools in IDTelated to first year vtu students is useful where they can refer ...
tools in IDTelated to first year vtu students is useful where they can refer ...vinbld123
 
定制(UQ毕业证书)澳洲昆士兰大学毕业证成绩单原版一比一
定制(UQ毕业证书)澳洲昆士兰大学毕业证成绩单原版一比一定制(UQ毕业证书)澳洲昆士兰大学毕业证成绩单原版一比一
定制(UQ毕业证书)澳洲昆士兰大学毕业证成绩单原版一比一lvtagr7
 
Escorts Service Near Surya International Hotel, New Delhi |9873777170| Find H...
Escorts Service Near Surya International Hotel, New Delhi |9873777170| Find H...Escorts Service Near Surya International Hotel, New Delhi |9873777170| Find H...
Escorts Service Near Surya International Hotel, New Delhi |9873777170| Find H...nitagrag2
 
定制(ECU毕业证书)埃迪斯科文大学毕业证毕业证成绩单原版一比一
定制(ECU毕业证书)埃迪斯科文大学毕业证毕业证成绩单原版一比一定制(ECU毕业证书)埃迪斯科文大学毕业证毕业证成绩单原版一比一
定制(ECU毕业证书)埃迪斯科文大学毕业证毕业证成绩单原版一比一fjjwgk
 
办理(NUS毕业证书)新加坡国立大学毕业证成绩单原版一比一
办理(NUS毕业证书)新加坡国立大学毕业证成绩单原版一比一办理(NUS毕业证书)新加坡国立大学毕业证成绩单原版一比一
办理(NUS毕业证书)新加坡国立大学毕业证成绩单原版一比一F La
 
如何办理(UCI毕业证)加州大学欧文分校毕业证毕业证成绩单原版一比一
如何办理(UCI毕业证)加州大学欧文分校毕业证毕业证成绩单原版一比一如何办理(UCI毕业证)加州大学欧文分校毕业证毕业证成绩单原版一比一
如何办理(UCI毕业证)加州大学欧文分校毕业证毕业证成绩单原版一比一ypfy7p5ld
 

Recently uploaded (20)

Issues in the Philippines (Unemployment and Underemployment).pptx
Issues in the Philippines (Unemployment and Underemployment).pptxIssues in the Philippines (Unemployment and Underemployment).pptx
Issues in the Philippines (Unemployment and Underemployment).pptx
 
do's and don'ts in Telephone Interview of Job
do's and don'ts in Telephone Interview of Jobdo's and don'ts in Telephone Interview of Job
do's and don'ts in Telephone Interview of Job
 
Ch. 9- __Skin, hair and nail Assessment (1).pdf
Ch. 9- __Skin, hair and nail Assessment (1).pdfCh. 9- __Skin, hair and nail Assessment (1).pdf
Ch. 9- __Skin, hair and nail Assessment (1).pdf
 
Gray Gold Clean CV Resume2024tod (1).pdf
Gray Gold Clean CV Resume2024tod (1).pdfGray Gold Clean CV Resume2024tod (1).pdf
Gray Gold Clean CV Resume2024tod (1).pdf
 
Final Completion Certificate of Marketing Management Internship
Final Completion Certificate of Marketing Management InternshipFinal Completion Certificate of Marketing Management Internship
Final Completion Certificate of Marketing Management Internship
 
Storytelling, Ethics and Workflow in Documentary Photography
Storytelling, Ethics and Workflow in Documentary PhotographyStorytelling, Ethics and Workflow in Documentary Photography
Storytelling, Ethics and Workflow in Documentary Photography
 
8377877756 Full Enjoy @24/7 Call Girls in Pitampura Delhi NCR
8377877756 Full Enjoy @24/7 Call Girls in Pitampura Delhi NCR8377877756 Full Enjoy @24/7 Call Girls in Pitampura Delhi NCR
8377877756 Full Enjoy @24/7 Call Girls in Pitampura Delhi NCR
 
Ethics of Animal Research Laika mission.ppt
Ethics of Animal Research Laika mission.pptEthics of Animal Research Laika mission.ppt
Ethics of Animal Research Laika mission.ppt
 
办澳洲詹姆斯库克大学毕业证成绩单pdf电子版制作修改
办澳洲詹姆斯库克大学毕业证成绩单pdf电子版制作修改办澳洲詹姆斯库克大学毕业证成绩单pdf电子版制作修改
办澳洲詹姆斯库克大学毕业证成绩单pdf电子版制作修改
 
Escort Service Andheri WhatsApp:+91-9833363713
Escort Service Andheri WhatsApp:+91-9833363713Escort Service Andheri WhatsApp:+91-9833363713
Escort Service Andheri WhatsApp:+91-9833363713
 
定制(NYIT毕业证书)美国纽约理工学院毕业证成绩单原版一比一
定制(NYIT毕业证书)美国纽约理工学院毕业证成绩单原版一比一定制(NYIT毕业证书)美国纽约理工学院毕业证成绩单原版一比一
定制(NYIT毕业证书)美国纽约理工学院毕业证成绩单原版一比一
 
办理老道明大学毕业证成绩单|购买美国ODU文凭证书
办理老道明大学毕业证成绩单|购买美国ODU文凭证书办理老道明大学毕业证成绩单|购买美国ODU文凭证书
办理老道明大学毕业证成绩单|购买美国ODU文凭证书
 
MIdterm Review International Trade.pptx review
MIdterm Review International Trade.pptx reviewMIdterm Review International Trade.pptx review
MIdterm Review International Trade.pptx review
 
定制(Waikato毕业证书)新西兰怀卡托大学毕业证成绩单原版一比一
定制(Waikato毕业证书)新西兰怀卡托大学毕业证成绩单原版一比一定制(Waikato毕业证书)新西兰怀卡托大学毕业证成绩单原版一比一
定制(Waikato毕业证书)新西兰怀卡托大学毕业证成绩单原版一比一
 
tools in IDTelated to first year vtu students is useful where they can refer ...
tools in IDTelated to first year vtu students is useful where they can refer ...tools in IDTelated to first year vtu students is useful where they can refer ...
tools in IDTelated to first year vtu students is useful where they can refer ...
 
定制(UQ毕业证书)澳洲昆士兰大学毕业证成绩单原版一比一
定制(UQ毕业证书)澳洲昆士兰大学毕业证成绩单原版一比一定制(UQ毕业证书)澳洲昆士兰大学毕业证成绩单原版一比一
定制(UQ毕业证书)澳洲昆士兰大学毕业证成绩单原版一比一
 
Escorts Service Near Surya International Hotel, New Delhi |9873777170| Find H...
Escorts Service Near Surya International Hotel, New Delhi |9873777170| Find H...Escorts Service Near Surya International Hotel, New Delhi |9873777170| Find H...
Escorts Service Near Surya International Hotel, New Delhi |9873777170| Find H...
 
定制(ECU毕业证书)埃迪斯科文大学毕业证毕业证成绩单原版一比一
定制(ECU毕业证书)埃迪斯科文大学毕业证毕业证成绩单原版一比一定制(ECU毕业证书)埃迪斯科文大学毕业证毕业证成绩单原版一比一
定制(ECU毕业证书)埃迪斯科文大学毕业证毕业证成绩单原版一比一
 
办理(NUS毕业证书)新加坡国立大学毕业证成绩单原版一比一
办理(NUS毕业证书)新加坡国立大学毕业证成绩单原版一比一办理(NUS毕业证书)新加坡国立大学毕业证成绩单原版一比一
办理(NUS毕业证书)新加坡国立大学毕业证成绩单原版一比一
 
如何办理(UCI毕业证)加州大学欧文分校毕业证毕业证成绩单原版一比一
如何办理(UCI毕业证)加州大学欧文分校毕业证毕业证成绩单原版一比一如何办理(UCI毕业证)加州大学欧文分校毕业证毕业证成绩单原版一比一
如何办理(UCI毕业证)加州大学欧文分校毕业证毕业证成绩单原版一比一
 

Sumit pandit

  • 1. 🎃COMPUTER SCIENCE PROJECT 🎃 (BASED ON C++ PROGRAMMING) (2015-16) NAME 👽 SUMIT KUMAR PANDIT CLASS 👽 XII SCIENCE TOPIC 👽 LIBRARY MANAGEMENT NEHRUINTERNATIONAL PUBLIC SCHOOL
  • 2. 🐉 CONTENTS 🐉 🗽 CERTIFICATE 🗽 ACKNOWLEDGEMENT 🗽 SOURCE CODE 🗽 OUTPUT
  • 3. 🎭CERTIFICATE 🎭 This computer project on “LIBRARY MANAGEMENT” is certified to be a bonafide work of SUMIT KUMAR PANDIT of class XII science in the computer laboratory during the academic session 2015-16 under my guidance.
  • 4. 🎆 ACKNOWLEDGEMENT 🎆 I,here by acknowledge my deep sense of gratitude and indebtness to Mrs. Rajni Verma whose immense help , genius guidance , encouragement and inspiration made this work a master art and a joint enterprise .
  • 5. SOURCE CODE   //***************************************************************  // 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  //****************************************************************
  • 6. • • class book • { • char bno[6]; • char bname[50]; • char aname[20]; • public: • void create_book() • { • cout<<"nNEW BOOK ENTRYno"; • cout<<"nEnter The book no."; • cin>>bno; • cout<<"nnEnter The Name of The Book "; • gets(bname); • cout<<"nnEnter The Author's Name "; • gets(aname); • cout<<"nnnBook Created.."; • } • • void show_book() • { • cout<<"nBook no. : "<<bno;
  • 7. • 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;}
  • 8. • }; //class ends here • • class student • { • char admno[6]; • char name[20]; • char stbno[6]; • int token; • • public: • void create_student() • { • clrscr(); • cout<<"nNEW STUDENT ENTRYn"; • cout<<"nEnter The admission no."; • cin>>admno; • cout<<"nnEnter The Name of The Student "; • gets(name); • token=0; • stbno[0]='/0'; • cout<<"nnStudent Record Created.."; • }
  • 9. • • 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;
  • 10. • } • • 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;}
  • 11. • • }; //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; • fp.open("book.dat",ios::out|ios::app); • do{ • clrscr(); • bk.create_book();
  • 12. • fp.write((char*)&bk,sizeof(book)); • cout<<"nnDo 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<<"nndo you want to add more record..(y/n?)"; • cin>>ch; • }while(ch=='y'||ch=='Y'); • fp.close(); • } • • void display_sps(char n[]) • {
  • 13. • cout<<"nSTUDENT DETAILSn"; • 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<<"nnStudent does not exist"; • getch(); • } • • //*************************************************************** • // function to modify record of file • //**************************************************************** • • void modify_book()
  • 14. • { • char n[6]; • int found=0; • clrscr(); • cout<<"nntMODIFY BOOK REOCORD. "; • cout<<"nntEnter 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) • { • 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<<"nnt Record Updated"; • found=1; • } • }
  • 15. • fp.close(); • if(found==0) • cout<<"nn Record Not Found "; • getch(); • } • • void modify_student() • { • char n[6]; • int found=0; • clrscr(); • cout<<"nntMODIFY STUDENT RECORD "; • cout<<"nntEnter 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();
  • 16. • int pos=-1*sizeof(st); • fp.seekp(pos,ios::cur); • fp.write((char*)&st,sizeof(student)); • cout<<"nnt Record Updated"; • found=1; • } • } • fp.close(); • if(found==0) • cout<<"nn Record Not Found "; • getch(); • } • • //*************************************************************** • // function to delete record of file • //**************************************************************** • • void delete_student() • { • char n[6]; • int flag=0; • clrscr();
  • 17. • cout<<"nnntDELETE STUDENT"; • cout<<"nnEnter 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<<"nntRecord Deleted .."; • else • cout<<"nnRecord not found";
  • 18. • getch(); • } • • void delete_book() • { • char n[6]; • clrscr(); • cout<<"nnntDELETE BOOK "; • cout<<"nnEnter 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) //change later • { • fp2.write((char*)&bk,sizeof(book)); • }
  • 19. • } • fp2.close(); • fp.close(); • remove("book.dat"); • rename("Temp.dat","book.dat"); • cout<<"nntRecord Deleted .."; • 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();
  • 20. • exit(0); • } • cout<<"nnttBook LISTnn"; • cout<<"=========================================================================n"; • cout<<"Book Number"<<setw(20)<<"Book Name"<<setw(25)<<"Authorn"; • cout<<"=========================================================================n"; • while(fp.read((char*)&bk,sizeof(book))) • { • bk.report(); • } • fp.close(); • getch(); • } • • //*************************************************************** • // function to issue book • //**************************************************************** • • void book_issue() • {
  • 21. • char sn[6],bn[6]; • int found=0,flag=0; • clrscr(); • cout<<"nnBOOK ISSUE "; • cout<<"nntEnter 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<<"nntEnter the book no. "; • cin>>bn; • while(fp1.read((char*)&bk,sizeof(book))&& flag==0) • {
  • 22. • 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<<"nnt Book issued successfullynnPlease Note: Write the current date in backside of your book and submit within 15 days fine Rs. 1 for each day after 15 days period"; • } • } • 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();
  • 23. • 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<<"nnBOOK DEPOSIT "; • cout<<"nntEnter 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;
  • 24. • 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; • cout<<"nnBook deposited in no. of days"; • cin>>day; • if(day>15) • { • fine=(day-15)*1; • cout<<"nnFine has to deposited Rs. "<<fine; • } • st.resettoken(); • int pos=-1*sizeof(st); • fp.seekp(pos,ios::cur); • fp.write((char*)&st,sizeof(student)); • cout<<"nnt Book deposited successfully"; • } • } • if(flag==0)
  • 25. • 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(); • cout<<"nt@@ @@ %%%%%%% ## $$$$$$ ****** @@@@ @@@@ %%%%%%%"; • cout<<"nt@@ @@ %% ## $$ ** ** @@ @@ @@ %% "; • cout<<"nt@@ @@ @@ %%%%% ## $$ ** ** @@ @@ @@ %%%%% ";
  • 26. • cout<<"nt@@ @@ @@ %% ## $$ ** ** @@ @@ %% "; • cout<<"nt@@@@ @@@@ %%%%%%% ####### $$$$$$ ****** @@ @@ %%%%%%% "; • cout<<"nnttt !!!!!!! !!!!! "; • cout<<"nttt !! ! ! "; • cout<<"nttt !! !!!!! "; • • cout<<"nnntt******** COMPUTER PROJECT *******"; • cout<<"nnttt LIBRARY MANAGEMENT"; • cout<<"nttt ==================="; • cout<<"nntttt MADE BY :-"; • cout<<"nnttt SUMIT PANDIT"<<"t XII science"; • cout<<" nnntt press any KEY???? to continue: "; • getch(); • • } • • //*************************************************************** • // ADMINISTRATOR MENU FUNCTION • //**************************************************************** • void admin_menu() • {
  • 27. • clrscr(); • int ch2; • cout<<"nnntADMINISTRATOR MENU"; • cout<<"nnt1.CREATE STUDENT RECORD"; • cout<<"nnt2.DISPLAY STUDENT RECORD "; • cout<<"nnt3.MODIFY STUDENT RECORD"; • cout<<"nnt4.DELETE STUDENT RECORD"; • cout<<"nnt5.CREATE BOOK "; • cout<<"nnt6.DISPLAY ALL BOOKS "; • cout<<"nnt7.MODIFY BOOK "; • cout<<"nnt8.DELETE BOOK "; • cout<<"nnt9.BACK TO MAIN MENU"; • cout<<"nntPlease Enter Your Choice (1-11) "; • ch2=getche(); • switch(ch2) • { • case '1': clrscr(); • write_student();break; • case '2': • char num[6]; • clrscr(); • cout<<"nntPlease Enter The Admission No. ";
  • 28. • cin>>num; • display_sps(num); • break; • case '3': modify_student();break; • case '4': delete_student();break; • case '5': clrscr(); • write_book();break; • case '6': display_allb();break; • case '7': modify_book();break; • case '8': delete_book();break; • case '9': return; • default:cout<<"a"; • } • admin_menu(); • } • • //*************************************************************** • // THE MAIN FUNCTION OF PROGRAM • //**************************************************************** • • void main() • {
  • 29. • char ch; • intro(); • do • { • clrscr(); • cout<<"nnntMAIN MENU"; • cout<<"nnt01. BOOK ISSUE"; • cout<<"nnt02. BOOK DEPOSIT"; • cout<<"nnt03. ADMINISTRATOR MENU"; • cout<<"nnt04. EXIT"; • cout<<"nntPlease 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;
  • 30. • case '4':exit(0); • default :cout<<"a"; • } • }while(ch!='4'); • • } • //*************************************************************** • // END OF PROJECT • //***************************************************************
  • 31.
  • 32.
  • 33.
  • 34.
  • 35.
  • 36.
  • 37.
  • 38.
  • 39.
  • 40.
  • 41.
  • 42.
  • 43.
  • 44.
  • 45. IF YOU LIKE THIS PPT. !!!! THEN CLICK ON LIKE BUTTON