Submitted by -
Under the guidance of -
Palash Chaturvedi
Mr. Manoj Lukose
Class – !! " #oll $o - %&'(')(
CERTIFICATE
*his is to certify that the +roject develo+ed by Palash Chaturvedi of class XII – A entitled Shop Management, is bonafide ork of the student in the Com+uter Science Lab during the academic year /%(%0 is carried out ith the consultation of *eacher !ncharge.
__________________
Examiner ’s Signature
___________________
Mr. Manoj Lukose (Teacher (Teacher Incharge)
CERTIFICATE
*his is to certify that the +roject develo+ed by Palash Chaturvedi of class XII – A entitled Shop Management, is bonafide ork of the student in the Com+uter Science Lab during the academic year /%(%0 is carried out ith the consultation of *eacher !ncharge.
__________________
Examiner ’s Signature
___________________
Mr. Manoj Lukose (Teacher (Teacher Incharge)
ACKN!E"#EMENT
!t is ith great +leasure that ! find myself +enning don these lines to e1+ress my sincere thanks to various +eo+le ho hel+ed me a long ay in com+leting this +roject.
*he harmonious climate in our school +rovided +ro+er guide for +re+aring the +roject. !t as a +rivilege to have been guided by our com+uter teacher.
*hanks to all my classmates ho hel+ed me during develo+ment of this +roject ith their constructive criticism and advice.
CNTENTS
1.
Overview
2.
Introducon to C++
3.
Header fles used
4.
Hardware and Soware requirements
.
!lowc"art
#.
Source codes
$.
Out%uts
&.
'i(lio)ra%"*
$ER$IE% "is is a S"o% ,ana)ement soware w"ic" can (e used (* Store -ee%ers to mana)e %roduct details availa(le in t"eir store and or 'illin) /ur%ose. In t"is a%%licaon0 we allow store ee%ers to enter t"e details o t"e %roducts availa(le in t"eir store0 to view t"em0 to delete t"em0 and %re%are (ills. !eatures %rovided (* t"is %roect are as ollows 1. Storin) details o %roducts ll t"e details o t"e %roducts lie %roduct no.0 %roduct name0 %rice can (e stored in t"e data(ase. 2. 5is%la* %roduct details Store ee%ers can view all t"e details o t"e %roduct availa(le in t"eir store at an* me.
3. 5elete "is eature is also su%%orted (* t"is %roect. "e list o t"e %roducts can (e deleted an* me and can (e re created as %er t"eir needs. 4. 'illin) 6it" t"e "el% o t"is eature user can )et t"e w"ole list o t"e %roducts on t"e (illin) menu0 so t"e user ust need to enter t"e %roduct no. and all t"e details o t"at %roduct will automacall* (e dis%la*ed on t"e (ill0 wit" t"e total amount t"at t"e customer needs to %a*.
INTR"&CTIN T C''
*he C22 +rogramming language as develo+ed at "*3* bell laboratories in the early %4)/5s by 6jarne Stroustru+. 7e found 8C5 lacking for stimulations and decided to e1tend the language by adding features from Simula &' hich as one of the earliest object oriented languages. *he name C22 as coined by #ick Mascitti here 8225 is the 8C5 increment o+erator. 9ver since its birth, C22 involved co+ing ith +roblems encountered by users and through discussions at "*3*. 7oever, the maturation of the language is attested to by to events: %. ;ormation of "$S! C22 committee. . Publication of <*he "nnotated C22 #eference Manual< 9llis 3 Stroustru+.
by
C22 is one of the most +o+ular +rogramming languages and is im+lemented on a ide variety of hardare and o+erating system +latforms. "s an efficient com+iler to native code, its a++lication domains include systems softare, a++lication softare, device drivers, embedded softare, high-+erformance server and client a++lications, and entertainment softare such as video games.
FEAT&RES F C'' PR#RAMS
!n C22, you can develo+ ne data ty+es that contain functional descri+tions =member functions> as ell as data re+resentations. *hese ne data ty+es are called classes. *he ork of develo+ing such classes is knon as data abstraction. ?ou can ork ith a combination of classes from established class libraries, develo+ your on classes, or derive ne classes from e1isting classes by adding data descri+tions and functions. $e classes can contain =inherit > +ro+erties from one or more classes. *he classes describe the data ty+es and functions available, but they can hide = encapsulate> the im+lementation details from the client +rograms. ?ou can define a series of functions ith different argument ty+es that all use the same function name. *his is called function overloading . " function can have the same name and argument ty+es in base and derived classes. @eclaring a class member function in a base class allos you to override its im+lementation in a derived class. !f you use virtual functions, class-de+endent behavior may be determined at run time. *his ability to select functions at run time, de+ending on data ty+es, is called polymorphism. 9very C22 +rogram must have a function named main =>. Program e1ecution begins at main => and continues by seAuentially e1ecuting the statements ithin main =>. " +rogram terminates normally folloing e1ecution of the last statement of main =>. Curly braces =B3> is used to e1+ress grou+ing of statements in C22. 9very e1ecutable statement in C22 must be terminated by a semicolon =D>.
P CNCEPTS IN C''
*he Ebject Eriented Programming has been develo+ed ith a vie to overcome the drabacks of the conventional +rogramming a++roaches. *he EEP a++roach is based on certain once+ts that hel+ it attain its goal of overcoming the drabacks or shortcomings of conventional +rogramming a++roaches. *hese general conce+ts of EEP are given belo:
"ATA A(STRACTIN
!n C22, you can develo+ ne data ty+es that contain functional descri+tions =member functions> as ell as data re+resentations. *hese ne data ty+es are called classes. *he ork of develo+ing such classes is knon as data abstraction. ?ou can ork ith a combination of classes from established class libraries, develo+ your on classes, or derive ne classes from e1isting classes by adding data descri+tions and functions. $e classes can contain =inherit > +ro+erties from one or more classes. *he classes describe the data ty+es and functions available, but they can hide = encapsulate> the im+lementation details from the client +rograms.
IN)ERITANCE
!t is the ca+ability of one class of things to inherit ca+ability or +ro+erties from another class. !nheritance allos one data ty+e to acAuire +ro+erties of other data ty+es. !nheritance from a base class may be declared as +ublic, +rotected, or +rivate. *his access s+ecifier determines hether unrelated and derived classes can access the inherited +ublic and +rotected members of the base class. Enly +ublic inheritance corres+onds to hat is usually meant by FinheritanceF. *he other to forms are much less freAuently used. !f the access s+ecifier is omitted, a FclassF inherits +rivately, hile a FstructF inherits +ublicly.
P!*MRP)ISM
!t is the ability for a message to be +rocessed in more than one form. @eclaring a class member function in a base class allos you to override its im+lementation in a derived class. !f you use virtual functions, class-de+endent behavior may be determined at run time. *his ability to select functions at run time, de+ending on data ty+es, is called polymorphism
SME IMPRTANT "ATA T*PES IN C''
ARRA*S
"rrays refer to a named list of a finite number n of similar data elements. *hey maybe %-dimensional, -dimensional or multidimensional. 91am+le :
float "G(/HD
F&NCTIN
!t is a named +art of +rogram, hich can be invoked from other +arts of the +rogram as often needed.
PINTER
!t is a variable hich holds a memory address. *his address is usually the location of another variable in memory. 91am+le :
char I+trD
C!ASS
!t re+resents a grou+ of similar objects. " class describes all the +ro+erties of a data ty+e and an object is an entity created according to that descri+tion.
)EA"ER FI!ES &SE"
iostream.h fstream.h +rocess.h conio.h stdio.h string.h dos.h gra+hics.h
SFT%ARE AN" )AR"%ARE RE+&IREMENTS
SFT%ARE RE+&IREMENTS,
Platform:indos 4)J1+J///. ;ront end: turbo c22 version-(./. 6ack end: @ES file su++ort.
)AR"%ARE RE+&IREMENTS,
P!!! K// M7 or higher. #"M &0 M6 or more. 7E@ ca+acity 6 or more.
F!%C)ART S7
CHOIC8
,ae a %urc"ase
1
dmin menu 2 Create a /roduct 5is%la* list
5elete
3
89it
SOURE O!E includeNiostream.hO includeNconio.hO includeNstdio.hO includeN+rocess.hO includeNfstream.hO includeNstring.hO includeNdos.hO includeNgra+hics.hO
int +no,choice%D int logo=>D int intro=>D void last=>D
class +roduct B int +rodno,AtyD char +rodnameG(/HD float +rodmr+,+riceD +ublic:
void dis+lay+roduct=>D charI ret+rodname=>D int ret+rodno=>D float ret+rod+rice=>D
void create+roduct=> B coutNNFQn 9nter +roduct no.: FD cinOO+rodnoD coutNNFQn9nter +roduct name :FD gets=+rodname>D coutNNFQn9nter rate of +roduct :FD cinOO+rodmr+D D
void +roduct::dis+lay+roduct=> B coutNNFQn*7e Product no is :FNN+rodnoD coutNNFQn*he name of +roduct is :FD +uts=+rodname>D
coutNNFQn*he +rice of +roduct is :FNN+rodmr+D
int +roduct::ret+rodno=> Breturn +rodnoD
charI +roduct::ret+rodname=> Breturn +rodnameD
float +roduct::ret+rod+rice=> Breturn +rodmr+D
void rite+roduct=> B fstream f+%D +roduct +D f+%.o+en=Fsho+.datF,ios::a++Rios::binary>D +.create+roduct=>D f+%.rite==charI>3+,sieof=+roduct>>D f+%.close=>D
coutNNFQnQn*he Product has been createdFD delay=%///>D
void dis+layall=> B fstream f+D +roduct +D clrscr=>D coutNNFQnQnQnQtQt@!SPL"? "LL #9CE#@STTTQnQnFD f+.o+en=Fsho+.datF,ios::inRios::binary>D hile=f+.read==charI>3+,sieof=+roduct>>> B +.dis+lay+roduct=>D coutNNFQnQn getch=>D f+.close=>D JJdelay=K//>D
QnQnFD
void delete+roduct=> B fstream f+D +roduct +D char yD clrscr=>D coutNNFQn"re you Sure ?ou ant to @elete the recordsVV =? or $>QaQaQaQnFD cinOOyD if=yWWXyXRRyWWX?X> B coutNNFQnQnQt#ecord @eleted ..FD delay=%///>D f+.o+en=FSho+.datF,ios::inRios::outRios::binary>D fstream f+D f+.o+en=F*em+.datF,ios::outRios::binary>D
remove=FSho+.datF>D rename=F*em+.datF,FSho+.datF>D
void menu=> B fstream f+D +roduct +D clrscr=>D f+.o+en=FSho+.datF,ios::inRios::binary>D if=Tf+> B coutNNF9##E#TTT ;!L9 CEUL@ $E* 69 EP9$QnQnQn o *o "dmin Menu to create a fileFD getch=>D e1it=/>D coutNNFQnQnQtQtQtQtProduct M9$UQnQnFD
coutNNFQt QnFD coutNNFQtQt P.$E.QtQt$"M9QtQtP#!C9QnFD
coutNNFQt QnFD
hile=f+.read==charI>3+,sieof=+roduct>>> B
coutNNFQtQt FNN+.ret+rodno=>NNFQtQtFNN+.ret+rodname=>NNFQtQtFNN+.ret+rod+rice= >NNendlD f+.close=>D
void +laceorder=> B fstream f+D +roduct +D int orderarrG(/H,lW/,AuanG(/HD float totalW/D char chWX?XD menu=>D coutNNFQnQnQtQtQtWWWWWWWWWWWWWWWWWWWWWWWWWWWWFD coutNNFQnQtQtQt
PL"C9 ?EU# E#@9#FD
coutNNFQnQtQtQtWWWWWWWWWWWWWWWWWWWWWWWWWWWWQnFD doB coutNNFQnQn9nter *he Product $umber Ef *he Product : FD cinOOorderarrGlHD coutNNFQnYuantity in number : FD
cinOOAuanGlHD l22D coutNNFQn@o ?ou ant *o Erder "nother Product V =yJn>FD cinOOchD hile=chWWXyX RRchWWX?X>D coutNNFQnQn*hank ?ou ;or Placing *he ErderFD clrscr=>D
coutNNFQnQnIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII!$ZE!C9 IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIQnFD coutNNFQnPr $o.QtQtPr $ameQtQt Yuantity QtQtPrice QtQt"mount FD for=int 1W/D1NWlD122> B f+.o+en=FSho+.datF,ios::inRios::binary>D f+.read==charI>3+,sieof=+roduct>>D hile=Tf+.eof=>> B if=+.ret+rodno=>WWorderarrG1H> B total2W+.ret+rod+rice=>IAuanG1HD
coutNNFQnFNNorderarrG1HNNFQtQtFNN+.ret+rodname=>NNFQtQtQtFNNAuan G1HNNFQtQtFNN+.ret+rod+rice=>NNFQtQtFNN+.ret+rod+rice=>IAuanG1HD getch=>D
f+.read==charI>3+,sieof=+roduct>>D
f+.close=>D coutNNFQnQnQtQtQtQtQt*E*"L W FNNtotalD coutNNFQnQnFD
void adminmenu=> B clrscr=>D int chD coutNNFQnQnQnQt"dmin MenuFD coutNNFQnQnQt%.Create a ProductFD coutNNFQnQnQt.@is+lay all ProductsFD coutNNFQnQnQt(.@elete "ll ProductFD coutNNFQnQnQt0.6ack to Main MenuFD coutNNFQnQnQt9nter your Choice =%-0> :FD cinOOchD
sitch=ch> B case %: clrscr=>D rite+roduct=>D breakD case : dis+layall=>D breakD case (: delete+roduct=>D breakD case 0: breakD default: coutNNFQaFD adminmenu=>D
void login=> B char m,kD char usernameG/H, +assordG/HD back:
clrscr=>D coutNNFQnQnQnQtQtQt coutNNFQnQnQtQtQt
Login to "ccess the StoreFD 9nter the detaiils belo:FD
coutNNFQnQnQnQtQtUS9#$"M9 : FD gets=username>D coutNNFQnQnQtQtP"SSE#@ : FD gets=+assord>D if==strcm+=username,FusernameF>TW/>RR =strcm+=+assord,F+assordF>TW/>> BcoutNNFQnQnQt#E$ P"SSE#@TTTT ant to try "gainO =?,yJ$,n>FD cinOOmD if =mWWXyX RR mWWX?X> goto backD else e1it=/>D
int logo=> B
restart: clrscr=>D void last=>D int gW@9*9C*,dD initgra+h=3g, 3d, Fc:QQtcQQbgiF>D int +oly%G%KHD
JJscreen +oly%G/HWK/D +oly%G%HWK/D +oly%GHW(0/D +oly%G(HWK/D +oly%G0HW(0/D +oly%GKHW%K/D +oly%G&HW(0/D +oly%G'HW%K/D +oly%G)HWK/D +oly%G4HW%K/D dra+oly=K,+oly%>D int +olyG%KHD +olyG/HW&/D +olyG%HW&/D
+olyGHW((/D +olyG(HW&/D +olyG0HW((/D +olyGKHW%0/D +olyG&HW&/D +olyG'HW%0/D +olyG)HW&/D +olyG4HW&/D fill+oly=K,+oly>D
JJkeyboard int +oly(G%KHD
+oly(G/HW(/D +oly(G%HW%'/D +oly(GHW(&/D +oly(G(HW%'/D +oly(G0HW()/D +oly(GKHW%4/D +oly(G&HW%/D +oly(G'HW%4/D +oly(G)HW(/D
+oly(G4HW%'/D setfillstyle=,-%>D fill+oly=K,+oly(>D
line=K/,K/,K/,%K/>D line=(%/,%K/,(%/,%'/>D line=)/,%K/,)/,%'/>D
JJmouse ire arc=()/, %4/, %/, %/, %K>D arc=0/K,%)&, %4/,'/,%/>D arc=0/',//,%/,%//,0>D
JJmouse elli+se=0%/, /0, 4/, 0K/,&, %/>D JJmouse button arc=0%/,%4',//,(0/,K>D int mid1Wgetma11=>JD int midyWgetma1y=>JD sette1tstyle=*#!PL9;E$*,7E#![@!#,>D outte1t1y=mid1-0(,midy20/,F9LCEM9 *E 6! 6"["# ..." CEMPL9*9 S*E#9 TTTT F>D
sette1tstyle=@9;"UL*;E$*,7E#![@!#,%>D
outte1t1y=mid1-%(/,midy2%//,F;or all your @aily needs TTT F>D outte1t1y=mid1-%0',midy2%0/,FPress any key to enter the Store.... F>D getch=>D closegra+h=>D return=/>D void last=> B coutNNFQnQnQn
,\\, QnQtQtF
NNF NNF
J J QnQtQtF *hanks ;or Sho++ingTT
J J QnQtQtF
NNF
QQ]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]J.J QnQtQtF
NNF
QQ]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]J
NNF
QQ]]]]]]]]]]]]]]]]]]]]]]]]]]]]]J
NNF
QQ]]]]]]]]]]]]]]]]]]]]]]]]]]]J
NNF
QQ]]]]]]]]]]]]]]]]]]]]]]]]]J
NNF
QQJ
NNF
R
R
R]]]]]]]]]]]]]]]]]]]]]]R
NNF
RR J^^QQ
NNF
QQJ
J^^QQ QQJ
QnQtQtF QnQtQtF QnQtQtF
QnQtQtF
QnQtQtF
NNF
NNF
QnQtQtF
QnQtQtF QnQtQtFD
QnQtQtF QnQtQtF
delay=///>D e1it=/>D
int intro=> B clrscr=>D te1tmode=6)/>D te1tcolor=>D c+rintf=FQnQn
!ntroductionF>D
te1tcolor=(>D c+rintf=FQnQn is on the to+icF>D
*he folloing Project
te1tcolor=K>D c+rintf=FQnQn M"$"9M9$*F>D
S7EP
c+rintf=FQnQnQnQnF>D te1tcolor=4>D c+rintf=F
*he Project has been made 6y-F>D
te1tcolor=%K>D c+rintf=FQnQn\ @ivyanshu _hare \ Palash ChaturvediF>D
c+rintf=FQnQnQnQnF>D te1tcolor=-%>D c+rintf=FQnQnQnPress any key to continue..F>D te1tcolor=%K>D getch=>D return=/>D
void main=> B
int ch%D intro=>D clrscr=>D logo=>D
login=>D do B
clrscr=>D
coutNNFQnQnQtQtQtQt 9LCEM9FD coutNNFQnQnQnQnQnQt M"!$ M9$UFD coutNNFQnQt%. M"_9 " PU#C7"S9FD coutNNFQnQt. "@M!$ M9$UFD coutNNFQnQt(. 9!*FD coutNNFQnQt Please Select ?our E+tion =%-(>FD cinOOch%D sitch=ch%> B case %: +laceorder=>D getch=>D breakD case : adminmenu=>D breakD case (: B clrscr=>D goto _D breakD default : coutNNFQaFD
hile=ch%OW%33ch%NW(> D getch=>D _: last=>D
JJ9$@ E; P#E#"M``TTT
&TP&TS
(I(!I#RAP)*
Sumita "rora – class ! Sumita "rora – class !! .iki+edia.com