Вы находитесь на странице: 1из 104

ON

OF KRISHNA MUSIC CENTER FOR The Partial Fulfillment Of Requirement Of B.COM. III (COMPUTER. VOCATIONAL) e!!i"n# $%&$'&( Guided By: a!riti Bir"a
Lecturer, Dept. Of comp. science. S.A.Jain (PG) College, Am ala cit!.

Project Coordinator: Ani" Ku#ar


Head, Dept.of comp. science, S.A.Jain (PG) College, Am ala Cit!.

Su$#itted By: AKANKSHA BHANDARI B%Co# III &'ocationa"(


Ro"" No:)))))))))))

ESTD 1938

*e+art#ent o, co#+uter -c% . a++"icationS%A% AIN &PG( Co""e!e/ A#$a"a City.


(Affiliated to Kurukshetra University, Kurukshetra

Ac0no1"ed!e#ent
"#is pro$ect is designed to prepare t#e %A&AG'%'&" O( %)S*C S"O+' in C Language. * too, t#e #elp from a num er of persons and e-press m! great regards to all of t#em. (irst of all * .ould li,e to e-press m! sincere regards for our principal S2% Pradee+ S2ar#a for t#e inspiration of t#is pro$ect report. %! sincere gratitude is due to.ards Mr% Ani" Ku#ar, #ead of department of computer science. "#e credit for t#is report also goes to m! super/isor, Mr-% ariti Bir"a for de/eloping t#e pro$ect titled %)S*C SHOP %A&AG'%'&". (urt#er * .ould li,e to e-press m! regards for Mr% ITEN*ER o.ner of t#e organi0ation .#o e-clusi/el! gi/es t#eir consent to go t#roug# t#eir organi0ation. And * .ould li,e to t#an,s #im for pro/iding me suc# t#e facilit!. * .ould li,e also t#an,s m! parents, m! famil! and m! friends, .#o ga/e me encourage and different ,ind of /alua le ideas for de/eloping t#is pro$ect. "#oug# t#e pro$ect #as een de/eloped carefull!, ut if an! error1mista,e is eing found ! an! od! later on t#e stage, * .ould li,e to appreciate #im1#er and tr! to remo/e it.

AKANKSHA

PREFACE
%anagement and *n/entor! is an important for an! usiness. '/en more important to emplo!ee. 2ecause e/er! emplo!ee .ants t#e gets less .or, load. %anuall! is difficult to compute t#e stoc, in a store. (or compute a stoc, in a store and in a s#op it ta,es lot of time. '/er! usinessman .ants to ,eep #is in/entor! data must e up to date. "#roug# t#is pro$ect .e can also ,no. t#at #o. muc# Salar! paid to .or,ers, 'lectricit! ill, "elep#one ill, miscellaneous e-penses made ! t#e organi0ation. Computer #andles t#e in/entor! data effecti/el! .#ic# is difficult and time consuming to #andle .it#out t#e #elp of computer. )se of computer in t#e field of in/entor! continuousl! increasing. *n usiness circle t#e computer are most important in t#e field of in/entor!. '/er! good usiness person uses computer for in/entor! .or,. 2ecause t#is also reduce paper .or,. "#is pro$ect is de/eloped in C language. "#e data is regarding t#e in/entor! in t#e data ase file. "#e data can e modified, deleted and /ie.ed. "#e /arious report of mont#l! sale, purc#ase, e-pense, mont#l! profit report can e generated. 3it# t#e use of t#is pro$ect .e can remo/e t#e follo.ing mista,es45 All t#e reports are timel! presented and are accurate. "#ere .ill e no arit#metical errors in it. "#e result .ill e /ie.ed on screen and as .ell as Printed on Printer According to t#e user re6uirement.

CERTIFICATE
"#is is to certif! t#at A7A&7SHA 2HA&DA+* of 2.com5*** (/ocational) +oll &o. 89:9 S%A% AIN &PG( CO33EGE #as completed #is pro$ect on t#e soft.are stud! of 4MUSIC STORE5 of ;KRISHNA MUSIC STORE5 under m! guidance and super/ision. "#is report is satisfactor! as per re6uired. "#is .or, done in t#is report is t#e result of candidate<s o.n effort.

Guided By: a!riti Bir"a


Lecturer, Dept. Of comp. science. S.A.Jain (PG) College, Am ala cit!.

Project Coordinator: Ani" Ku#ar


Head, Dept.of comp. science, S.A.Jain (PG) College, Am ala Cit!.

CONTENTS
6% Introduction
*ntroduction to Pro$ect

7% Sy-te# Ana"y-i*ntroduction Preliminar! in/estigation '-isting S!stem Limitation of e-isting S!stem +ecommended S!stem 8. Fea-i$i"ity -tudy and +ro+o-ed *ntroduction "!pe of feasi ilit! Stud! O $ecti/e of t#e proposed s!stem Scope Pro lem definition

o$jecti8e

9% *e-i!n and *ata ,"o1 *ia!ra#


S!stem Design *ntroduction Design O $ecti/es Hard.are = Soft.are +e6uirement Outlines of input, Output and files design

:% Introduction to C and Te-tin!


*ntroduction to C

Selection of Language

;% Te-tin! <% I#+"e#entation =% Codin!


>.

Screen-

6>% Conc"u-ion

INTRO*UCTION TO PRO ECT


Pro$ect title ;%A&AG'%'&" O( %)S*C SHOP? (A Pro$ect for ,eeping all t#e in/entor!, sale, purc#ase and mont#l! e-penses). "#e name of t#e pro$ect is ;%A&AG'%'&" O( %)S*C SHOP?. "#e o $ecti/e of t#e pro$ect is to computeri0e t#e s!stem of music s#op. *n t#is pro$ect it .ill ,eeps one file for recording of num er Cassettes, CD<s and D@D<s of different categor! purc#ased during t#e mont#. 3e maintain anot#er file for total items sold during t#e mont#. As .ell as it also maintain #o. muc# e-pense incurred during t#e mont#. "#is s!stem as .ell as reduce t#e e-tensi/e paper .or, in t#e present s!stem. *t .ill ma,e t#e s!stem more /ersatile and user friendl!. "#e pro$ect contain45 One file for recording of num er of cassettes CD<s and D@D<s of different categor! purc#ased during t#e mont#. 3e maintain anot#er file for total sales during t#e mont#. A file for e-penses incurred during t#e !ear for e-ample Salar! to .or,er, 'lectricit! ills, "elep#one ills, miscellaneous e-penses.

S?STEM ANA3?SIS

S?STEM ANA3?SIS
"#e Pro$ect ;%A&AG'%'&" O( %)S*C SHOP? ( A Pro$ect for ,eeping all t#e in/entor!, sale, purc#ase and mont#l! e-penses) is asicall! merger of t.o concepts first is ,eeping t#e stoc, in t#e store and calculate t#e dail! sale and purc#ase of cassettes, CD and D@D. "#is also calculates #o. muc# ot#er e-pense is earded ! t#e organi0ation. "#e present s!stem does t#is .or, in manual asis. So it ecomes impractical to adopt a s!stem t#at ma! do a.a! .it# all t#e difficulties of e-isting s!stem. "#e s!stem .ill ecome more attracti/e and useful ! computeri0ing. @arious steps are to e follo.ed for t#e de/elopment of suc# as stud! of o $ecti/e, ,no.ledge of e-isting s!stem and its /arious constraints and to point out some of remedies of ma,ing t#e s!stem a success.

PRE3IMINAR? IN'ESTIGATION
After initial selection of t#e topic of %anagement of music s#op for t#e pro$ect .or,, * made in/estigation regarding t#e e-isting manual s!stem. *n order to gat#er t#e information t#ere are /arious met#od li,e45 Sampling Searc#ing Auestioning *nter/ie.ing

* used t#e met#od of 6uestioning and inter/ie.ing. * met t#e staff of t#e organi0ation. * get t#e ledgers in .#ic# t#e! maintain t#e records. * as,ed some 6uestion regarding t#eir .or,. * am also contact to t#e Selling staff .#ic# ma,ing ill. Of t#e course sampling .as also done to c#ec, t#e accurac! of final report ! ta,ing organi0ation data for particular mont#.

E@ISTING S?STEM
"#e present s!stem is not muc# efficient as t#e .#ole $o of report preparation is carried out manuall!. Lots of registers are maintained containing all t#e past !ears records and information. *ts maintenance is 6uite difficult. Separate registers are prepared for maintaining t#e in/entor!, salar! and ot#er e-penses records. "#e data t#us maintained on different registers is not distri uted in a good .a!. Searc#ing of a particular record re6uires searc#ing it in a register .#ere a particular entr! ma! e found out and t#en t#at particular record is searc#ed t#us ma,ing it more tedious. '/en .#en t#e c#anges are to e made , it re6uires finding all t#e entries for a particular record and t#en ma,ing in all t#e registers, t#ere ma! arises c#ances of inconsistencies. %oreo/er it ma! also lead to duplication of .or,. %anuall! it is difficult to compute in/entor! and salar! for a num er of emplo!ees. An emplo!ee .ants to ,no. a out #is salar! and deduction for t#e specified time. . %anuall!, one can compute in/entor! ut often contains errors. *n t#e nuts#ell, it is not possi le to spend a lot of time in maintaining ul,! register for record of in/entor! data ecause it is time consuming as .ell as mone! consuming and also t#e manual s!stem is not /er! fast. "#e transactions are record in t#e register in t#e follo.ing manner4 5

Cassette &ame

Cassette *d

&um er of Copies

Auantit!

Per )nit Price

Date of 'ntr!

3IMITATIONS OF E@ISTING S?STEM


Alt#oug# t#e present s!stem appears to e .or,ing ade6uatel!, t#ere are possi ilities of ma,ing it more accurate, relia le, efficient, effecti/e and economical. @arious pro lems .#ic# e-isting s!stem faces are45 'ntire procedure is too muc# lengt#! and complicated. Dependa ilit! of more t#an one person. "ime factor can not e denied as an! organi0ation can ta,e 6uic, decision .it# reports getting prepared in less time. As .#ole $o is carried out manuall! t#ere is large scope of errors. "#e s!stem is less relia le. *t is not eas! to modif! s!stem as per closing need. "#e cost of manuall! maintaining t#e records is #ig#er compared to cost in doing t#e same .or, ! a computer. +eport cannot e generated easil! .#en re6uired. *t re6uires a lot of efforts.

RECOMMEN*E* S?STEM
"#e computer ased s!stem s#ould e recommended to o/ercome t#e pro lem ecause4 2! increasing t#e staff, t#e organi0ation #as to spend a lot of e-tra mone! for gi/ing salar! and ot#er facilities to its emplo!ees, .#ic# act as an e-tra urden on it. *f ser/ices of some soft.are consultanc! are #ired t#ere .ill e loss of secrec! and man! ot#er /ital information<s. *f computer ased s!stem is installed in organi0ation, man! of t#e enefits ac#ie/ed .ill o/er come t#e cost of installing it.

FEASIBILITY STUDY AND PROPOSED OBJECTIVE

INTRO*UCTION

After ma,ing an initial in/estigation, feasi ilit! stud! is carried to c#ec, t#e .or, a ilit! of t#e s!stem. (easi ilit! stud! is testing of t#e proposed s!stem according to its a ilit! impact on t#e on t#e organi0ations a ilit! to meet user needs and effecti/e use of t#e resources. *t is t#e most fre6uentl! used met#od form e/aluating t#e effecti/eness of a candidate s!stem. *t is commonl! ,no.n as cost5 enefit anal!sis. "#e procedure is to determine t#e enefits and sa/ings t#at are e-pected from a candidate s!stem and compare t#em .it# costs. *f enefits out.eig# costs, t#en t#e decision is made to design and implement t#e s!stem. Ot#er.ise, furt#er $ustifications of alterations in t#e proposed s!stem are made. "o determine t#e economic feasi ilit! of our pro$ect B%usic StoreB, .e first consider t#e turn o/er of t#e compan!. "#en t#e cost re6uirement to de/elop t#e ne. s!stem and profits to e o tained from t#e s!stem are estimated. After performing cost5 enefits anal!sis it is concluded t#at t#e proposed s!stem is economicall! feasi le.

T?PE OF FEASIBI3T? STU*?

Tec2nica" Fea-i$i"ity45 *f a ne. tec#nolog! is re6uired .#at stands no. #ere in front of num er of enefits li,e ser/ices. &um er of .astage of papers, etter management of document in t#e consultanc! and attracting num er of more mem er t#at compensate t#e mone! spent on soft.are. Ti#e Fea-i$i"ity45 "ime is one of t#e (easi ilit! for t#e pro$ect report as it is to e su mitted in limited time. Socia" Fea-i$i"ity45 insecurit! of $o *n t#e proposed s!stem people feel ! computer.

Financia" Fea-i$i"ity45 "#e financial (easi ilit! is in t#e limit on e-penditure. "#e organi0ation can #a/e financial limit t#at t#e! are going to spend for t#e s!stem. Be2a8iora" Fea-i$i"ity:A People are in#erentl! resistant to c#ange and computers #a/e een ,no.n to facilitate t#is c#ange. An estimate s#ould e made of #o. strong a reaction t#e user staff is li,el! to #a/e to.ard t#e de/elopment of t#e computeri0ed s!stem. *t is commonl! ,no.ledge t#at computer installations #a/e somet#ing to

do .it# turno/ers, transfers, retaining and c#anges in emplo!ee $o status. "#erefore, it is understanda le t#at t#e introduction of a candidate s!stem re6uires special effort to educate and train t#e staff on ne. .a!s of conduction usiness. So train t#e staff. "#e culmination of feasi ilit! stud! is a feasi ilit! report. Appro/al of t#e report results in initiation of t#e ne. s!stem.

OB ECTI'E OF THE PROPOSE* S?STEM


T2e co#+uter $a-ed -y-te# ai#- at:A "o reduce t#e paper .or, in present s!stem. "o increase relia ilit! and speed. "o design a s!stem .#ic# is /er! close to actual processing and ensures #ig# degree of accurac!. "o sa/e t#e e-cess time i.e. spend on searc#ing a record from t#e ul,! register. 'as! to modif! t#e s!stem as per c#anging needs. +eport can e generated easil! .#en re6uired.

SCOPE45 "#e scope of s!stem .it# in t#e maintaining t#e stoc,, and e-pense paid ! organi0ation. "#e s!stem s#ould e suc# t#at if in future it re6uire an! modification t#at s#ould e done .it# minimum efforts.

PROB3EM *EFINITION
*n t#is pro$ect our main aim is to computeri0ed /arious component of in/entor! and management of music s#op. 3#ic# are functioning manuall! at presentC "#is .ill maintain t#e information in t#e form of file. *t .ill #elp t#e user to generate records in lesser time and more effecti/el!. *t also #elps t#e o.ner in efficient .or,ing of different area of t#eir .or,s. "#e o $ecti/e of t#e pro$ect is to computeri0e t#e s!stem of music s#op. *n t#is pro$ect it .ill ,eeps one file for recording of num er Cassettes, CD<s and D@D<s of different categor! purc#ased during t#e mont#. 3e maintain anot#er file for total items sold during t#e mont#. As .ell as it also maintain #o. muc# e-pense incurred during t#e mont#. "#is s!stem as .ell as reduce t#e e-tensi/e paper .or, in t#e present s!stem. *t .ill ma,e t#e s!stem more /ersatile and user friendl!. "#e pro$ect contain45 One file for recording of num er of cassettes CD<s and D@D<s of different categor! purc#ased during t#e mont#. 3e maintain anot#er file for total sales during t#e mont#. A file for e-penses incurred during t#e !ear for e-ample Salar! to .or,er, 'lectricit! ills, "elep#one ills, miscellaneous e-penses.

S?STEM *ESIGN

INTRO*UCTION

S!stem design is a creati/e as .ell as a tec#nical acti/it!. "#e design of an information s!stem t#e details t#at state #o. a s!stem .ill meet t#e re6uirements identified during s!stem anal!sis. S!stem specialist often refers to t#is stage as logical design in contrast to t#e process of de/eloping program soft.are, .#ic# is referred as p#!sical design. "#is s!stem design also descri es t#e data to e input, calculated or stored, indi/idual data items and calculation procedure tell #o. to process t#e data and produce output. Designers are responsi le for pro/iding programmers .it# complete and clearl! outlined soft.are specifications. As programming starts, designers are a/aila le to ans.er 6uestions, clarif! fu00! areas and #andle pro lem t#at confront t#e programmers .#en using t#e design specification.

OB ECTI'E OF *ESIGN
"o reduce t#e e-tensi/e paper .or, in t#e present manual s!stem. "o pro/ide accurac! to maintaining t#e in/entor!. "o speed up t#e process of c#ec,ing t#e stoc, and different categor! in stoc, as compared to e-isting s!stem. "o pro/ide an economical met#od of reducing cost. *n manual s!stem in/ention of man is more t#an in computeri0ed s!stem. "o a/oid errors in#erent in t#e manual .or, and #ence ma,e t#e output consistent and correct. "o ma,e t#e s!stem completel! menu dri/en and #ence user friendl!. "o increase relia ilit! and speed. "o sa/e t#e e-cess time i.e. spends on searc#ing a record from t#e ul,! register. 'as! to modif! t#e s!stem as per c#anging needs. +eport can e generated easil! .#en re6uired.

HAR*BARE . SOFTBARE RECUIRMENTS


"#e DC< program runs .it# P.C or a compati le microcomputer #a/ing 9EF 72 or more +A% to run under .indo.s >G as an operating s!stem. "#e s!stem s#ould e e6uipped .it# one or more (DD, one #ard dis,. A printer is necessar! as paper output is re6uired. HAR*BARE CONFIGURATION One P.C .it# FH:72 main memor! Hard dis, H:%2 One (lopp! dis, dri/e (at least 8=I19) %onitor (colored, monoc#rome) One dot matri- printer of I89 column SOFTBARE RECUIREMENTS Dos operating s!stem C Language

OUT3INE *ESIGN OF INPUT/ OUTPUT . FI3E *ESIGN


a) INPUT *ESIGN OF PROPOSE* S?STEM Opening stoc, at t#e eginning of mont# of t#ree different t!pes of Cassettes and CD<s. Purc#ase of t#ree different categories of Cassettes and CD<s during t#e mont#. "otal sales during t#e mont# of t#ree different categories of Cassettes and CD<s. "otal e-penses for e-ample Salar! to .or,ers, 'lectricit! ills, "elep#one ills, miscellaneous e-penses incurred during t#e mont#. Add &e. Cassette Date4 Cassette Code J

Cassette &ame 4 Compan! &ame 4 "otal Cassettes 4 *ndi/idual Cassette price 4 'nter t#e Date 4

OUTPUT *ESIGN OF PROPOSE* S?STEM Profit during t#e mont# of all t#e t#ree different categories of Categories of Cassettes and CD<s. Closing stoc, l!ing of t#ree different categories of Cassettes and CD<s .it# t#e s#op at t#e end of t#e mont#. List of cassettes in music s#op Date 4

Code J

Cassette &ame

Compan! &ame

At!. Price

"otal

"otal price of Cassettes is 4

FI3E *ESIGN
(ile design is t#e first of t#e t#ree design acti/ities t#at are conducted during s!stem de/elopment. "#e impact of (ile structure of data structure on program structure and procedural comple-it! causes data design to #a/e a profound influence in s!stem 6ualit!. %an! files are used in t#is pro$ect .#ic# is as follo.s45
I.

CASSETTE% *AT "#e cassette.dat data ase is to e created on t#e asis of information collection from t#e cassette. *t s#ould contain information related to4 (i) (ii) (iii) (i/) (/) (/i) Cassette code 5I5 (ilm, 95&onfilm, 85+eligious "itle of t#e cassette Cassette Compan! "otal cassette purc#ased Date of purc#ase Price of cassette

7%

TBA3% *AT (i) (ii) (iii) (i/) Cassette code 5I5(ilm, 95&onfilm, 85+eligious "otal num er of cassettes in alance 2alance Date 2alance Date

8.

PERSON% *AT (i) (ii) (iii) (i/) (/) Cassette code 5I5film, 95nonfilm, 85religious Cassette Purc#ased Person &ame Person Address &um er of cassettes purc#ased "o store t#e s!stem date1 purc#ase date

H.

OTHER% *AT
(i)

Ot#er e-pense code I 5 Salar! to .or,ers 9 5 'lectricit! ill 8 5 "elep#one ills H 5 %iscellaneous e-penses &ature of e-pense description '-pense date '-pense amount and so on.

(ii) (iii) (i/)

SE3ECTION OF 3ANGUAGE
After anal!sis and designing t#e s!stem no. it is necessar! to select a language for t#e purpose of coding. "#ere are man! languages a/aila le for coding li,e Ja/a, (o-pro, Pascal etc ut * prefer DC< language for m! pro$ect .or,, ecause it is simple language for coding and eas! to implement. "#e ot#er reason to c#oose DC< language for m! pro$ect .or, is ecause * stud! t#is language in m! college as a part of s!lla us.

INTO*UCTION TO DCE 3ANGUAGE


C is a programming language de/eloped at A"= "<s 2ell La oratories of )SA in I>K9. *t .as .ritten and de/eloped ! Dennis +itc#ie and 7ernig#an. "#e! in#erited t#e features of D2< and 2PCL (2asic Com ined Programming Language), added some of #is o.n and de/eloped C. *n t#e late se/enties C egan to replace t#e more familiar languages of t#at time li,e PL1, ALGOL etc. Possi l! .#! C seems so popular is ecause it is relia le, simple and eas! to use. "#e first line of t#is pro$ect starts .it# t#e follo.ing sentence4 #include <stdio.h> *t is not part of a function od! and doesn<t end .it# a semicolon, as program statements must. *nstead, it starts .it# J (#as#) sign. *t<s called a preprocessor directi/e. A preprocessor directi/e is an instruction to t#e compiler itself. "#e preprocessor directi/e #include tells t#e compiler to insert anot#er file into our source file. "#e preprocessor offer se/eral features called preprocessor directi/es. 'ac# of t#ese preprocessor directi/es egins .it# a J SL%2OL. "#e directi/es can e placed an!.#ere in a program ut are most often placed at t#e eginning of a program, efore main(), or efore t#e eginning of a particular function. "#e preprocessor directi/es are4 %acro e-pansion (ile inclusion Conditional Compilation %iscellaneous directi/es

3#en .e compile t#e program, efore t#e source code passes to t#e compiler it is e-amined ! t#e C preprocessor for an! macro definitions. 3#en it sees t#e #define directi/e, it goes t#roug# t#e entire program in searc# of t#e macro templatesM .#ere/er it finds one, it replaces t#e macro template .it# t#e appropriate macro e-pansion. Onl! after t#is procedure #as een completed is t#e program #anded o/er to t#e compiler. *n our e-ample it is t#e stdio.h (standard input output), .#ic# contains t#e input and output functions, li,e scanf, gets, fopen, fclose, etc. 3e .ill see t#e input output functions in t#e ne-t section. "#e dos.h #as t#e date and time functions. "#e getdate() gets t#e DOS s!stem date. 3e #a/e used in t#e pro$ect to get t#e date of transaction. "#ese files (stdio.h, dos.h) are called #eader files. *n C programming it is customar! to use capital letters for macro template. "#is ma,es it eas! for programmers to pic, out all t#e macro templates .#en reading t#roug# t#e program.

T?PES OF IFO:A Dennis +itc#ie .anted C to remain compact. *n ,eeping .it# t#is intention #e deli eratel! omitted e/er!t#ing related .it# *nput1Output (*1O) from #is definition of t#e language. "#us, C simpl! #as no pro/ision for recei/ing data from an! of t#e input de/ices (li,e sa! ,e! oard, flopp! etc.). "#oug# C #as no pro/ision for *1O, it of course #as to e dealt .it# at some point or t#e ot#er. "#ere is not muc# use .riting a program t#at spends all it<s time telling itself a secret. 'ac# Operating S!stem #as its o.n facilit! for inputting and outputting data from and to t#e files and de/ices. *t<s a simple matter for a s!stem programmer to .rite a fe. small programs t#at .ould lin, t#e C compiler for particular Operating s!stem<s *1O facilities. *i-0 IFO ,unction-:A So far .e #a/e discussed a out t#e console i1o functions. *n t#is t#e data .e are getting cannot e stored in a permanent storage de/ice. (or t#at .e need t#is dis, i1o functions. *n our pro$ect .e are going to store t#e information t#at .e are getting from t#e user. "#e details of t#e customer name, account num er, fat#er name, address, etc. Dis, *1O operations are performed on entities called files. "#ere are a large num er of standard li rar! functions a/aila le for performing Dis, of file *1O. "#ese functions can e roadl! di/ided into t.o categories4

Hig# le/el file *1O functions (also called standard *1O or stream *1O functions)Lo. le/el file *1O functions (also called s!stem *1O functions) Hig# le/el dis, *1O functions are more commonl! used in C programs, since t#e! are easier to use t#an lo. le/el dis, *1O functions. "#ere is one asic difference et.een #ig# le/el and lo. le/el dis, *1O functions. Hig# le/el dis, *1O functions do t#eir o.n uffer management, .#ereas in lo. le/el dis, *1O functions, uffer management #as to e done e-plicitl! ! t#e programmer. 3e .ill ta,e up a detailed discussion of .#at is a uffer, .#o is it managed in #ig# le/el and lo. le/el dis, *1O functions .#en .e ecome familiar .it# ot# t!pes of functions. At t#is stage .e can $ust sa! t#at lo. dis, le/el *1O is #arder to program t#an #ig# le/el dis, *1O. Ho.e/er, lo. le/el dis, *1O is more efficient ot# in terms of operation and t#e amount of memor! used ! t#e program.

TESTING

TESTING
INTRO*UCTION:A "#e s!stem testing is to ensure t#at all in/isi le programs are .or,ing as e-pected, t#at programs lin, toget#er to meet t#e re6uirement specified and to ensure t#at t#e computers s!stem and associated clerical and ot#er procedure .or, toget#er. "#e initial p#ase of s!stem testing is a responsi ilit! of t#e anal!0ed .#o determine .#at conditions are to e tested, generated test data, produce a sc#edule of e-pected results, runs t#e tests and compares t#e computers procedure results .it# t#e e-pected results. "#e anal!0ed ma! also to in/ol/e procedure testing. 3#en t#e anal!0ed is satisfied t#at t#e s!stem is .or,ing properl!, #e #ands it o/er to user for testing. "#e importance of s!stem testing ! t#e user must e stressed. )ltimatel! it is t#e user .#ic# must /erif! t#e s!stem and gi/e t#e go a#ead. Paralleled running is regarded as t#e final p#ase of s!stem testing seems t#e paralleled operation of t.o s!stems is /er! demanding in term of user resources, it s#ould e em ar,ed on onl! if t#e user is satisfied .it# t#e result of testing N it s#ould not e started if pro lems are ,no.n to e-it.

OB ECTI'E OF TESTING:A "o c#ec, t#e proper functioning of /arious modules of t#e s!stem indi/iduall! and to correct errors if an!. "o c#ec, and test t#e proper in/estigation of all indi/iduall! tested modules so as esta lis# proper intention. "o c#ec, .#et#er all t#e data fields in t#e file are consist, not T?PE OF TESTING:A I. MO*U3E TESTING:A 'ac# s!stem module .as tested indi/iduall! *nput Output format &ecessar! correction

*n t#is pro$ect of %anagement of %usic s#op * #a/e c#ec,ed all t#e modules and after gi/ing /alue find e-act /alues going to data ase ta le. * #a/e also tested t#e processed result of eac# module. 9. IN'ESTIGATION TESTING:A

*n t#is, man! unit5tested modules are com ined into su s!stem, .#ic# are t#en tested. "#e goal is to see if t#e modules can e integrated properl!. Hence, t#e emp#ases are in testing interfaces et.een modules. 8. S?STEM TESTING:A S!stem testing after integration of all modules. C#ec,ing t#e module interaction and collection .or,ing.

&ecessar! corrections. TESTING:A "#e first step in s!stem testing is to prepare to plan t#at .ill test all aspects of t#e s!stem in a .a! t#at promotes its credi ilit! among potential user. I. Programmers usuall! do a etter $o in unit testing ecause t#e! are e-pected to document and report on t#e met#od and e-tent of t#eir testing. 9. )sers are in/ol/ed ,.#ic# means communication is impro/ed et.een user and designer group. 8. Programmers are in/ol/ed .#en t#e! ecome a.are of user pro lems and e-pectation. "#e user also ecomes more a.are of t#e comple-it! of programming and testing. Planning for user acceptance testing calls for t#e anal!st and t#e user to agree on t#e condition for t#e test .%an! of t#ese conditions ma! e deri/ed from t#e test plan ."#e starts and termination dates for t#e test s#ould also e specified in ad/ance. As eac# program is coded, test data are prepared and documents to ensure t#at all aspects of t#e program are properl! tested. )ser training is designed to prepare t#e user for testing and con/erting t#e s!stem .)ser training is designed to prepare t#e user for testing and con/erting t#e s!stem. )ser in/ol/ement and training ta,e place parallel .it# programming .All program #a/e to e compiled1assem led for testing .2efore t#is #o.e/er ,a complete program description s#ould e a/aila le . *ncluded is t#e purpose of t#e program, its uses ,t#e programmer .#o prepared it, and t#e amount of computer time it ta,es to run it .

Programs and s!stem flo.c#arts of t#e pro$ect s#ould e a/aila le for reference. During t#e test plan stage ,all operational documents are finali0ed, including copies of t#e operational formats re6uired ! t#e candidate s!stem. After t#e test plan #as een de/eloped ,s!stem testing egins ! testing program modules separatel! ,follo.ed ! testing ; undled? modules as a unit .A program module ma! function perfectl! in isolation ut fail .#en interfaced .it# ot#er modules. "#e approac# is to test eac# entit! .it# successi/el! larger ones, up to t#e s!stem test le/el. "#e purpose of t#e s!stem testing is to identif! and correct errors in t#e candidate s!stem. As important as t#is p#ase is, it is one t#at is fre6uentl! compromised.

*%PL'%'&"A"*O&

IMP3EMENTATION
INTORO*UCTION:A *mplementation is t#e process of putting t#e s!stem into operational design into its operational form .*mplementation simpl! means con/erting t#e s!stem designed into suc# a form t#at gi/es t#e desired output to t#e user. *mplementation includes t#e follo.ing steps45 I. Con8er-ion 45 *t is a process t#at deals .it# con/erting t#e data in files into computer compati le files. 9. U-er trainin! 45 )ser training is t#e process of training t#e user staff. *t reduces t#e c#ance of errors .#ile t#e s!stem is in operation. 8. I#+"e#entation o, 2ard1are and -o,t1are45 *t in/ol/es selecting t#e #ard.are and soft.are re6uired for t#e operation of t#e s!stem. After implementation of t#e s!stem t#e ne-t step is Post *mplementation +e/ie. .*n t#is step t#e anal!st re/ie.s t#e performance of ne. s!stem implemented .*f an! discrepanc! is found t#en c#anges are made in s!stem so as to correct t#e errors

.*f t#e results are satisfactor! t#en t#e parallel run of t#e t.o s!stems is stopped i.e. t#e .or, pre/ious s!stem is stopped. "#e term implementation #as a different meaning .*t simpl! means process of con/erting a ne. or a re/ised s!stem design into an operational one. "#ere are t#ree t!pes of *mplementation4 *mplementation of a computer s!stem to replace a manual s!stem. 9. *mplementation of a ne. computer s!stem to replace an e-isting one. 8. *mplementation of a modified application to replace an e-isting one, using t#e same computer. After t#e completion of s!stem design, t#e s!stem is read! to implement. A s!stem design #as no significance, until it is implementedM * implement m! designed s!stem on PC<s of center .#ere * do m! Pro$ect. During t#e implementation process, t#e program .#ere de ugged and tested. Due to lac, of time * could not do as muc# en#ancement as * .ant to do in m! program I.

SOURCE CODE

/* Declaration of header files #include<process.h> #include<string.h> #include<stdio.h> #include<ctype.h> #include<conio.h> #include<dos.h> #include<stdlib.h> #include<graphics.h> typedef char option[15]; const int !" # 1$% &!' # 1$; int scan; int ascii; option a[]# ( )*e+&ass,ur)% )'ist!f,urchase)% )Daily&ass-ales)% )-ales eport)% ).dd!ther/0p)% )!ther/0p ep)% )&losing-toc1)% )2onthly,rofit)% )/0it)

*/

3;

/* 4unction to utili5e the 6unus and graphics */ 7oid 2nor6al7ideo8int 0%int y%char *str9; 7oid 2re7erse7ideo8int 0%int y%char *str9; 7oid 2bo08int 01%int y1%int 0:%int y:9; char 26enu89; 7oid 2control;6enu89; 7oid 2help87oid9; int i%done; 7oid -line;hor8int% int% int% char9; 7oid -line;7er8int% int% int% char9; 7oid -bo08int% int% int% int% char9;

7oid &ne+;cassettes87oid9; 7oid &add;to;file8int% char t;&ass;na6e[<$]% char t;&o6p;na6e[<$]% int% int% int% int% float9; 7oid &display;list87oid9; 7oid &delete;cassette8int9; int &last;cas;code87oid9; char *&return;na6e8int9; char *&return;address8int9; int &recordno8int9; 7oid &display8int9; /* &assette structure to create cassette.dat data file */ struct cassettes ( int cas;code; char &ass;na6e[<$]; char &o6p;na6e[<$]; int tot;cassette; int dd% 66% yy; float price; 3 ini; /* 4unction contains the balance cassettes infor6ation */ 7oid =add;to;file8int% int% int% int% int% float9; 7oid =balance;cassette87oid9; 7oid =delete;balance8int9; int =gi7e;balance8int9; 7oid =>pdate;balance8int% int% int % int % int% float9; float =return;price8int9; 7oid =6onthly;profit87oid9; /* =alance structure to create ?bal.dat data file struct balance ( int cas;code; int cas;bal; */

int dd; int 66; int yy; float price; 3 bal; /* 4unction contains the cassettes sales infor6ation */ 7oid .ne+;account87oid9; 7oid .close;account87oid9; 7oid .clear8int% int9; 7oid .Display;sales87oid9; int .last;cas;code87oid9; float .sales;status8int 61% int y1% float cod1% float cod:% float cod<9; 7oid .add;to;file8int% char t,;na6e[<$]% char t,;address[<$]%int% int% int% int9; 7oid .delete;account8int9; /* &lass contains the custo6ers daily cassette transaction entry */ struct account ( int cas;code; char ,;na6e[<$]; char ,;address[<$]; int *o;cass; int dd% 66% yy; 3 acc; /* 4unction to display other e0pense screen li1e salary% electricity bill% telephone and 6iscellaneous e0pences */ 7oid !/0pense;other87oid9; 7oid !add;to;file8int% char t*at;/0pen[<$]% int% int% int% float9; 7oid !display;e0pense87oid9; float !other;status8int 61% int y19; /* !ther e0penses structure to create other.dat data file */

struct other ( int !;code; /* ?he other e0pence code as @ 1 A -alary to +or1ers% : A /lectricity bill < A ?elephone bills B A 2iscellaneous e0penses */ char *at;/0pen[<$]; int dd% 66% yy; float a6ount; 3 oth; /* 4unction to displays all the 6enu pro6pt 6essages fro6 the pointer array of option a[] */ 7oid 2nor6al7ideo8int 0%int y%char *str9 ( goto0y80%y9; cprintf8)Cs)%str9; 3 /* 4unction to 6o7e the cursor on the 6enu pro6pt +ith a re7erse 7ideo color */ 7oid 2re7erse7ideo8int 0%int y%char *str9 ( te0tcolor85D1B<9; te0tbac1ground8"EF?/9; goto0y80%y9; cprintf8)Cs)%str9; te0tcolor8G //*9; te0tbac1ground8='.&H9; 3 /* 4unctioin to dra+ bo0 */ 7oid 2bo08int 01%int y1%int 0:%int y:9 ( int col% ro+; for8col#01;col<0:;colDD9 ( goto0y8col%y19; cprintf8)Cc)%1IJ9; goto0y8col%y:9;

cprintf8)Cc)%1IJ9;

for8ro+#y1;ro+<y:;ro+DD9 ( goto0y801%ro+9; cprintf8)Cc)%1KI9; goto0y80:%ro+9; cprintf8)Cc)%1KI9; 3 goto0y801%y19; cprintf8)Cc)%:1L9; goto0y801%y:9; cprintf8)Cc)%1I:9; goto0y80:%y19; cprintf8)Cc)%1I19; goto0y80:%y:9; cprintf8)Cc)%:1K9; 3 /* Displaying the 6ain 6enu of 6usic syste6 char 26enu89 ( clrscr89; te0tcolor8::9; 2bo08:$% J% J5% :$9; 2bo081L% B% JK% ::9; te0tcolor85D1B<9; goto0y8<J% 59; te0tbac1ground8='>/9; cprintf8)2 > - F &)9; te0tbac1ground8='.&H9; te0tcolor8::9; for8i # 1; i < I; iDD9 2nor6al7ideo8<:% iD1$% a[i]9; 2re7erse7ideo8<:% 1$% a[$]9; i # done # $; do ( int 1ey # getch89; s+itch 81ey9 */

case $$@ 1ey # getch89; s+itch 81ey9 ( case K:@ 2nor6al7ideo8<:% iD1$%

a[i]9;

a[i]9;

iAA; if 8i ## A19 i # L; 2re7erse7ideo8<:%iD1$% brea1; case L$@ 2nor6al7ideo8<:% iD1$% iDD; if 8i ## I9 i # $; 2re7erse7ideo8<:% iD1$%

a[i]9;

a[i]9; 3 brea1; case 1<@ done # 1; 3 3 +hile 8Mdone9; return8iDBI9;

brea1;

/* ?he function 6ain;6enu89 is used to display the 6ain 6enu syste6 */ 7oid 2control;6enu89 ( char choice; do ( choice # 26enu89;

clrscr89; s+itch 8choice9 ( case N1N@ 2bo08<% 1% K5% :B9; 2bo085% :% K<% :<9; &ne+;cassettes89; brea1; case N:N@ 2bo08<% 1% K5% :B9; 2bo085% :% K<% :<9; &display;list89; brea1; case N<N@ 2bo08<% 1% K5% :B9; 2bo085% :% K<% :<9;

.ne+;account89; brea1; case NBN@ 2bo08<% 1% K5% :B9; 2bo085% :% K<% :<9; .Display;sales89; brea1; case N5N@ 2bo08<% 1% K5% :B9; 2bo085% :% K<% :<9; !/0pense;other89; brea1; case NJN@ 2bo08<% 1% K5% :B9; 2bo085% :% K<% :<9; goto0y81$%1$9; !display;e0pense89;

brea1; case NKN@ 2bo08<% 1% K5% :B9; 2bo085% :% K<% :<9; goto0y81$%1$9; =balance;cassette89; brea1; case NLN @ 2bo08<% 1% K5% :B9; 2bo085% :% K<% :<9; goto0y81$%1$9; =6onthly;profit89; brea1; case NIN @e0it8$9;

3 3 +hile 8choice M# L9; 3 /* 4unction to dra+ hori5ontal line for 6enu*/ 7oid -line;hor8int colu6n1% int colu6n:% int ro+% char c9 ( for 8colu6n1#1;colu6n1<#colu6n:; colu6n1DD9 ( goto0y8colu6n1% ro+9; printf8)Cc)% c9; 3 3 /* 4unction to dra+ 7ertical line for 6enu */ 7oid -line;7er8int ro+1% int ro+:% int colu6n% char c9 ( for 8ro+1#1; ro+1 <# ro+:; ro+1DD9 ( goto0y8colu6n% ro+19; printf8)Cc)% c9; 3 3 /* 4unction for dra+ing bo0es for 6enu */ 7oid -bo08int colu6n1% int ro+1% int colu6n:% int ro+:% char c9 (

char ch # :1L; char c1% c:% c<% cB; char l1 # 1IJ% l: # 1KI; if 8c ## ch9 ( c1 # :1L; c: # 1I1; c< # :1K; cB # :1K; l1 # 1IJ; l: # 1KI; 3 else ( c1 # c; c: # c; c< # c; cB # c; l1 # c; c: # c; 3 goto0y8colu6n1% ro+19; printf8)Cc)% c19; goto0y8colu6n:% ro+19; printf8)Cc)% c:9; goto0y8colu6n1% ro+:9; printf8)Cc)% c<9; goto0y8colu6n:% ro+:9; printf8)Cc)% cB9; colu6n1DD; colu6n:AA; -line;hor8colu6n1% colu6n:% ro+1% l19; -line;hor8colu6n1% colu6n:% ro+:% l19; colu6n1AA; colu6n:DD; ro+1DD; ro+:AA; -line;7er8ro+1% ro+:% colu6n1% l:9; -line;7er8ro+1% ro+:% colu6n:% l:9; 3 /* 4unction to display help about this proOect */

7oid 2help87oid9 ( clrscr89; setb1color8K9; sette0tstyle8K%E! FP;DF %59; outte0t0y8K$%1$%)"elco6e to 2usic -hop)9; sette0tstyle8:%E! FP;DF %59; outte0t0y8J$%L$% )?his proOect your can 1eep record of daily 6usic cassettes )9; delay8:9; outte0t0y8J$%11$% )transaction. ?his progra6 is capable of holding any no. of cassettes.)9; delay8:9; outte0t0y8J$%1B$% )AFn first option you can enter ne+ cassette infor6ation)9; delay8:9; outte0t0y8J$%1K$% )AFn second option you can see the list of all the cassettes)9; delay8:9; outte0t0y8J$%:$$%)AFn third option you can sales the cassettes according to de6and)9; delay8:9; outte0t0y8J$%:<$% )A?hrough fourth optiion you can see the sales status)9; delay8:9; outte0t0y8J$%:J$% )AFn the fifth option enter your daily other e0penses)9; delay8:9; outte0t0y8J$%:I$% )AFn si0th option you can ta1e reports of other e0penses)9; delay8:9; outte0t0y8J$%<:$%)AFn se7enth option you can ta1e 6onthly closing balance report)9; delay8:9; outte0t0y8J$%<5$%)AFn eighth option you can ta1e 6onthly profit report)9; delay8:9; outte0t0y8J$%<L$% )*oteA@ /nter only 7alid data +hile you 6aintain this pac1age)9; delay8:9; outte0t0y8J$%B1$% )A.nd last option is Quit 8/0it 4ro6 2usic "indo+9)9;

delay8:9; sette0tstyle8K%E! FP;DF %<9; outte0t0y8K$%B<$%),ress any 1ey to continue...)9; getch89; 3 /* 4unction for displaying a cassette infor6ation +hen reRuired */ 7oid &display8int t;cas;code9 ( 4F'/ *file; file # fopen8)cassettes.dat)% )r)9; re+ind8file9; +hile 8fread8Sini% si5eof8ini9% 1% file9##19 ( if 8t;cas;code ## ini.cas;code9 ( goto0y8L% 59; printf8).ccount no. Cd)% ini.cas;code9; goto0y81$% L9; printf8)*a6e @ )9; puts8ini.&ass;na6e9; goto0y81$% I9; printf8)&o6any *a6e @ )9; puts8ini.&o6p;na6e9; goto0y81$% 1$9; printf8),rice @ C$.:f )% ini.price9; brea1; 3 3 /* 4unction to find is their records in cassette.dat file or not */ 3

fclose8file9;

int &last;cas;code87oid9 ( int tcount # $; int count # $; 4F'/ *file; file # fopen8)cassettes.dat)% )r)9; re+ind8file9; /* 4ounds the last account no. */ +hile 8fread8Sini% si5eof8ini9% 1% file9##19 ( tcount # ini.cas;code; count # count D tcount; 3 fclose8file9; return count; 3 /* 4unction to find is their records in file person.dat or not */ int .last;cas;code87oid9 ( int tcount # $; int count # $; 4F'/ *file; file # fopen8),erson.dat)% )r)9; re+ind8file9; +hile 8fread8Sacc% si5eof8acc9% 1% file9##19 ( tcount # acc.cas;code; count # count D tcount; 3 fclose8file9; return count;

/* 4unction for returning balance cassette. ?his function returns the balance cassette on code +ise

to 1no+ the current balance fro6 )?bal.dat) data file. */ int =gi7e;balance8int t;cas;code9 ( int t;balance # $; 4F'/ *file; file # fopen8)?bal.dat)% )r)9; re+ind8file9; +hile 8fread8Sbal% si5eof8bal9% 1% file9##19 ( if 8bal.cas;code ## t;cas;code9 ( t;balance # bal.cas;bal; brea1; 3 3 fclose8file9; return t;balance; 3 /* 4unction to return the cassette price */ float =return;price8int t;cas;code9 ( float t;price # $.$; 4F'/ *file; file # fopen8)?bal.dat)% )r)9; re+ind8file9; /* Gi7es the last balance of an indi7idual account */ +hile 8fread8Sbal% si5eof8bal9% 1% file9##19 ( if 8bal.cas;code ## t;cas;code9 ( t;price # bal.price; brea1; 3 3 fclose8file9;

return t;price;

/* ?his function add;to;file89 is used to create ne+/fresh record in the data file */ 7oid &add;to;file8int t;cas;code% char t;&ass;na6e[<$]% char t;&o6p;na6e[<$]% int t;cas% int tdd% int t66% int tyy% float t;price9 ( 4F'/ *file; ini.cas;code # t;cas;code; strcpy8ini.&ass;na6e% t;&ass;na6e9; strcpy8ini.&o6p;na6e% t;&o6p;na6e9; ini.tot;cassette # t;cas; ini.dd # tdd; ini.66 # t66; ini.yy # tyy; ini.price # t;price; /* .ppends ne+ account record +ith the price into cassettes.dat data file */ file # fopen8)cassettes.dat)% )aD)9; f+rite8Sini% si5eof8ini9% 1% file9; fclose8file9;

/* ?his function add;to;file89 is used to create ne+/fresh record in the data file */ 7oid =add;to;file8int t;cas;code% int t;cas% int tdd% int t66% int tyy% float t;price9 ( 4F'/ *file; 4F'/ *te6p; int bal1 # =gi7e;balance8t;cas;code9; if 8bal1 > $9 (

file # fopen8)?bal.dat)% )r)9; te6p # fopen8)?/2,.dat)% )+)9; re+ind8file9; /* >ses a copy 6ethod to delete the cassette fro6 ?bal.dat data file */ +hile 8fread8Sbal% si5eof8bal9% 1% file9 ## 19 ( if 8bal.cas;code M# t;cas;code9 ( f+rite8Sbal% si5eof8bal9% 1% te6p9; 3 else ( bal.cas;code # t;cas;code; bal.cas;bal # t;cas D bal1; bal.dd # tdd; bal.66 # t66; bal.yy # tyy; bal.price # t;price; f+rite8Sbal% si5eof8bal9% 1% te6p9; 3 3 fclose8file9; fclose8te6p9; file # fopen8)?bal.dat)% )+)9; te6p # fopen8)?/2,.dat)% )r)9; re+ind8te6p9; /* &opy the ?/2,.dat contents into cassette.dat data file */ +hile 8fread8Sbal% si5eof8bal9% 1% te6p99 ( f+rite8Sbal% si5eof8bal9% 1% file9; 3 fclose8file9; fclose8te6p9; 3 else ( bal.cas;code # t;cas;code; bal.cas;bal # t;cas; bal.dd # tdd;

bal.66 # t66; bal.yy # tyy; bal.price # t;price; /* .ppends ne+ account record +ith the price into cassettes.dat data file file # fopen8)?bal.dat)% )aD)9; f+rite8Sbal% si5eof8bal9% 1% file9; fclose8file9; 3 3

*/

/* 4unction for deleting a account fro6 cassettes.dat file */ 7oid &delete;cassette8int t;cas;code9 ( 4F'/ *file; 4F'/ *te6p; file # fopen8)cassettes.dat)% )r)9; te6p # fopen8)?/2,.dat)% )+)9; re+ind8file9; /* >ses a copy 6ethod to delete the account fro6 cassette.dat data file */ +hile 8fread8Sini% si5eof8ini9% 1% file99 ( if 8ini.cas;code M# t;cas;code9 f+rite8Sini% si5eof8ini9% 1% file9;

fclose8file9; fclose8te6p9; file # fopen8)cassettes.dat)% )+)9; te6p # fopen8)?/2,.dat)% )r)9; re+ind8te6p9; /* &opy the ?/2,.dat contents into cassette.dat data file */ +hile 8fread8Sini% si5eof8ini9% 1% file99 (

if 8ini.cas;code M# t;cas;code9 f+rite8Sini% si5eof8ini9% 1% file9;

fclose8file9; fclose8te6p9;

/* 4unction for deleting a balance fro6 ?bal.dat file */ 7oid =delete;balance8int t;cas;code9 ( 4F'/ *file; 4F'/ *te6p; file # fopen8)?bal.dat)% )r)9; te6p # fopen8)?/2,.dat)% )+)9; re+ind8file9; /* >ses a copy 6ethod to delete the account fro6 ?bal.dat data file */ +hile 8fread8Sbal% si5eof8bal9% 1% file99 ( if 8bal.cas;code M# t;cas;code9 f+rite8Sbal% si5eof8bal9% 1% file9; 3 fclose8file9; fclose8te6p9; file # fopen8)?bal.dat)% )+)9; te6p # fopen8)?/2,.dat)% )r)9; re+ind8te6p9; /* &opy the ?/2,.dat contents into ?bal.dat data file */ +hile 8fread8Sbal% si5eof8bal9% 1% file99 ( if 8bal.cas;code M# t;cas;code9 f+rite8Sbal% si5eof8bal9% 1% file9; 3 fclose8file9; fclose8te6p9; 3

/* 4unction for add an account details of daily tranaction into person.dat file. */ 7oid .add;to;file8int t;cas;code% char t,;na6e[<$]% char t,;address[<$]%int t*o;cass% int d1% int 61% int y19 ( 4F'/ *file; acc.cas;code # t;cas;code; strcpy8acc.,;na6e% t,;na6e9; strcpy8acc.,;address% t,;address9; acc.*o;cass # t*o;cass; acc.dd # d1; acc.66 # 61; acc.yy # y1; /* .ppends the transaction record into person.dat data file */ file # fopen8)person.dat)% )aD)9; f+rite8Sacc% si5eof8acc9% 1% file9; fclose8file9; 3 /* 4unction for deleting an account fro6 person.dat file. */ 7oid .delete;account8int t;cas;code9 ( 4F'/ *file; 4F'/ *te6p; file # fopen8)person.dat)% )r)9; te6p # fopen8)?/2,.dat)% )+)9; re+ind8file9; /* >ses the copy 6ethod for deleting the transaction record fro6 person.dat data file */ +hile 8fread8Sacc% si5eof8acc9% 1% file99 ( if 8acc.cas;code M# t;cas;code9

f+rite8Sacc% si5eof8acc9% 1% te6p9;

fclose8file9; fclose8te6p9; file # fopen8)person.dat)% )+)9; te6p # fopen8)?/2,.dat)% )r)9; re+ind8te6p9; /* >ses copy 6ethod to transfer the record fro6 ?/2,.dat file to person.dat data file */ +hile 8fread8Sacc% si5eof8acc9% 1% te6p99 ( if 8acc.cas;code M# t;cas;code9 f+rite8Sacc% si5eof8acc9% 1% file9; 3 fclose8file9; fclose8te6p9;

/* 4unction for add an other e0penses details in other.dat data file */ 7oid !add;to;file8int t!;code% char t*at;/0pen[<$]% int d1% int 61% int y1% float ta6ount9 ( 4F'/ *file; oth.!;code # t!;code; strcpy8oth.*at;/0pen% t*at;/0pen9; oth.dd # d1; oth.66 # 61; oth.yy # y1; oth.a6ount # ta6ount; /* .ppends the transaction record into other.dat data file */ file # fopen8)other.dat)% )aD)9; f+rite8Soth% si5eof8oth9% 1% file9; fclose8file9; 3 /* 4unction for displaying an account fro6 )cassettes.dat). */

7oid &display;list87oid9 ( int flag%O; float tot;price # $.$% tot;balance # $.$; int ro+ # K; 4F'/ *file; int d1% 61% y1; struct date d; clrscr89; goto0y8:5%:9; printf8)'ist of cassettes in 2usic -hop)9; goto0y8:5% <9; printf8)###############################)9; getdate8Sd9; d1 # d.da;day; 61 # d.da;6on; y1 # d.da;year; goto0y8J:% <9; printf8)Date@ Cd/Cd/Cd)%d1%61%y19; goto0y81% B9; for 8O # 1; O <# KI; ODD9 printf8)#)9; goto0y81% 59; printf8)&ode #)9; goto0y8I% 59; printf8)&assette *a6e)9; goto0y8<B% 59; printf8)&o6pany *a6e)9; goto0y855% 59; printf8)Qty)9; goto0y8J1% 59; printf8),rice)9; goto0y8K:% 59; printf8)?otal)9; goto0y81% J9; for 8O # 1; O <# KI; ODD9 printf8)#)9; file # fopen8)cassettes.dat)% )r)9;

re+ind8file9; /* eads all the records to display on the screen */ +hile 8fread8Sini% si5eof8ini9% 1% file9 ## 19 ( tot;price # $.$; flag # $; delay8:9; goto0y8<% ro+9; printf8)Cd)% ini.cas;code9; goto0y8I% ro+9; puts8ini.&ass;na6e9; goto0y8<B% ro+9; puts8ini.&o6p;na6e9; goto0y855% ro+9; printf8)Cd)% ini.tot;cassette9; goto0y8J1% ro+9; printf8)C$.:f)% ini.price9; tot;price # ini.tot;cassette * ini.price; goto0y8K:% ro+9; printf8)C$.:f)% tot;price9; tot;balance # tot;balance D tot;price; ro+DD; if 8ro+ > :<9 ( flag # 1; ro+ # J; goto0y8B% :B9; printf8),ress any 1ey to continue.... )9; getch89; clrscr89; 3 3 goto0y81% ro+9; for 8O # 1; O <# KI; ODD9 printf8)#)9;

ro+DD; goto0y8<% ro+9; printf8)?otal price of &assettes is @ )9; goto0y8K:% ro+9; printf8)C$.:f)% tot;balance9; fclose8file9; if 8Mflag9 ( goto0y8B% :B9; printf8),ress any 1ey to continue...)9; getch89; 3 getch89;

/* 4unction for displaying an cassette sales on day +ise */ 7oid .Display;sales87oid9 ( int flag%O; 4F'/ *file; int d1% 61% y1; struct date d; int tcas;code; int 0dd% 066% 0yy; int ro+ # L; clrscr89; goto0y81$% L9; printf8)/nter the &assette &ode )9; goto0y81$% I9; printf8).s 1 or : or < )9; goto0y81$% 119; printf8)/nter the date )9; goto0y8<$% I9; scanf 8) Cd)%Stcas;code9; goto0y8<$% 119; scanf 8) Cd)%S0dd9; goto0y8<:% 119; printf8)A)9;

goto0y8<<% 119; scanf 8) Cd)%S0669; goto0y8<5% 119; printf8)A)9; goto0y8<J% 119; scanf 8) Cd)%S0yy9; if 8tcas;code < 19 ( goto0y85% :<9; printf8)Tour entry is not 7alid)9; getch89; return; 3 else if 8tcas;code > <9 ( goto0y85% :<9; printf8)Tour entry is not 7alid)9; getch89; return; 3 clrscr89; goto0y8:5% :9; printf8)-ales eport in 2usic -hop)9; goto0y8:5% <9; printf8)##########################)9; getdate8Sd9; d1 # d.da;day; 61 # d.da;6on; y1 # d.da;year; goto0y8J:% <9; printf8)Date@ Cd/Cd/Cd )% d1%61%y19; goto0y81% 59; for 8 O # 1; O <# KI; ODD9 printf8)#)9; goto0y81% J9; printf8)&ode #)9; goto0y8I% J9; printf8)*a6e)9; goto0y8<B% J9;

printf8).ddress)9; goto0y855% J9; printf8)Qty)9; goto0y8J1% J9; printf8)Date)9; goto0y81% K9; for 8O # 1; O <# KI; ODD9 printf8)#)9; file # fopen8),erson.dat)% )r)9; re+ind8file9; /* eads all the records to display on the screen */ +hile 8fread8Sacc% si5eof8acc9% 1% file9 ## 19 ( if 88tcas;code ## acc.cas;code9 SS 8066 ## acc.669 SS 80yy ## acc.yy99 ( flag # $; delay8:9; goto0y8<% ro+9; printf8)Cd)% acc.cas;code9; goto0y8I% ro+9; puts8acc.,;na6e9; goto0y8<B% ro+9; puts8acc.,;address9; goto0y855% ro+9; printf8)Cd)% acc.*o;cass9; goto0y8J1% ro+9; printf8)CdACdACd)% acc.dd%acc.66%acc.yy9; DDro+; if 8ro+ > :<9 ( flag # 1; ro+ # J; goto0y8B% :B9; printf8),ress any 1ey to continue.... )9; getch89; clrscr89;

3 3 DDro+;

goto0y81% ro+9; for 8O # 1; O <# KI; ODD9 printf8)#)9; ro+DD; fclose8file9; if 8Mflag9 ( goto0y8B% :B9; printf8),ress any 1ey to continue...)9; getch89; 3 getch89;

/* 4unction for displaying other e0penses in shop */ 7oid !display;e0pense87oid9 ( int flag; 4F'/ *file; /* ?he other e0pence code as @ 1 A -alary to +or1ers% : A /lectricity bill < A ?elephone bills B A 2iscellaneous e0penses */ int t!;code%O; int 0dd% 066% 0yy; int d1% 61% y1; struct date d; int ro+ # L; clrscr89; goto0y81$% L9; printf8)/nter the /0pense &ode )9; goto0y81$% I9; printf8)1 -alary to "or1er )9;

goto0y81$% 1$9; printf8): /lectricity bill )9; goto0y81$% 119; printf8)< ?elephone bill )9; goto0y81$% 1:9; printf8)B 2iscellaneous )9; goto0y81$% 1<9; printf8)/nter your &hoice)9; goto0y81$% 1B9; printf8)/nter the date )9; goto0y8<$% 1<9; scanf 8) Cd)%St!;code9; goto0y8<$% 1B9; scanf 8) Cd)%S0dd9; goto0y8<:% 1B9; printf8)A)9; goto0y8<<% 1B9; scanf 8) Cd)%S0669; goto0y8<5% 1B9; printf8)A)9; goto0y8<J% 1B9; scanf 8) Cd)%S0yy9; if 8t!;code < 19 ( goto0y85% :<9; printf8)Tour entry is not 7alid)9; getch89; return; 3 else if 8t!;code > B9 ( goto0y85% :<9; printf8)Tour entry is not 7alid)9; getch89; return; 3 clrscr89; goto0y8:5% :9;

printf8)!ther /0penses in 2usic -hop)9; goto0y8:5% <9; printf8)############################)9; getdate8Sd9; d1 # d.da;day; 61 # d.da;6on; y1 # d.da;year; goto0y8J:% <9; printf8)Date@ Cd/Cd/Cd)% d1% 61% y19; goto0y81% 59; for 8 O # 1; O <# KI; ODD9 printf8)#)9; goto0y81% J9; printf8)&ode #)9; goto0y8I% J9; printf8)*ature /0pense)9; goto0y8<B% J9; printf8)Date)9; goto0y855% J9; printf8).6ount)9; goto0y81% K9; for 8O # 1; O <# KI; ODD9 printf8)#)9; file # fopen8)other.dat)% )r)9; re+ind8file9; /* eads all the records to display on the screen */ +hile 8fread8Soth% si5eof8oth9% 1% file9 ## 19 ( if 88t!;code ## oth.!;code9 SS 8066 ## oth.669 SS 80yy ## oth.yy99 ( flag # $; delay8:9; goto0y8<% ro+9;

printf8)Cd)% oth.!;code9; goto0y8I% ro+9; puts8oth.*at;/0pen9; goto0y8<B% ro+9; printf8)CdACdACd)% oth.dd% oth.66% oth.yy9; goto0y855% ro+9; printf8)C$.:f)% oth.a6ount9;

DDro+; if 8ro+ > :<9 ( flag # 1; ro+ # J; goto0y8B% :B9; printf8),ress any 1ey to continue.... )9; getch89; clrscr89; 3 3 3 DDro+; goto0y81% ro+9; for 8O # 1; O <# KI; ODD9 printf8)#)9; ro+DD; fclose8file9; if 8Mflag9 ( goto0y8B% :B9; printf8),ress any 1ey to continue...)9; getch89; 3 getch89; 3 /* 4unction for clearing specified ro+ and colu6n. */ 7oid .clear8int col% int ro+9

int O; for 8 O # col; O <# KI; ODD9 ( goto0y8O% ro+9; printf8) )9; 3

/* 4unction for return na6e of the account holder fro6 cassettes.dat. */ char *&return;na6e8int t;cas;code9 ( 4F'/ *file; char t;&ass;na6e[<$]; file # fopen8)cassettes.dat)% )r)9; re+ind8file9; +hile 8fread8Sini% si5eof8ini9% 1% file9 ## 19 ( if 8ini.cas;code ## t;cas;code9 ( strcpy8t;&ass;na6e% ini.&ass;na6e9; brea1; 3 3 fclose8file9; return t;&ass;na6e; 3 /* 4unction for return &o6p;na6e of the account holder fro6 cassettes.dat. */ char *&return;address8int t;cas;code9 ( 4F'/ *file; char t;&o6p;na6e[<$]; file # fopen8)cassettes.dat)% )r)9; re+ind8file9; /* eturn the &o6p;na6e to display at report screen if found */ +hile 8fread8Sini% si5eof8ini9% 1% file99 ( if 8ini.cas;code ## t;cas;code9

( 3

strcpy8t;&o6p;na6e% ini.&o6p;na6e9; brea1;

3 fclose8file9; return t;&o6p;na6e;

/* 4unction to find the 6onthly profit using person.dat% cassette.dat and ?bal.dat data files */ 7oid =6onthly;profit89 ( int flag%O; 4F'/ *file; int d1% 61% y1; struct date d; float ?;bal # $.$; float G;bal # $.$; int ro+ # K; float cod1#$.$; float cod:#$.$; float cod<#$.$; float saltotal # $.$; float gother # $.$; float net;bal # $.$; clrscr89; goto0y8:5%19; printf8)2onthly ,rofit -tate6ent)9; goto0y8:5% :9; printf8)########################)9; getdate8Sd9; d1 # d.da;day; 61 # d.da;6on; y1 # d.da;year;

goto0y855% <9; printf8).s on Date@ Cd/Cd/Cd)% d1%61%y19; goto0y81% B9; for 8O # 1; O <# KI; ODD9 printf8)#)9; goto0y81% 59; printf8)&ode #)9; goto0y815% 59; printf8)?otal =alance)9; goto0y8B$% 59; printf8)Date)9; goto0y85$% 59; printf8)>nit ,rice)9; goto0y8J5% 59; printf8)?otal .6ount)9; goto0y81% J9; for 8O # 1; O <# KI; ODD9 printf8)#)9; file # fopen8)?bal.dat)% )r)9; re+ind8file9; /* eads all the records to display on the screen */ +hile 8fread8Sbal% si5eof8bal9% 1% file9 9 ( flag # $; if 8bal.cas;code ## 19 cod1 # bal.price; else if 8bal.cas;code ## :9 cod: # bal.price; else cod< # bal.price; ?;bal # bal.cas;bal * bal.price; delay8:9; goto0y8<% ro+9; printf8)Cd)% bal.cas;code9;

goto0y8:$% ro+9; printf8)Cd)% bal.cas;bal9; goto0y8B$% ro+9; printf8)CdACdACd)% bal.dd%bal.66%bal.yy9; goto0y85<% ro+9; printf8)C$.:f)% bal.price9; G;bal # G;bal D ?;bal; goto0y8JL% ro+9; printf8)C$.:f)% ?;bal9; ?;bal # $.$; ro+DD; if 8ro+ > :<9 ( flag # 1; ro+ # J; goto0y8B% :B9; printf8),ress any 1ey to continue.... )9; getch89; clrscr89; 3

goto0y81% ro+9; for 8O # 1; O <# KI; ODD9 printf8)#)9; ro+DD; goto0y85$% ro+9; printf8)Grand ?otal)9; goto0y8JL% ro+9; printf8)C$.:f)% G;bal9; fclose8file9; ro+DD; /* ?his function +ill return total total sales in a particular 6onth */ saltotal # .sales;status861% y1% cod1% cod:% cod<9; ro+DD; goto0y81% ro+9; for 8O # 1; O <# KI; ODD9

printf8)#)9; ro+DD; goto0y85% ro+9; printf8)?his 6onthNs -ales .6ount)9; goto0y85$% ro+9; printf8)C$.:f)% saltotal9; /* ?his function +ill return total other e0pences in a particular 6onth */ gother # !other;status861% y19; ro+ # ro+ D :; goto0y85% ro+9; printf8)!ther e0penses )9; goto0y85$% ro+9; printf8)C$.:f)% gother9; ro+DD; goto0y81% ro+9; for 8O # 1; O <# KI; ODD9 printf8)#)9; ro+DD; goto0y85% ro+9; printf8)*et ,rofit)9; /* &alculate the net balance in a particular 6onth */ net;bal # saltotal A gother; goto0y85$% ro+9; printf8)C$.:f)% net;bal9; goto0y8JL% ro+9; printf8)C$.:f)% G;bal9; if 8Mflag9 ( goto0y8B% :B9; printf8),ress any 1ey to continue...)9; getch89; 3 getch89;

/* 4unction to find the total sales 7alue in a particular 6onth */ float .sales;status8int 61% int y1% float cod1% float cod:% float cod<9 ( 4F'/ *file; float ts # $.$; float gts # $.$; file # fopen8),erson.dat)% )r)9; re+ind8file9; /* eads all the records to display on the screen */ +hile 8fread8Sacc% si5eof8acc9% 1% file9 ## 19 ( if 8861 ## acc.669 SS 8y1 ## acc.yy99 ( if 8acc.cas;code ## 19 ts # acc.*o;cass * cod1; else if 8acc.cas;code ## :9 ts # acc.*o;cass * cod:; else ts # acc.*o;cass * cod<; gts # gts D ts; ts # $; 3 3 fclose8file9; return gts; 3 /* 4unction to find the other e0penditure in a particular 6onth */ float !other;status8int 61% int y19 ( 4F'/ *file; float goth # $.$; file # fopen8)other.dat)% )r)9; re+ind8file9; /* */ eads all the records to display on the screen

+hile 8fread8Soth% si5eof8oth9% 1% file9 ## 19 ( if 8861 ## oth.669 SS 8y1 ## oth.yy99 ( goth # goth D oth.a6ount; 3 3 fclose8file9; return goth;

/* 4unction to display the balance cassette in 6usic shop */ 7oid =balance;cassette87oid9 ( int flag%O; 4F'/ *file; float ?;bal # $.$; float G;bal # $.$; int ro+ # K; int d1% 61% y1; struct date d; clrscr89; goto0y8:5%19; printf8)'ist of =alance &assettes)9; goto0y8:5% :9; printf8)#########################)9; getdate8Sd9; d1 # d.da;day; 61 # d.da;6on; y1 # d.da;year; goto0y855% <9; printf8).s on Date@ Cd/Cd/Cd)% d1%61%y19; goto0y81% B9; for 8 O # 1; O <# KI; ODD9 printf8)#)9; goto0y81% 59; printf8)&ode #)9; goto0y815% 59;

printf8)?otal =alance)9; goto0y8B$% 59; printf8)Date)9; goto0y85$% 59; printf8)>nit ,rice)9; goto0y8J5% 59; printf8)?otal .6ount)9; goto0y81% J9; for 8O # 1; O <# KI; ODD9 printf8)#)9; file # fopen8)?bal.dat)% )r)9; re+ind8file9; /* eads all the records to display on the screen */ +hile 8fread8Sbal% si5eof8bal9% 1% file9 ## 19 ( flag # $; ?;bal # bal.cas;bal * bal.price; delay8:9; goto0y8<% ro+9; printf8)Cd)% bal.cas;code9; goto0y8:$% ro+9; printf8)Cd)% bal.cas;bal9; goto0y8B$% ro+9; printf8)CdACdACd)% bal.dd%bal.66%bal.yy9; goto0y85<% ro+9; printf8)C$.:f)% bal.price9; G;bal # G;bal D ?;bal; goto0y8JL% ro+9; printf8)C$.:f)% ?;bal9; ?;bal # $.$; ro+DD; if 8ro+ > :<9 ( flag # 1; ro+ # J; goto0y8B% :B9;

3 3

printf8),ress any 1ey to continue.... )9; getch89; clrscr89;

goto0y81% ro+9; for 8O # 1; O <# KI; ODD9 printf8)#)9; ro+DD; goto0y85$% ro+9; printf8)Grand ?otal)9; goto0y8JL% ro+9; printf8)C$.:f)% G;bal9; fclose8file9; if 8Mflag9 ( goto0y8B% :B9; printf8),ress any 1ey to continue...)9; getch89; 3 getch89;

/* 4unction for recording the ne+ cassettes in shop */ 7oid &ne+;cassettes87oid9 ( char ch; int i% 7alid; int d1% 61% y1; struct date d; char c;code[1$]; /* Declaring the date 6e6bers for for different operations +ith cassette functions */ int t;cas;code; char t;&ass;na6e[<$]; char t;&o6p;na6e[<$]; int t;cas; int tdd% t66% tyy;

float t;price; clrscr89; -bo08:% 1% KI% :5% :1L9; -bo08:5% :% 5B% B% :1I9; goto0y8J5% :9; printf8)<$>#/0it)9; goto0y8<%<9; for 8i # 1; i<# KJ; iDD9 cprintf8) )9; te0tbac1ground8='.&H9; te0tcolor8='.&HD='F*H9; te0tbac1ground8"EF?/9; goto0y8<$% <9; cprintf8).dd *e+ &assette)9; te0tcolor8'FGE?G .T9; te0tbac1ground8='.&H9; getdate8Sd9; d1 # d.da;day; 61 # d.da;6on; y1 # d.da;year; t;cas;code # &last;cas;code89; /* .ppends and deletes a false record to create pri6ary position in data files */ if 8t;cas;code ## $9 ( &add;to;file8t;cas;code% )abc)% )0y5)% 1% 1% 1% 1% 1.19; &delete;cassette8t;cas;code9; =add;to;file8t;cas;code% $% $% $% $% $.$9; =delete;balance8t;cas;code9; 3 goto0y8B% J9; printf8)Date@ Cd/Cd/Cd)% d1%61% y19; goto0y85% L9;

printf8)&assette &ode # )9; goto0y85% 1$9; printf8)&assette *a6e @ )9; goto0y85% 1:9; printf8)&o6pany *a6e @ )9; goto0y85% 1B9; printf8)?otal &assettes@ )9; goto0y85% 1J9; printf8)Fndi7idual &assette price @ )9; goto0y85% 1L9; printf8)/nter the Date )9; <. /* -teps to enter the cassette code either 1 A : A */ do ( .clear8::% L9; .clear85% :<9; goto0y85% :<9; printf8)/nter cassettes &ode either 1/:/< )9; 7alid # 1; goto0y8::% L9; gets8c;code9; t;cas;code # atoi8c;code9; if 8t;cas;code <# $9 ( 7alid # $; .clear85% :<9; goto0y85% :<9; cprintf8)UK-hould not other than 1% :% getch89; goto0y85% :<9; printf8)/nter cassettes &ode either 1/:/< 3 3 +hile 8M7alid9; .clear85% :<9; /* -teps to enter the &assette na6e do */

<)9;

)9;

.clear8::% 1$9; .clear85% :<9; goto0y85% :<9; printf8)/nter *a6e of the &assette)9; 7alid # 1; goto0y8::% 1$9; gets8t;&ass;na6e9; strupr8t;&ass;na6e9; if 8t;&ass;na6e[$] ## N$N9 return; if 8strlen8t;&ass;na6e9 ## $ VV strlen8t;&ass;na6e9 > :59 ( 7alid # $; goto0y85% :<9; cprintf8)UK&assette *a6e should not greater than :5)9; getch89; 3 3+hile 8M7alid9; .clear85% :<9; /* -teps to enter co6pany na6e */ do ( .clear8::% 1:9; .clear85% :<9; goto0y85% :<9; printf8)/nter &o6pany *a6e )9; 7alid # 1; goto0y8::% 1:9; gets8t;&o6p;na6e9; strupr8t;&o6p;na6e9; if 8t;&o6p;na6e[$] ## N$N9 return; if 8strlen8t;&o6p;na6e9 ## $ VV strlen8t;&o6p;na6e9 > :59 ( 7alid # $; goto0y85% :<9; cprintf8)UK&o6pany *a6e should not greater than :5)9;

3 3+hile 8M7alid9; .clear85% :<9;

getch89;

/* -teps to enter the total cassettes purchased */ do ( .clear8::% 1B9; .clear85% :<9; goto0y85% :<9; printf8)/nter ?otal nu6ber of cassettes purchased)9; 7alid # 1; goto0y8::% 1B9; gets8c;code9; t;cas # atoi8c;code9; if 8t;cas ## $9 ( 7alid # $; .clear85% :<9; goto0y85% :<9; cprintf8)UK/nter 7alid cassette nu6ber)9; getch89; goto0y85% :<9; printf8)/nter ?otal nu6ber of cassettes purchased)9; 3 3+hile 8M7alid9; .clear85% :<9; /* -teps to enter the cassette/price */ do ( .clear8<5% 1J9; .clear85% :<9; goto0y85% :<9; printf8)/nter indi7idual cassette price)9; 7alid # 1; goto0y8<5% 1J9; gets8c;code9;

t;price # atof8c;code9; if 8t;price <# $9 ( 7alid # $; goto0y85% :<9; cprintf8)UK/nter 7alid price for cassette)9; getch89; 3 3+hile 8M7alid9; .clear85% :<9; /* -teps to enter the purchase date */ .clear8::% 1L9; .clear85% :<9; goto0y85% :<9; printf8)/nter date on +hich the cassette is purchase)9; 7alid # 1; goto0y8::% 1L9; scanf 8) Cd)%Stdd9; goto0y8:5% 1L9; printf8)A)9; goto0y8:J% 1L9; scanf 8) Cd)%St669; goto0y8:L% 1L9; printf8)A)9; goto0y8:I% 1L9; scanf 8) Cd)%Styy9; .clear85% :<9; do (

)9;

.clear85% :$9; 7alid # 1; goto0y85% :$9; printf8)Do you +ant to sa7e the record <T/*>@

ch # getche89; if 8ch ## N$N9 return; ch # toupper8ch9; 3+hile 8ch M# N*N SS ch M# NTN9;

if 8ch ## N*N9 return; /* .ppends the records contents into both cassettes.dat and person.dat data files */ &add;to;file8t;cas;code% t;&ass;na6e% t;&o6p;na6e% t;cas% tdd% t66% tyy% t;price9; =add;to;file8t;cas;code% t;cas% tdd% t66% tyy% t;price9; 3 /* ?his function update;balance89 is used to update the balance cassette in ?bal.dat data file */ 7oid =>pdate;balance8int t;cas;code% int t;cas% int tdd% int t66% int tyy% float t;price9 ( int bal1 # =gi7e;balance8t;cas;code9; 4F'/ *file; if 8bal1 > $9 ( 4F'/ *te6p; file # fopen8)?bal.dat)% )r)9; te6p # fopen8)?/2,.dat)% )+)9; re+ind8file9; /* >ses a copy 6ethod to delete the account fro6 ?bal.dat data file*/ +hile 8fread8Sbal% si5eof8bal9% 1% file99 ( if 8bal.cas;code M# t;cas;code9 f+rite8Sbal% si5eof8bal9% 1% te6p9; else ( bal.cas;code # t;cas;code; bal.cas;bal # bal1 A t;cas; bal.dd # tdd; bal.66 # t66; bal.yy # tyy;

bal.price # t;price; f+rite8Sbal% si5eof8bal9% 1% te6p9; 3 3

fclose8file9; fclose8te6p9; file # fopen8)?bal.dat)% )+)9; te6p # fopen8)?/2,.dat)% )r)9; re+ind8te6p9; /* &opy the ?/2,.dat contents into ?bal.dat data file */ +hile 8fread8Sbal% si5eof8bal9% 1% te6p99 ( f+rite8Sbal% si5eof8bal9% 1% file9; 3 fclose8file9; fclose8te6p9;

3 else (

bal.cas;code # t;cas;code; bal.cas;bal # t;cas; bal.dd # tdd; bal.66 # t66; bal.yy # tyy; bal.price # t;price; /* .ppends ne+ account record +ith the price into cassettes.dat data file */ file # fopen8)?bal.dat)% )aD)9; f+rite8Sbal% si5eof8bal9% 1% file9; 3 3 /* 4unction for creating ne+ account for ne+ custo6er. */ 7oid .ne+;account87oid9 fclose8file9;

char ch; int i% 7alid; int d1% 61% y1; struct date d; int t;cas;code; int &;bal # $; float t;price; char c;code[:]; char t,;na6e[<$]; char t,;address[<$]; int t*o;cass; clrscr89; -bo08:% 1% KI% :5% :1L9; -bo08:5% :% 5B% B% :1I9; goto0y8J5% :9; printf8)<$>#/0it)9; goto0y8<%<9; for 8i # 1; i<# KJ; iDD9 cprintf8) )9; te0tbac1ground8='.&H9; te0tcolor8='.&HD='F*H9; te0tbac1ground8"EF?/9; goto0y8<$% <9; cprintf8)-ales of &assettes)9; te0tcolor8'FGE?G .T9; te0tbac1ground8='.&H9; getdate8Sd9; d1 # d.da;day; 61 # d.da;6on; y1 # d.da;year; t;cas;code # .last;cas;code89; /* .ppends and deletes a false record to create pri6ary position in data files */ if 8t;cas;code ## $9 (

1% 1% 19; 3

.add;to;file8t;cas;code% )0000)% )00000)% 1% .delete;account8t;cas;code9;

goto0y85% J9; printf8)Date@ Cd/Cd/Cd )% d1%61%y19; goto0y85% L9; printf8)&assette &ode )9; goto0y85% 1$9; printf8)*a6e of ,erson @ )9; goto0y85% 1:9; printf8).ddress @ )9; goto0y85% 1B9; printf8)?otal &assette @ )9; <. /* -teps to enter the cassette code either 1 A : A */ do ( .clear8::% L9; .clear85% :<9; goto0y85% :<9; printf8)/nter cassettes &ode either 1/:/< )9; 7alid # 1; goto0y8::% L9; gets8c;code9; t;cas;code # atoi8c;code9; if 8t;cas;code <# $9 ( 7alid # $; .clear85% :<9; goto0y85% :<9; cprintf8)UK-hould not other than 1% :% <)9; getch89; goto0y85% :<9; printf8)/nter cassettes &ode either 1/:/< 3 else

)9;

Cd)%&;bal9;

&;bal # =gi7e;balance8t;cas;code9; t;price # =return;price8t;cas;code9; if 8&;bal > $9 ( goto0y8B$% L9; printf8)?otal cassettes in -hop @ 3 else ( brea1;

shop)9;

printf8)?here is no cassette in return;

3 3 3 +hile 8M7alid9; .clear85% :<9;

:59

/* -teps to enter the na6e of the purchase person */ do ( .clear8::% 1$9; .clear85% :<9; goto0y85% :<9; printf8)/nter *a6e of the ,erson)9; 7alid # 1; goto0y8::% 1$9; gets8t,;na6e9; strupr8t,;na6e9; if 8t,;na6e[$] ## N$N9 return; if 8strlen8t,;na6e9 ## $ VV strlen8t,;na6e9 > ( 7alid # $; goto0y85% :<9; cprintf8)UK*a6e should not greater than getch89; .clear85% :<9;

:5)9;

3 3+hile 8M7alid9; .clear85% :<9; /* -teps to enter the address of the purchase person */ do ( .clear8::% 1:9; .clear85% :<9; goto0y85% :<9; printf8)/nter *a6e of the ,erson)9; 7alid # 1; goto0y8::% 1:9; gets8t,;address9; strupr8t,;address9; if 8t,;address[$] ## N$N9 return; if 8strlen8t,;address9 ## $ VV strlen8t,;address9 > :59 ( 7alid # $; goto0y85% :<9; cprintf8)UK.ddress should not greater than :5)9; getch89; .clear85% :<9; 3 3+hile 8M7alid9; .clear85% :<9; do (

.clear8::% 1B9; .clear85% :<9; goto0y85% :<9; printf8)*o. of cassette )9; 7alid # 1; goto0y8::% 1B9; scanf 8) Cd)%St*o;cass9; if 8t*o;cass > &;bal9

7alid # $; goto0y85% :<9; cprintf8)UK?he a7ailability of cassette is not sufficient)9; getch89; 3 3+hile 8M7alid9; .clear85% :<9; do ( .clear85% 1K9; 7alid # 1; goto0y85% 1K9; printf8)Do you +ant to sa7e the record <T/*>@ )9; ch # getche89; if 8ch ## N$N9 return; ch # toupper8ch9; 3+hile 8ch M# N*N SS ch M# NTN9; if 8ch ## N*N9 return; /* .ppends the records contents into both person.dat data files */ .add;to;file8t;cas;code% t,;na6e% t,;address% t*o;cass% d1% 61% y19; /* >pdates the ne+ balance after deducting the current sales */ =>pdate;balance8t;cas;code% t*o;cass% d1% 61% y1% t;price9; 3 /* 4unction for enter the other e0pences in other.dat data file. */ 7oid !/0pense;other87oid9 ( char ch;

int i% 7alid; int d1% 61% y1; struct date d; char c;code[:]; int t!;code; char t*at;/0pen[<$]; float ta6ount; clrscr89; -bo08:% 1% KI% :5% :1L9; -bo08:5% :% 5B% B% :1I9; goto0y8J5% :9; printf8)<$>#/0it)9; goto0y8<%<9; for 8i # 1; i<# KJ; iDD9 cprintf8) )9; te0tbac1ground8='.&H9; te0tcolor8='.&HD='F*H9; te0tbac1ground8"EF?/9; goto0y8<$% <9; cprintf8)!ther /0pence in -hop)9; te0tcolor8'FGE?G .T9; te0tbac1ground8='.&H9; getdate8Sd9; d1 # d.da;day; 61 # d.da;6on; y1 # d.da;year; goto0y85% J9; printf8)Date@ Cd/Cd/Cd)% d1%61%y19; goto0y85% L9; printf8)/0pense &ode )9; goto0y85% 1$9; printf8)*ature of /0pense @ )9; goto0y85% 1:9; printf8).6ount @ )9; /* -teps to enter the other e0pense code */ do ( .clear8::% L9; .clear85% :<9;

goto0y85% :<9; printf8)/nter /0pense code &ode either 1/:/</B )9; 7alid # 1; goto0y8::% L9; gets8c;code9; t!;code # atoi8c;code9;

if 8t!;code <# $9 ( 7alid # $; .clear85% :<9; goto0y85% :<9; cprintf8)UK/0pence code should not other than 1/:/</B)9; getch89; goto0y85% :<9; printf8)/nter other e0pense &odes either 1/:/</B )9; 3 3 +hile 8M7alid9; .clear85% :<9; /* -teps to enter the nature of e0pense */ do ( .clear8::% 1$9; .clear85% :<9; goto0y85% :<9; printf8)/nter the *ature of e0pense)9; 7alid # 1; goto0y8::% 1$9; gets8t*at;/0pen9; strupr8t*at;/0pen9; if 8t*at;/0pen[$] ## N$N9 return; if 8strlen8t*at;/0pen9 ## $ VV strlen8t*at;/0pen9 > :59 ( 7alid # $; goto0y85% :<9; cprintf8)UK*ature of e0pense not greater than :5)9;

getch89; .clear85% :<9; 3 3+hile 8M7alid9; .clear85% :<9; goto0y8::% 1:9; scanf 8) Cf)%Sta6ount9; do ( .clear85% 1K9; 7alid # 1; goto0y85% 1K9; printf8)Do you +ant to sa7e the record <T/*>@ )9; ch # getche89; if 8ch ## N$N9 return; ch # toupper8ch9; 3+hile 8ch M# N*N SS ch M# NTN9; if 8ch ## N*N9 return; /* .ppends the records contents into both person.dat data files */ if 8ta6ount > $9 !add;to;file8t!;code% t*at;/0pen% d1% 61% ta6ount9; 3

y1%

/* 4unction for returning the record no. for updating price */ int &recordno8int t;cas;code9 ( 4F'/ *file; int count # $; file # fopen8)cassettes.dat)% )r)9; re+ind8file9;

/* 4inds the record position in cassettes.dat data file */ +hile 8fread8Sini% si5eof8ini9% 1% file9 ## 19 ( countDD; if 8t;cas;code ## ini.cas;code9 brea1; 3 fclose8file9; return count; 3 /* 4unction for closing any account after inputing account nu6ber. */ 7oid .close;account87oid9 ( char t;acc[1$]; int t% t;cas;code%i; int d1% 61% y1; struct date d; char ch; clrscr89; goto0y8K1% 19; printf8)<$>#/0it)9; goto0y85% 59; printf8)/nter the account no. )9; gets8t;acc9; t # atoi8t;acc9; t;cas;code # t; if 8t;cas;code ## $9 return; clrscr89; if 8M=gi7e;balance8t;cas;code99 ( goto0y85% 59; printf8)UK.ccount not found )9; getch89; return; 3 goto0y8K1% 19;

printf8)<$>#/0it)9; goto0y8<% <9; te0tbac1ground8"EF?/9; for 8 i # 1; i <# KJ; iDD9 cprintf8) )9; te0tbac1ground8='.&H9; te0tcolor8='.&HD='F*H9; te0tbac1ground8"EF?/9; goto0y8<$% <9; cprintf8)&lose account screen)9; te0tcolor8'FGE?G .T9; te0tbac1ground8='.&H9; getdate8Sd9; d1 # d.da;day; 61 # d.da;6on; y1 # d.da;year; goto0y85% J9; printf8)Date@ Cd/Cd/Cd)% d1%61%y19; &display8t;cas;code9; do ( .clear85% 159; goto0y85% 159; printf8)&lose this account <y/nWW )9; ch # getche89; if 8ch ## N$N9 return; ch # toupper8ch9; 3+hile 8ch M# N*N SS ch M# NTN9; if 8ch ## N*N9 return; /* 4unction calls to delete the e0isting account no. */ &delete;cassette8t;cas;code9; .delete;account8t;cas;code9; goto0y85% :$9; printf8)UK.ccount Deleted)9; goto0y85% :<9;

printf8),ress any 1ey to continue...)9; getch89; 3 /* 2ain progra6 logic +hich control the functions. */ 7oid 6ain87oid9 ( int gdri7er # D/?/&?% g6ode% errorcode; initgraph8Sgdri7er% Sg6ode% )c@UUturbocUUbgide6o)9; 2help89; closegraph89; 2control;6enu89;

3;

SCREENS

CONC3USION
%odern computer #as got clear ad/antage o/er t#e pre/alent manual s!stem as it #as got more relia ilit!, efficienc! and speed needs less time and ma,e our .or, easier, in m! pro$ect semi5literate person are sufficient .it#out #a/ing programming ,no.ledge and mat#ematical ac,ground. "#oug# * #a/e tried m! est efforts to include all t#e aspects of in/entor! anal!sis . ut e/en after so sum aspects could not include ot#er aspects and it .ill also create a pro lem ecause data file is independent to soft.are. "#e DC< language is used in t#is pro$ect pro/e to e /er! useful and efficient in data #andling. *t #as man! commands and facilities .#ic# ma,e it more dominant o/er t#e pac,ages and languages t#e logicall! comple-it! could not e tac,led so easil! ! an! ot#er soft.are ut one can do it some difficult! pro$ected s!stem #as an added ad/antage of fast retrie/al of alignment data for a gi/en e6uipment and period, .#ere as in t#e manual storage retrie/al is /er! cum ersome process and time consuming. Computeri0ed s!stem is more speed!, relia le, time sa/er and economical secrec! of t#e information and data is more t#an manual s!stem inter/ention of men is reduced in it. "#e $urisdiction of .or, is concerned department is /ast ut ,eeping in t#e /ie. t#e time limit to finis# t#e pro$ect .or, assigned to me.

%ost pro a l!, * left on stone turned to implement m! entire programM * t#in, it .ill .or, .ell in future also.

Вам также может понравиться