COMPUTER SCIENCE PROJECT FILE ON CANTEENMANAGEMENT
PROJECT PREPARED BY: Aakash Jain XII Session: 2009-2010 Jaswant Modern Sr. Sr. Sec. Public School School
TABLE OF CONTENTS Certificate Acknowledgement Working
description of project
Header
files and their purpose
Coding
& outputs
ACKNOWLEDGEMENT It would be my utmost pleasure to express my sincere thanks to My Computer Science Teacher provid idin ing g a help helpin ing g hand hand in Mrs.Bhawana in prov this project. Her unlagging patience! creativity and immense knowledge that she shared with me have proved highly beneicial to me and have made my "roject #ile both possible and successul.
CERTIFICATE This is to certiy that $akash %ain o class &II completed this project titled 'CanteenManagement( under my guidance ) this project may be considered as the part o the practical exam o $ISSC* conducted by C+S*.
Mrs. +hawana Computer Science %aswant Modern Sr. Sec. "ublic School
HEADER FILES USED AND THEIR PURPOSE 1. 2. 3. 4. 5. 6. 7.
PROCES PROC ESS. S.H H – for exit() function CONI ONIO.H – for clrscr() and getch() functions o perations STDIO TDIO..H – for standard I/O operations DOS.H – for execution of program STRIN TRING. G.H H – for string handling IOS IOSTREA TREAM. M.H H –for input/output operations IOMANI IOMANIP P.H–for C++ streams I/O manipulators
WORKING DESCRIPTION OF
PROJECT This program program is designed for calculating the bill for the items purchased by the customer. This program program consists of ve options as follows
1. FOR MENU & PURCHASE 2. DETAILS ABOUT THE CANTEEN 3. QUATITY AVAILABLE . TO EIT
CODING
,,,,,,,,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,,,,,,,,,,IT/012CTI0,,,,, ,,IT/012CTI0,,,,,,,,,,,, ,,,,,,, ,,$M*34 $$5$SH %$I,
,,C6$SS34 &II , ,,,,,,,,,,,,,,,,,,,,,,,,,,,,, 77777777777777777777 7C$T** M$$8*M*T7 77777777777777777777 -, ,-77 H*$1*/ #I6*S 77-, 7include9iostream.h: 7include9conio.h: 7include9string.h: 7include9stdio.h: 7include9process.h: 7include9iomanip.h: 7include9dos.h: main;< = clrscr;<> unsigned int sum!add!d!i!j!e!!g!h!k!l!w sum!add!d!i!j!e!!g!h!k!l!w!x!y!?> !x!y!?> unsigned int bir@AB!per@D!der@AAB!mur@E!par@A bir@AB!per@D!der@AAB!mur@E!par@AAB!cor@FB!twr@AAFF! AB!cor@FB!twr@AAFF! lur@AG!tir@ABG! lur@AG!tir@ABG! rer@AFF> int ubis@ABBB!abis@B!upep@ABBB!apep@B!uden@AAB!aden@B!umun@ABBB!amun@B!uper k@JBB!aperk@B!ucoc@BB!acoc@B!utit@ABB!atit@B!ulux@ABBB!alux@B!utid@ABBB!atid@ B!uree@BB!aree@B> unsigned int m@B!n@B!o@B!p@B!@B!r@B!s@B!t@B!u@B!v@B> char nameKJBL!rankKABL!pu!cKBL!aKAJL!bKAJL!ok> clrscr;<> getch;<> clrscr;<> cout99NOnOnOt w w eeeeeeee l N> cout99NOnOnOt w w w e l N> cout99NOnOnOt w ww w e l N> cout99NOnOnOt w w w w eeeeeeee l N> cout99NOnOnOt w w w w eeeeeeee l N> cout99NOnOnOt w w w w e l N> cout99NOnOnOt ww ww e l N> cout99NOnOnOt cout99NOnOnOt w w e e e e e e e e l l l l l l l lN> cout99NOnOnOnOn c c c c c c c ooooooo m m e e e e e e e e N> cout99NOnOn c o o mm m m e N> cout99NOnOn c o o m m m m e N> cout99NOnOn c o o m m m m eeeeeeee N> cout99NOnOn c o o m m m m e e e e e e e e N> cout99NOnOn c o o m m m m e N> cout99NOnOn c o o m mm m e N> cout99NOnOn c c c c c c c ooooooo m m m e e e e e e e e N>
getch;<> clrscr;<> main3> cout99NOnOnOnO cout99 NOnOnOnOtOtOt tOtOt $##P$ $##P$ C$T** M$$8*M*TN> M$$8*M* TN> cout99NOnOnOnC0S2M*/ I#0/M$TI0N> I#0/M$TI0N> cout99NOnOnOnOn $M*3N> gets;name<> cout99NOn /$53N> gets;rank<> cout99NOn S*/QIC* S*/QIC* 0.3N> cin::a> cout99NOn SM$/T SM$/T C$/1 0.3N> cin::b> cout99NOn "H0* 0.3N> cin::c> cout99NOn *T*/ +I66 0.3N> cin::i> again3> clrscr;<> cout99NOnOnOnOnOA.M*2 ) "2/CH$S*N> cout99NOnOnOnO.1*T$I6SN> cout99NOnOnOnO.*P C2ST0M*/N> cout99NOnOnOn cout99 NOnOnOnO.R2$ O.R2$TIT TIT $Q$I6$+6*N> $I6$+6* N> cout99NOnOnOnOJ.*&ITN> cout99NOnOnOn*T*/ 02/ CH0IC*3N> cin::d> clrscr;<> switch;d< = case A3 cout99NOnIT*MSOtOtOtOtOtOtOt /$T*;/S cout99NOnOnOn+ISC2T*OtOtOtOtOtOtOtOtAB cout99NOnOnOn+ISC2T*OtOtOtO tOtOtOtOtAB N> cout99NOnOn"*"S01*TOtOtOtOtOtOtOtDN> cout99NOnOn1*IM "0P1*/OtOtOtOtOtOtOtAAB "0P1*/OtOtOtOtOtOtOtAAB N> cout99NOnOnM2CHOtOtOtOtOtOtOtOtE cout99NOnOnM2CHOtOtOtOt OtOtOtOtE N> cout99NOnOn"$/5 cout99 NOnOn"$/5 $Q*2* "*/#2M*OtOtOtOtOt "*/#2M *OtOtOtOtOtOtAAB OtAAB N> N> cout99NOnOnC0C02T H$I/ 0I6OtOtOtOtOtOtFB 0I6OtOtOtOtOtOtFB N> cout99NOnOnTIT$ cout99 NOnOnTIT$ P$TCHOtOtOtOtOtOtOtAAFF TCHOtOtOt OtOtOtOtAAFF N> cout99NOnOn62& S0$"OtOtOtOtOtOtOtAG S0$"OtOtOtOtOtOtOtAG N> cout99NOnOnTI1*OtOtOtOtOtOtOtOtABG cout99NOnOnTI1*OtOtOtOtO tOtOtOtABG N> cout99NOnOn/**+05 SH0*SOtOtOtOtOtOtOtAFF SH0*SOtOtOtOtOtOtOtAFF N> start3 cout99NOnOnOn cout99 NOnOnOn10 10 02 P$T T0 "2/CH$S*;,<3On "2/CH$S *;,<3OnN> N> cin::pu> i;pu@@UUpu@@y< =switch;pu<
case A3 clrscr;<> cout99NOnOnOnOtOtOtOt"2/CH$S* cout99NOnOnOnOtOtOtOt"2/CH$S* 6ISTN> bis3> cout99NOn+ISC2T*;M$& B<3 N> cin::m> i;m:B< = cout99N*nter Ruantity Smaller than BN> getch;<> goto bis> V else abis@ubis4m> pep3> cout99NOn"*"S01*T;M$& <3 N> cin::n> i;n:< = cout99N*nter Ruantity Smaller than N> getch;<> goto pep> V else apep@upep4n> den3> cout99NOn1*IM "0P1*/;M$& "0P1*/;M$& <3 <3 N> cin::o> i;o:< = cout99N*nter Ruantity Smaller then N> getch;<> goto den> V else aden@uden4o> mun3> cout99NOnM2CH;M$& JB<3 N> cin::p> i;p:JB< = cout99N*nter Ruantity Smaller then JBN> getch;<> goto mun>
V else amun@umun4p> park3> cout99NOn"$/5 cout99 NOn"$/5 $Q*2* "*/#2M*;M$& "*/#2M* ;M$& <3 N> cin::> i;:< = cout99N*nter Ruantity Smaller then N> getch;<> goto park> V else aperk@uperk4> coco3> cout99NOnC0C02T H$I/ 0I6;M$& <3 N> cin::r> i;r:< = cout99N*nter Ruantity Smaller then N> getch;<> goto coco> V else acoc@ucoc4r> titan3> cout99NOnTIT$ cout99 NOnTIT$ P$ P$TCH;M$& <3 N> cin::s> i;s:< = cout99N*nter Ruantity Smaller then N> getch;<> goto titan> V else atit@utit4s> lux3> cout99NOn62& S0$";M$& S0$";M$& AB<3 N> cin::t> i;t:AB< =
cout99N*nter Ruantity Smaller then ABN> getch;<> goto lux> V else alux@ulux4t> tid3> cout99NOnTI1*;M$& <3 N> cin::u> i;u:< = cout99N*nter Ruantity Smaller then N> getch;<> goto tid> V else atid@utid4u> ree3> cout99NOn/**+05 SH0*S;M$& SH0*S;M$& <3 N> cin::v> i;v:< = cout99N*nter Ruantity Smaller then N> getch;<> goto ree> V else aree@uree4v> cout99NOnN> clrscr;<> cout99NOnOnOn cout9 9NOnOnOnOnOnOnOt OnOnOnOtOtOtOt$## OtOtOt$##P P$ C$T**OnN> C$T**O nN> cout99NOnOnOtOtOtOt C$SH M*M0OnN> cout99NOnOn+I66 0.3N99i> cout99NOnOn$M*3N> cout99name> cout99NOnOn/$53N99rank> cout99NOnOnS*/QIC* cout99NOnOnS*/QIC* 0.3N99a> cout99NOnOnSM$/T cout99NOnOnSM$/T C$/1 C$/1 0.3N99b> cout99NOnOn"H0* 0.3N99c> cout99NOnOnOnOnOnN> cout99N@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@N>
cout99NOnIT*MSN 99setw;B<99NR2$TITN99setw;J<99N"/IC*;/s. cout99N@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@N> i;m:B< cout99NOnOn+ISC2T*N 99setw;E<99m99setw;E<99N/s.N99m-bir> 99setw;E<99m99setw;E<9 9N/s.N99m-bir> i;n:B< cout99NOnOn"*"S01*TN 99setw;D<99n99setw;E<99N/s.N99n-per> i;o:B< cout99NOnOn1*IM "0P1*/N 99setw;<99o99setw;E<99N/s.N99o-der> i;p:B< cout99NOnOnM2CHN 99setw;B<99p99setw;E<99N/s.N99p-mur> 99setw;B<99p99setw;E<99N/s .N99p-mur> i;:B< cout99NOnOn"$/5 cout99 NOnOn"$/5 $Q*2* "*/#2M*N99setw;D<9999setw;E<99N/s.N99-par> i;r:B< cout99NOnOnC0C02T H$I/ 0I6N 99setw;F<99r99setw;E<99N/s.N99r-cor> i;s:B< cout99NOnOnT cout9 9NOnOnTIT IT$ $ P$TCHN 99setw;<99s99s 99setw; <99s99setw;E< etw;E<99N/s.N 99N/s.N99s-twr> 99s-twr> i;t:B< cout99NOnOn62& S0$"N 99setw;G<99t99setw;E<99N/s.N99t-lur> 99setw;G<99t99setw;E<99N/s.N 99t-lur> i;u:B< cout99NOnOnTI1*N 99setw;A<99u99setw;E<99N/s.N99u-tir> 99setw;A<99u99setw;E<99N/s.N99u-ti r> i;v:B< cout99NOnOn/**+05 SH0*SN 99setw;<99v99setw;E<99N/s.N9 99setw;<99v99setw;E<99N/s.N99v-rer> 9v-rer> e@m-bir> @n-per> g@o-der> h@p-mur> k@-par> l@r-cor> w@s-twr> x@t-lur> y@u-tir> ?@v-rer> sum@eWWgWhWkWlWwWxWyW?> add@mWnWoWpWWrWsWtWuWv> cout99NOn@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@N> cout99NOnT0T$63N99setw;B<99add99setw;G<99N/s.N99sum> cout99NOnOnTH$5 02 .OtOtOt QISIT 2S $8$IOnN> getch;<>
clrscr;<> goto again> V else =goto again> V
case 3 cout99NOnOnOnOnOnOtOtOtOtC$T** cout99NOnOnOnOnOnOtOtOtOt C$T** 1*T$I6SN> 1*T$I6SN> cout99NOnOn7TIMI83OnOn AA $M T0 B "M On B "M T0 BJ "MN> cout99NOnOn7C$T** PI66 C60S*1 0 T2*S1$N> T2*S1$N> cout99NOnOn78001S 0C* S061 PI66 0T +* *&CH$8*1,/*"6$C*1N> cout99NOnOn7T$5* cout99NOnOn7T$5* 02/ SM$/T SM$/T C$/1 PITH 02N> cout99NOnOn7C066*CT 02/ SM$/T C$/1 ) +I66 $#T*/ "$M*TN> cout99NOnOn710 0T +/*$5 $ C$T** IT*MSN> getch;<> clrscr;<> goto again> case 3 goto main> case 3 i;m:BUUn:BUUo:BUUp:BUU:BUUr:BUUs:BUUt:BUUu:BUUv:B< =cout99NOnOtOtOtItems =cout99NOnOtOtOtItems $valiable $valiable in Canteen.OnOnOnN> cout99N@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@N> cout99NOnIT*MSN 99setw;B<99NR2$TITN> cout99NOn@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@N> cout99NOnOnOn+ISC2T*N 99setw;E<99abis> cout99NOnOnOn"*"S01*TN 99setw;D<99apep> cout99NOnOnOn1*IM "0P1*/N 99setw;<99aden> cout99NOnOnOnM2CHN 99setw;B<99amun> cout99NOnOnOn"$/5 cout99NOnOnOn"$/5 $Q*2* $Q*2* "*/#2M*N99setw;D<99aperk> cout99NOnOnOnC0C02T H$I/ 0I6N 0I6N 99setw;F<99acoc> 99setw;F<99acoc> cout99NOnOnOn cout99 NOnOnOnTIT$ TIT$ P$TCHN 99setw;<99atit> 99setw; <99atit> cout99NOnOnOn62& S0$"N 99setw;G<99alux> cout99NOnOnOnTI1*N 99setw;A<99atid> cout99NOnOnOn/**+05 SH0*SN 99setw;<99aree> cout99NOn------------------------------------------------------------------------------N>
getch;<> goto again> V else ==cout99NOnOtOtOtItems ==cout99NOnOtOtOtItems $valiable $valiable in Canteen.OnOnOnN> cout99N@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@N> cout99NOnIT*MSN 99setw;B<99NR2$TITN> cout99NOn@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@N> cout99NOnOnOn+ISC2T*N 99setw;E<99ubis> cout99NOnOnOn"*"S01*TN 99setw;D<99upep> cout99NOnOnOn1*IM "0P1*/N 99setw;<99uden> cout99NOnOnOnM2CHN 99setw;B<99umun> cout99NOnOnOn"$/5 cout99NOnOnOn"$/5 $Q*2* $Q*2* "*/#2M*N99setw;D<99uperk> cout99NOnOnOnC0C02T H$I/ 0I6N 0I6N 99setw;F<99ucoc> 99setw;F<99ucoc> cout99NOnOnOn cout99 NOnOnOnTIT$ TIT$ P$TCHN 99setw;<99u 99setw; <99utit> tit> cout99NOnOnOn62& S0$"N 99setw;G<99ulux> cout99NOnOnOnTI1*N 99setw;A<99utid> cout99NOnOnOn/**+05 SH0*SN 99setw;<99uree> cout99NOnOn------------------------------------------------------------------------------N> getch;<> goto again> V case J3 cout99NOnOnOnOnOnOnOnOnOnOtOtOtOt TH$5SN> sleep;A<> clrscr;<> cout99NOnOnOnOnOnOnOnOnOnOnOnOnOnOnOtOtOtOt TH$5SN> sleep;A<> clrscr;<> cout99NOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOtOtOtOt TH$5SN> sleep;A<> clrscr;<> cout99NOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOtOtOtOt TH$5SN> sleep;A<> clrscr;<> cout99NOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOtOtOtOt TH$5SN> sleep;A<> clrscr;<>
cout99NOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOtOtOtOt TH$5SN> sleep;A<> clrscr;<> cout99NOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOtOtOtOt TH$5SN> sleep;A<> clrscr;<> cout99NOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOtOtOtOt TH$5SN> sleep;A<> clrscr;<> cout99NOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOnOn OtOtOtOt TH$5SOnOnOnOtOtOtOt"ress TH$5SOnOnOnOtOtOtOt"ress any key to *xit.......N> getch;<> exit;B<> deault3 cout99Nour cout99Nour choice is wrongN> getch;<> goto again> V ,,getch;<> ,, return B> V V
OUTPUT
w w eeeeeeee w w w e w ww w e w w w w eeeeeeee w w w w eeeeeeee w w w w e ww w w e w w w eeeeeeee ccccccc oooooo c o o c o o c o o c o o c o o c o o ccccccc oooooo
l l l l l l l llllllll m m mm mm m m m m m m m m m m m m m m m m m mm m m m m
eeeeeeee e e eeeeeeee eeeeeeee e e eeeeeeee
AFFWA CANTEEN MANAGEMENT CONSUMER INFORMATION INFORMATION NAME: AAKASH RANK:234 SERVICE NO. :564 SMART CARD NO.:!6 PHONE NO.:"#!654356$ ENTER BILL NO.:$2345
$.MENU % PURCHASE 2.DETAILS 3.NEW CUSTOMER 4.&UANTITY AVAILABLE 5.E'IT
ENTER YOUR CHOICE:$
ITEMS BISCUIT PEPSODENT DENIM POWDER MUNCH PARK AVENUE PERFUME
RATE $" 36 $$" $$"
COCONUT HAIR OIL TITAN WATCH LU' SOAP TIDE REEBOK SHOES
#" $$## $! $"! $4##
DO YOU WANT TO PURCHASE(Y)N*:Y
BISCUIT+MA' 3",:2 PEPSODENT+MA' 2,:$ DENIM POWDER+MA' 2,:2 MUNCH+MA' 5",:3" PARK AVENUE PERFUME+MA' 2,:2 COCONUT HAIR OIL+MA' 2,:" TITAN WATCH+MA' 2,:2 LU' SOAP+MA' $",:6 TIDE+MA' 2,:2 REEBOK SHOES+MA' 4,:2
AFFWA CANTEEN CASH MEMO NAME: AAKASH
RANK:234 SERVICE NO. :564 SMART CARD NO.:!6 PHONE NO.:"#!654356$ ENTER BILL NO.:$2345 ITEMS &UANTITY PRICE(R-.* BISCUIT 2 R-.2" PEPSODENT $ R-.36 DENIM POWDER 2 R-.22" MUNCH 3" R-.24" PARK AVENUE PERFUME 2 R-.22" TITAN WATCH 2 R-.23# LU' SOAP 6 R-.$"2 TIDE 2 R-.2$4 REEBOK SHOES 2 R-.2## TOTAL: 4# R-.644 THANK YOU VISIT US AGAIN