computer project.docx
TRANSCRIPT
-
7/25/2019 COMPUTER PROJECT.docx
1/32
COMPUTER
PROJECTLibrary
Management
System
Submitted To: Mrs anila
Done by : Vishaal udandarao
ii a
Roll no! ""
-
7/25/2019 COMPUTER PROJECT.docx
2/32
-
7/25/2019 COMPUTER PROJECT.docx
3/32
#$DE:
Sr No Topic1. Acknowledgement
s
2. Introduction3. About C++4. Sstem
!e"uirements#. Source Code
$. S%mple &utput'. (ibliogr%p)
-
7/25/2019 COMPUTER PROJECT.docx
4/32
%C&$O'LED(EME$TS:
I thank my ComputerScience teacher Mrs. Anila
Balagopal for guidance and
support. I also thank my
Principal Mr. D.N. Rao I
ould also like to thank my
parents and my !rother for
encouraging me during the
course of this pro"ect.
#inally I ould like to thankCBS$ for gi%ing me this
opportunity to undertake
this pro"ect.
-
7/25/2019 COMPUTER PROJECT.docx
5/32
#$TRODUCT#O$:
*T)e proect is designed ,or b%nking inC++.T)e title o, t)e proect is -ibr%r
%n%gement Sstem.In t)is proect %
user c%n do t)e b%sic t)ings done in %
libr%r.
*Administr%tor o, t)e proect c%n enter
new student record/displ% %ll0speci,ic
student record/)e0s)e c%n modi, %nd
delete student record.Administr%tor
c%nenter new book record/displ% %llbook det%ils/modi, book det%ils %nddelete % book.
-
7/25/2019 COMPUTER PROJECT.docx
6/32
%)OUT C**:
C++ is % gener%lpurpose progr%mming l%ngu%ge. It
)%s imper%tie/ obectoriented
%nd genericprogr%mming ,e%tures/
w)ile %lso proiding ,%cilities ,or low
leel memor m%nipul%tion.
C++ is st%nd%rdied b
t)e Intern%tion%l &rg%ni%tion ,or
St%nd%rdi%tion IS&5/ wit) t)e l%test
%nd current5 st%nd%rd ersion r%ti,ied%nd publis)ed b IS& in 6ecember
2714 %s ISO/IEc
14882:2014in,orm%ll known %s C+
+145. T)e C++ progr%mming l%ngu%ge
w%s initi%ll st%nd%rdied in 1889%s ISO/IEC 14882:1998/ w)ic) w%s
t)en %mended b t)e C++73/ ISO/IEC
14882:2003/ st%nd%rd.
-
7/25/2019 COMPUTER PROJECT.docx
7/32
T)e current C++14 st%nd%rdsupersedes t)ese %nd C++11/
wit) new ,e%tures %nd %nenl%rged st%nd%rd libr%r. (e,ore t)einiti%l st%nd%rdi%tion in 1889/ C++w%s deeloped b (%rneStroustrup %t (ell -%bs since 18'8/ %s
%n etension o, t)e C l%ngu%ge %s )ew%nted %n e,,icient %nd ,leiblel%ngu%ge simil%r to C/ w)ic) %lsoproided )ig)leel ,e%tures ,orprogr%m org%ni%tion.
%n ot)er progr%mming l%ngu%ges)%e been in,luenced b C++/including C;/
-
7/25/2019 COMPUTER PROJECT.docx
8/32
S+STEM
RE,U#REME$TS: &ARD'AR$ R$()IR$D*
Printer+ to print the
re,uired documents of thepro"ect Compact Dri%e
Processor * Intel Core I-
Ram * / MB
&arddisk * -00 1!.
S2#3'AR$ R$()IR$D*
2perating system *'indos 4.5 3ur!o C66+ for e7ecution
of program andMs ord+ for presenation of
output.
-
7/25/2019 COMPUTER PROJECT.docx
9/32
-
7/25/2019 COMPUTER PROJECT.docx
10/32
SOURCE CODE:
//***************************************************************// HEADER FILE USED IN PROJECT//****************************************************************
;include=,stre%m.)>;include=conio.)>;include=stdio.)>;include=process.)>;include=string.)>;include=iom%nip.)>
//***************************************************************
// CLASS USED IN PROJECT//****************************************************************
cl%ss book?
c)%r bno@$B
c)%r bn%me@#7Bc)%r %n%me@27B
public:oid cre%tebook5?
cout==DEnNFG (&&H FNT!...EnDBcout==DEnFnter T)e book no.DBcin>>bnoB
cout==DEnEnFnter T)e N%me o, T)e (ook DBgetsbn%me5B
-
7/25/2019 COMPUTER PROJECT.docx
11/32
cout==DEnEnFnter T)e Aut)orJs N%me DBgets%n%me5Bcout==DEnEnEn(ook Cre%ted..DB
K
oid s)owbook5?
cout==DEn(ook no. : D==bnoBcout==DEn(ook N%me : DBputsbn%me5Bcout==DAut)or N%me : DBputs%n%me5B
K
oid modi,book5?
cout==DEn(ook no. : D==bnoBcout==DEnodi, (ook N%me : DBgetsbn%me5Bcout==DEnodi, Aut)orJs N%me o, (ook : DB
gets%n%me5BK
c)%rL retbno5?
return bnoBK
oid report5
?cout==bno==setw375==bn%me==setw375==%n%me==endlBK
KB //class !"s #$
-
7/25/2019 COMPUTER PROJECT.docx
12/32
cl%ss student?
c)%r %dmno@$Bc)%r n%me@27Bc)%r stbno@$Bint tokenB
public:oid cre%testudent5?
clrscr5B cout==DEnNFG STM6FNT FNT!...EnDB
cout==DEnFnter T)e %dmission no. DB
cin>>%dmnoBcout==DEnEnFnter T)e N%me o, T)e Student DBgetsn%me5Btoken7Bstbno@7J07JBcout==DEnEnStudent !ecord Cre%ted..DB
K
oid s)owstudent5?
cout==DEnAdmission no. : D==%dmnoBcout==DEnStudent N%me : DBputsn%me5Bcout==DEnNo o, (ook issued : D==tokenBi,token15
cout==DEn(ook No D==stbnoB
K
oid modi,student5?
cout==DEnAdmission no. : D==%dmnoBcout==DEnodi, Student N%me : DBgetsn%me5B
K
-
7/25/2019 COMPUTER PROJECT.docx
13/32
c)%rL ret%dmno5?
return %dmnoBK
c)%rL retstbno5?
return stbnoBK
int rettoken5?
return tokenBK
oid %ddtoken5?token1BK
oid resettoken5?token7BK
oid getstbnoc)%r t@5?
strcpstbno/t5BK
oid report5
?cout==DEtD==%dmno==setw275==n%me==setw175==token==endlBK
KB //class !"s #$
//***************************************************************// %l&'al "cla$a()&! &$ s($a+ &',c(- &',c(
-
7/25/2019 COMPUTER PROJECT.docx
14/32
//****************************************************************
,stre%m ,p/,p1Bbook bkBstudent stB
//***************************************************************// .!c()&! (& $)( )! )l//****************************************************************
oid writebook5
?c)%r c)B,p.openDbook.d%tD/ios::outOios::%pp5Bdo?
clrscr5Bbk.cre%tebook5B,p.writec)%rL5Pbk/sieo,book55B
cout==DEnEn6o ou w%nt to %dd more record..0nQ5DB
cin>>c)BKw)ilec)JJOOc)JJ5B,p.close5B
K
oid writestudent5
?c)%r c)B,p.openDstudent.d%tD/ios::outOios::%pp5Bdo?
st.cre%testudent5B,p.writec)%rL5Pst/sieo,student55Bcout==DEnEndo ou w%nt to %dd more record..
0nQ5DB
-
7/25/2019 COMPUTER PROJECT.docx
15/32
cin>>c)BKw)ilec)JJOOc)JJ5B,p.close5B
K
//***************************************************************// .!c()&! (& $a" sc))c $c&$" $&+ )l//****************************************************************
oid displ%spbc)%r n@5
?cout==DEn(&&H 6FTAI-SEnDBint ,l%g7B,p.openDbook.d%tD/ios::in5Bw)ile,p.re%dc)%rL5Pbk/sieo,book555?
i,strcmpibk.retbno5/n575?
bk.s)owbook5B ,l%g1BK
K
,p.close5Bi,,l%g75
cout==DEnEn(ook does not eistDB
getc)5BK
oid displ%spsc)%r n@5?
cout==DEnSTM6FNT 6FTAI-SEnDBint ,l%g7B,p.openDstudent.d%tD/ios::in5B
w)ile,p.re%dc)%rL5Pst/sieo,student555?
-
7/25/2019 COMPUTER PROJECT.docx
16/32
i,strcmpist.ret%dmno5/n5755?
st.s)owstudent5B,l%g1B
KK
,p.close5Bi,,l%g75
cout==DEnEnStudent does not eistDB getc)5BK
//***************************************************************// .!c()&! (& +&") $c&$" & )l//****************************************************************
oid modi,book5
?c)%r n@$Bint ,ound7Bclrscr5Bcout==DEnEnEt&6IR (&&H !F&C&!6.... DBcout==DEnEnEtFnter T)e book no. o, T)e bookDBcin>>nB,p.openDbook.d%tD/ios::inOios::out5B
w)ile,p.re%dc)%rL5Pbk/sieo,book55 PP ,ound75?
i,strcmpibk.retbno5/n575?
bk.s)owbook5Bcout==DEnFnter T)e New 6et%ils o,
bookD==endlBbk.modi,book5B
int pos1Lsieo,bk5B ,p.seekppos/ios::cur5B
-
7/25/2019 COMPUTER PROJECT.docx
17/32
,p.writec)%rL5Pbk/sieo,book55B cout==DEnEnEt !ecord Mpd%tedDB ,ound1BK
K
,p.close5B i,,ound75 cout==DEnEn !ecord Not Round DB getc)5BK
oid modi,student5?
c)%r n@$Bint ,ound7Bclrscr5Bcout==DEnEnEt&6IR STM6FNT !FC&!6... DBcout==DEnEnEtFnter T)e %dmission no. o, T)e studentDB
cin>>nB,p.openDstudent.d%tD/ios::inOios::out5Bw)ile,p.re%dc)%rL5Pst/sieo,student55 PP ,ound75?
i,strcmpist.ret%dmno5/n575?
st.s)owstudent5Bcout==DEnFnter T)e New 6et%ils o,
studentD==endlBst.modi,student5Bint pos1Lsieo,st5B,p.seekppos/ios::cur5B,p.writec)%rL5Pst/sieo,student55Bcout==DEnEnEt !ecord Mpd%tedDB,ound1B
K
K
-
7/25/2019 COMPUTER PROJECT.docx
18/32
,p.close5Bi,,ound75
cout==DEnEn !ecord Not Round DBgetc)5B
K
//***************************************************************// .!c()&! (& "l( $c&$" & )l//****************************************************************
oid deletestudent5
?c)%r n@$Bint ,l%g7Bclrscr5B
cout==DEnEnEnEt6F-FTF STM6FNT...DB cout==DEnEnFnter T)e %dmission no. o, t)e Student ouG%nt To 6elete : DB cin>>nB
,p.openDstudent.d%tD/ios::inOios::out5B ,stre%m ,p2B ,p2.openDTemp.d%tD/ios::out5B ,p.seekg7/ios::beg5B w)ile,p.re%dc)%rL5Pst/sieo,student555
?i,strcmpist.ret%dmno5/n575
,p2.writec)%rL5Pst/sieo,student55B
else ,l%g1BK
,p2.close5B
,p.close5B remoeDstudent.d%tD5B ren%meDTemp.d%tD/Dstudent.d%tD5B
i,,l%g15 cout==DEnEnEt!ecord 6eleted ..DB
-
7/25/2019 COMPUTER PROJECT.docx
19/32
else cout==DEnEn!ecord not ,oundDB getc)5BK
oid deletebook5?
c)%r n@$Bclrscr5Bcout==DEnEnEnEt6F-FTF (&&H ...DBcout==DEnEnFnter T)e (ook no. o, t)e (ook ou G%nt To
6elete : DBcin>>nB,p.openDbook.d%tD/ios::inOios::out5B,stre%m ,p2B,p2.openDTemp.d%tD/ios::out5B,p.seekg7/ios::beg5Bw)ile,p.re%dc)%rL5Pbk/sieo,book555?
i,strcmpibk.retbno5/n575?
,p2.writec)%rL5Pbk/sieo,book55BK
K
,p2.close5B ,p.close5B
remoeDbook.d%tD5B ren%meDTemp.d%tD/Dbook.d%tD5B cout==DEnEnEt!ecord 6eleted ..DB getc)5BK
//***************************************************************// .!c()&! (& ")sla all s(."!(s l)s(
-
7/25/2019 COMPUTER PROJECT.docx
20/32
//****************************************************************
oid displ%%lls5?
clrscr5B ,p.openDstudent.d%tD/ios::in5B i,,p5 ? cout==DF!!&! RI-F C&M-6 N&T (F &FN DB getc)5B returnB K
cout==DEnEnEtEtSTM6FNT -ISTEnEnDB
cout==DEnDB
cout==DEtAdmissionNo.D==setw175==DN%meD==setw275==D(ook IssuedEnDB
cout==DEnDB
w)ile,p.re%dc)%rL5Pst/sieo,student555?
st.report5BK
,p.close5B
getc)5BK
//***************************************************************// .!c()&! (& ")sla &&s l)s(//****************************************************************
oid displ%%llb5
-
7/25/2019 COMPUTER PROJECT.docx
21/32
?clrscr5B,p.openDbook.d%tD/ios::in5Bi,,p5?
cout==DF!!&! RI-F C&M-6 N&T (F &FN DB getc)5B returnB K
cout==DEnEnEtEt(ook -ISTEnEnDB
cout==DEnDB
cout==D(ook NumberD==setw275==D(ookN%meD==setw2#5==DAut)orEnDB
cout==DEnDB
w)ile,p.re%dc)%rL5Pbk/sieo,book555?bk.report5B
K ,p.close5B getc)5BK
//***************************************************************// .!c()&! (& )ss. '&&//****************************************************************
oid bookissue5?
c)%r sn@$/bn@$Bint ,ound7/,l%g7B
-
7/25/2019 COMPUTER PROJECT.docx
22/32
clrscr5Bcout==DEnEn(&&H ISSMF ...DBcout==DEnEnEtFnter T)e studentJs %dmission no.DBcin>>snB,p.openDstudent.d%tD/ios::inOios::out5B
,p1.openDbook.d%tD/ios::inOios::out5B w)ile,p.re%dc)%rL5Pst/sieo,student55 PP ,ound75 ?
i,strcmpist.ret%dmno5/sn575?
,ound1Bi,st.rettoken575
? cout==DEnEnEtFnter t)e book no. DB
cin>>bnB
w)ile,p1.re%dc)%rL5Pbk/sieo,book55PP ,l%g75?
i,strcmpibk.retbno5/bn575?
bk.s)owbook5B,l%g1Bst.%ddtoken5Bst.getstbnobk.retbno55B
int pos1Lsieo,st5B,p.seekppos/ios::cur5B
,p.writec)%rL5Pst/sieo,student55B
cout==DEnEnEt (ookissued success,ullEnEnle%se Note: Grite current d%tein b%ckside o, book %nd
submit wit)in 1# d%s ,ine !s. 1 ,or e%c) d%%,ter 1# d%s periodDB
K K i,,l%g75 cout==D(ook no does not
eistDB
-
7/25/2019 COMPUTER PROJECT.docx
23/32
K else
cout==Dou )%e not returned t)e l%stbook DB
KK
i,,ound75cout==DStudent record not eist...DB
getc)5B ,p.close5B ,p1.close5B
K
//***************************************************************// .!c()&! (& "&s)( '&&//****************************************************************
oid bookdeposit5?
c)%r sn@$/bn@$B int ,ound7/,l%g7/d%/,ineB clrscr5B cout==DEnEn(&&H 6F&SIT ...DB cout==DEnEnEtFnter T)e studentUVWs %dmission no.DB cin>>snB ,p.openDstudent.d%tD/ios::inOios::out5B ,p1.openDbook.d%tD/ios::inOios::out5B
w)ile,p.re%dc)%rL5Pst/sieo,student55 PP ,ound75 ?
i,strcmpist.ret%dmno5/sn575 ?
,ound1B i,st.rettoken515 ?
w)ile,p1.re%dc)%rL5Pbk/sieo,book55PP
,l%g75
-
7/25/2019 COMPUTER PROJECT.docx
24/32
? i,strcmpibk.retbno5/st.retstbno5575?
bk.s)owbook5B,l%g1Bcout==DEnEn(ook deposited in no. o,
d%sDBcin>>d%Bi,d%>1#5? ,ined%1#5L1B cout==DEnEnRine )%s to deposited
!s. D==,ineBK
st.resettoken5Bint pos1Lsieo,st5B,p.seekppos/ios::cur5B
,p.writec)%rL5Pst/sieo,student55Bcout==DEnEnEt (ook deposited
success,ullDBK
K i,,l%g75 cout==D(ook no does not eistDB Kelse
cout==DNo book is issued..ple%se c)eckDB
K K
i,,ound75cout==DStudent record not eist...DBgetc)5B
,p.close5B ,p1.close5B K
-
7/25/2019 COMPUTER PROJECT.docx
25/32
//***************************************************************// INTRODUCTION FUNCTION//****************************************************************
oid intro5?
clrscr5Bgoto3#/115Bcout==D-I(!A!DBgoto3#/145B
cout==DANAXFFNTDBgoto3#/1'5Bcout==DSSTFDBcout==DEnEnA6F ( : YISZAA- M6AN6A!A&DBcout==DEnEnSCZ&&- : IN6IAN SCZ&&- GA6I HA(I!DBgetc)5B
K
//***************************************************************// ADINISTRATOR ENU FUNCTION//****************************************************************
oid %dminmenu5?
clrscr5Bint c)2Bcout==DEnEnEnEtA6INIST!AT&! FNMDBcout==DEnEnEt1.C!FATF STM6FNT !FC&!6DBcout==DEnEnEt2.6IS-A A-- STM6FNTS !FC&!6DBcout==DEnEnEt3.6IS-A SFCIRIC STM6FNT !FC&!6
DBcout==DEnEnEt4.&6IR STM6FNT !FC&!6DB
cout==DEnEnEt#.6F-FTF STM6FNT !FC&!6DB
-
7/25/2019 COMPUTER PROJECT.docx
26/32
cout==DEnEnEt$.C!FATF (&&H DBcout==DEnEnEt'.6IS-A A-- (&&HS DBcout==DEnEnEt9.6IS-A SFCIRIC (&&H DBcout==DEnEnEt8.&6IR (&&H DBcout==DEnEnEt17.6F-FTF (&&H DBcout==DEnEnEt11.(ACH T& AIN FNMDBcout==DEnEnEtle%se Fnter our C)oice 1115 DBcin>>c)2Bswitc)c)25?
c%se 1: clrscr5B writestudent5Bbre%kB
c%se 2: displ%%lls5Bbre%kB c%se 3:
c)%r num@$B clrscr5B cout==DEnEnEtle%se Fnter T)e Admission
No. DB cin>>numB displ%spsnum5B
bre%kB c%se 4: modi,student5Bbre%kB c%se #: deletestudent5Bbre%kB
c%se $: clrscr5Bwritebook5Bbre%kB
c%se ': displ%%llb5Bbre%kBc%se 9: ?
c)%r num@$B
clrscr5B cout==DEnEnEtle%se Fnter T)e book No. DB cin>>numB displ%spbnum5B bre%kB
K c%se 8: modi,book5Bbre%kB c%se 17: deletebook5Bbre%kB
c%se 11: returnB
-
7/25/2019 COMPUTER PROJECT.docx
27/32
de,%ult:cout==DE%DB K %dminmenu5BK
//***************************************************************// THE AIN FUNCTION OF PRO5RA//****************************************************************
oid m%in5
?c)%r c)Bintro5Bdo?
clrscr5Bcout==DEnEnEnEtAIN FNMDBcout==DEnEnEt71. (&&H ISSMFDB
cout==DEnEnEt72. (&&H 6F&SITDB cout==DEnEnEt73. A6INIST!AT&! FNMDB cout==DEnEnEt74. F[ITDB cout==DEnEnEtle%se Select our &ption 145 DB c)getc)e5B switc)c)5 ?
c%se J1J:clrscr5B
bookissue5B bre%kB
c%se J2J:bookdeposit5B bre%kB
c%se J3J:%dminmenu5Bbre%kB
c%se J4J:eit75B de,%ult :cout==DE%DB
K
-
7/25/2019 COMPUTER PROJECT.docx
28/32
Kw)ilec)J4J5BK
//***************************************************************// END OF PROJECT//***************************************************************
-
7/25/2019 COMPUTER PROJECT.docx
29/32
S%MPLE OUTPUT:
TIT-F AXF:
AIN FNM:
-
7/25/2019 COMPUTER PROJECT.docx
30/32
A6INIST!AT&! FNM:
NFG STM6FNT FNM:
-
7/25/2019 COMPUTER PROJECT.docx
31/32
STM6FNT 6IS-A:
(&&H ISSMF FNM:
-
7/25/2019 COMPUTER PROJECT.docx
32/32
)#)L#O(R%P-+:
T)e in,orm%tion %nd t)e procedure w%st%ken ,rom:
./Classmates
./0112ors0hools!0om
./'i3i1edia
./google!0om