Requirements and Estimation Techniques (Report file

)
Submitted to : Ms Ritu

Submitted by: Ratika Goel 049-cse-07 0592082707

Abstract Medical store
In this project, I have implemented a medical store managment system using C++ language which provides a medical store owner to keep tracks of medicines present in his/her store. The store owner can add, delete, modify records in the file. He/she can alse search a particular record on the basis of medicine name, thus it will give the complete information of that medicine which includes the batch no,name,category,sales price and purchase price. To modify a particular record user has to enter the batch no of that medicine and then the modified name,category,sales price and purchase price of that item. It is provides a user friendly interface to perform all the basic operations required for a medical store thus helps in maintaining the records with ease.

initgraph(&d. void search(medical *s). circle(300.co.co++) { .h> #include<string.h> #include<iostream. }.h> #include<stdio.h> struct medical { int bn.h> #include<graphics.h> #include<io.h> #include<process.h> #include<dos.co<=35. delay(50). medical s.&m. circle(300.co++) { setcolor(0).co++) { setcolor(co).co*10).r. void circle() { int d. void save(medical *s).200.co*10).h> #include<stdio. "l:\\bgi").pp. for (co=1.200.co<=35.co<=35. delay(50). cat[20]. char mn[20]. d=DETECT. cleardevice ().ss. } for (co=1.Source Code // medical store #include<conio.m. } for (co=1.

co<=35. } for (co=1. circle(300. delay(50).co++) { setcolor(0).setcolor(1).co*10). } // (FUNCTION OF ADD) // void add(medical *s) { int goo = 0.co++) { setcolor(2).co++) { setcolor(3). circle(300.co*10). circle(300. } for (co=1. closegraph().200.200. } for (co=1. } getch (). } for (co=1.co++) { setcolor(0). circle(300. delay(50). circle(300. while(goo<1000) { .co*10).co<=35.co*10).200. int d.co<=35.200.co<=35. delay(50).m.200. delay(50). int goog = 0.co*10). delay(50).

cout<<"PROJECT EDEN". FILE *f. cin>>s->bn. } fwrite(s. } // (FUNCTION OF SAVE) // void save(medical *s){ circle (). cout<<" !!! Enter Medicine Name # Plz !!! ". setbkcolor(9). cout<<" !!! Enter Purchase Price # Plz !!! ".&m. cin>>s->cat. initgraph(&d. fflush(stdin).sizeof(struct medical). system("CLS"). cout<<" !!! Press Any Key To Continue !!! ". cout<<endl<<endl. d=DETECT. clrscr(). Try again !!! ". getch(). cleardevice().cout<<"00101001101010110". cin>>s->pp. goo = 0. goog = 0.f). if(f==NULL){ cout<<" !!! File not created. system("CLS"). cout<<" !!! Enter Sale Price # Plz !!! ".txt". cout<<" !!! Enter Batch No # Plz !!! "."l:\\bgi"). f=fopen("abc. s++. cout<<" !!! Enter Catagory # Plz !!! ". . cin>>s->mn. } clrscr().1. goo++. cin>>s->ss."ab").

"rb"). cout<<"Batch No".1). cout<<"Catagory".txt".c. if(f==NULL){ cout<<" !!! File not created.1). gotoxy(60. gotoxy(1. gotoxy(1. gotoxy(12.1). cout<<"SalePrice". cout<<s->bn. cout<<" Your Product has been saved ". . cout<<"PurchasePrice".f)){ row++.1).1).1. int row=1. cout<<s->mn. } // !!! ". gotoxy(20. cout<<s->cat.10). gotoxy(30. gotoxy(57. b=filelength(fileno(f))/sizeof(struct medical). Try again cout<<" !!! Press Any Key to Contine getch().row). up: gotoxy(1. //blink(). getch(). gotoxy(45. f=fopen("abc.24). gotoxy(40. gotoxy(30. cout<<" !!! Total records are ===== "<<b.sizeof(struct medical).fclose(f). clrscr(). gotoxy(12. !!! ". cout<<"Medicine Name".row). fclose(f).row).row). } // (FUNCTION OF READ ALL) void readall(medical *s){ FILE *f.b. while(fread(s.row). cout<<s->pp.

cout<<" !!! Press Any Key. fclose(f). cout<<"Press Any Key To Next Page".12). clrscr(). gotoxy(15.cout<<s->ss. getch(). cout<<" !!!! Waite While Your Record is Searching !!!!".txt".sizeof(struct medical). row=2. char ch. FILE *f. rewind(f).25). Back to the Code !!!". while(fread(s. delay(2000). clrscr()."r"). if(f==NULL) { cout<<" !!! Your File is not Found !!!". } cout<<"Enter Name for search ³³³³ ======== ". do { clrscr(). getch(). cin>>rec. if (row==23) { gotoxy(1.1.f)){ . f=fopen("abc. int row. getch(). } // (FUNCTION OF SEARCH ) // void search(medical *s){ char rec[20]. goto up. } } //s++. clrscr().

cout<<s->cat.2). cout<<s->pp. clrscr(). } } fclose(f). cout<<"MedicineName". .*fd. cout<<"BatchNo". gotoxy(35. gotoxy(60.3). gotoxy(63.3). gotoxy(45.2). gotoxy(5.3). gotoxy(20.2). gotoxy(5. cout<<"Catagory". cout<<"Do You Want to Search Again (Y/N) : ".3). ch=getche().if(strcmp(s->mn.rec)==0){ row++. cout<<"SalePrice". gotoxy(50. cout<<s->ss. gotoxy(35. gotoxy(20.2).2). fflush(stdin). cout<<s->bn. FILE *f.3).8). } // (FUNCTION OF DELET ALL) // void delall(medical *s) { char r[20]. gotoxy(15. cout<<"PurchasePrice". cout<<s->mn. } while(ch=='y').

fd).*fd. gets(r). remove("abc.txt".r)!=0) fwrite(s."abc. ."wb"). fclose(fd).sizeof(medical). }*/ fflush(stdin). } cout<<"Enter name for delete". while(fread(s. getch()."r"). } } } // (FUNCTION OF DELET ONE RECORD) // void dele(medical *s) { char r[20].1. getch(). if(f==NULL) { gotoxy(15. if(strcmp(s->mn. } /* else { cout<<"record not deleted".r)!=0) { cout<<"Your Record Is Deleted". fd=fopen("del.sizeof(struct medical).txt"). cout<<"Press Any Key. { fclose(f). cout<<"File is not created Becacse"<<endl.txt".f)==1) { if(strcmp(s->mn. Back To The Code".txt").f=fopen("abc. rewind(f). char ch.1.txt".15). rename("del. do { FILE *f. cout<<" There is not any Record in your file".

cout<<"ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛPress Any Key To ContinueÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ".txt".40. f=fopen("abc."r"). delay(900). cout<<"ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛPress Any Key To ContinueÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ". . cout<<" !!!### Enter name for delete ======".1.clrscr(). cout<<" Enter Your Record For Deleted ". gotoxy(15. gotoxy(15. cout<<"Press Any Key.txt".fd).7). } rewind(f).10).sizeof(struct medical).sizeof(struct medical). while(fread(s. cout<<" Record Not Found". getch().r)==0) if (s->mn==0) { gotoxy(30. Back to the Code".f)==1) { if (strcmp(s->mn.r)!=0) fwrite(s.400. fclose(f).10).12). gotoxy(25. //bar3d(190.0."wb"). //if(strcmp(s->mn. delay(900).4). gets(r).1. } // if (strcmp(s->mn. fd=fopen("del.12). } gotoxy(13.r)!=0) if(!s->mn==0) { gotoxy(30. if(f==NULL) { cout<<"File not found".65.0). cout<<" Your Record Is Delet ".

7). cout<<" ####Enter The Batch Number to modify the recod#### ".12). cin>>s->mn. counter=0. FILE *f. gotoxy(13. while(fread(s. cout<<"Modify Record" . getch(). ch=getche()."abc. remove("abc.4). cout<<"Press Any Key. if(f==NULL){ cout<<"File Not Open". getch(). clrscr(). } rewind(f).sizeof(struct medical).counter. fclose(fd). gotoxy(7. } while(ch=='y'). f=fopen("abc. cout<<"Enter Name plz = ".txt").txt"). rename("del.*fd. fd=fopen("edit. cin>>mname.f)) { if(s->bn==mname){ counter++. ."rb"). } //(FUNCTION OF MODIFY)// void modify(medical *s) { int mname. Back To The Code".txt".1.15)."wb"). cout<<"Do You Want to Delete Again (Y/N) ". gotoxy(25.} fclose(f).txt".txt". gotoxy(20.

m.16). } fwrite(s.12). cout<<"Enter Batch Number plz = "."abc.1. initgraph(&d.31). delay(2000). rename("edit. cleardevice(). d=DETECT. cout<<"Enter Purchase Price = ".txt").10). cout<<" Press Any Key To Continue ".gotoxy(7. } fclose(f).18). cout<<" Record Is Not Found ".20). } if(counter==0) { gotoxy(30. //gotoxy(7.&m. gotoxy(7.14). } void intro() { int d. gotoxy(7.txt".r. remove("abc.fd). setbkcolor(7). delay(900). . cin>>s->pp. gotoxy(30. cout<<" Record is Modifying ". } else { clrscr (). cin>>s->bn.co. fflush(stdin). cout<<"Enter Catagory = ". cin>>s->cat. cout<<"Enter Sale Price = ". gotoxy(7.10). cin>>s->ss."l:\\bgi"). fclose(fd).txt").sizeof(struct medical). gotoxy(30.

outtextxy(575.4)."l:\\bgi").20.80. "P"). setbkcolor(1). To Main Project"). To Continue"). gotoxy(60. initgraph(&d."C"). cleardevice(). getch()."E")."J"). int d. } void main() { int n. outtextxy(575. char y. settextstyle(3.100. outtextxy(200.500.50."Press Any Key. setcolor(1). } void color(){ intro(). initgraph(&d.m. "R"). closegraph().140. outtextxy(250. outtextxy(575. closegraph().co.&m. color().2).110. //clrscr (). outtextxy(130. cleardevice().170.5).440. setbkcolor(25). getch().0.0.100."PROJECT").300).0."MEDICAL STORE").rectangle(100. outtextxy(100.1). outtextxy(575. setcolor(1).170.a."l:\\bgi").m. d=DETECT. settextstyle(1. outtextxy(575. settextstyle(7.r. setcolor(3).230. settextstyle(3. outtextxy(30. outtextxy(30.0.6). saan: d=DETECT. outtextxy(575."Press Any Key. int d.&m."OF"). .440. "O")."MEDICAL STORE").20.

outtextxy(575. cout<<"Press m for Modify Reocrd"<<endl.9)."T"). gotoxy(20.15). cin>>a.19). gotoxy(20. cout<<"|". gotoxy(36. switch (a) { case 'a': case 'A': add(&s).25).20). cout<<"\n\n\n\n\n\n\n\n". cout<<"Press a for Add New Record "<<endl.320. gotoxy(31.21). cout<<"Select Your Option Plz"."M"). outtextxy(575.380. cin>>y." "). cout<<"-------------------------------". cout<<"Press l for Delete All Reocrds"<<endl. gotoxy(31.24). outtextxy(575. gotoxy(17. gotoxy(20.11). gotoxy(20.260.23). cout<<"======"."I"). outtextxy(575. gotoxy(20.24).18)." "). gotoxy(31. gotoxy(33.230. cout<<"======". cout<<"Press s for Search The Reocrd"<<endl."D). cout<<"-------------------------------". cout<<"Press r for Read All Records"<<endl.200.16). gotoxy(15.10). outtextxy(575. cout<<"Do You Want to Save It (Y/N)????? ".24). outtextxy(575.17).350. if (y=='y'|| y=='Y'){ . gotoxy(20. cout<<"|". gotoxy(20."E"). closegraph().290. outtextxy(575. cout<<"Press e for Exit From The Window " <<endl. cout<<"Press d for Delete One Reocrd"<<endl. gotoxy(15.

case ('r') : case ('R'): readall(&s). clrscr (). getch(). case ('l') : case ('L'): delall(&s). case ('e') : case ('E'): exit(0). goto saan. break. case ('m') : case ('M'): modify(&s). goto saan. Plz Press The Option Keys". case ('d') : case ('D'): dele(&s). } . cout<<"You Press Wrong Key. goto saan. goto saan. break. case ('s') : case ('S'): search(&s). break.10). goto saan. goto saan. default: cout<<"Your Press Wrong Key. break. clrscr (). save: save(&s). } else goto exit. delay(2000). gotoxy(15. Plz Press The Option keys"<<endl.goto save . } exit(0). break. goto saan.

This metric is very popular primarily due to the fact that it is simple to use. while a symbol used to represent data is considered an operand. This metric measure the number of source instructions required to solve a problem. N1: total occurrence of operators N2: total occurrence of operands Program Vocabulary ( n): n= n1 + n2 Here. Token Count: Operands and operator of any computer language is called tokens. Any symbol or keyword in a program that specifies an algorithmic action is considered an operator. Halstead at Purdue University developed software sciences family of measures that survive till today.Lines of Code (LOC): The simplest way of problem size is lines of code. lines used for commenting and blank lines are ignored. n1: no of unique of operators n2: no of unique operands . These measures are: Program Length (N): N=N1+N2 Here. While counting the number of source instructions.

Operators and it¶s occurrences S. char [ ] } void ( ) * DETECT intigraph & ³ : Cleardevice for <= ++ setcolor circle Delay getch Closegraph while << clrscr System cout == = Setbkcolor Endl cin -> FILE If Occurrences(N1) 406 48 10 12 231 7 5 5 48 13 328 328 84 5 5 19 278 25 5 17 8 15 10 9 13 15 4 9 105 15 2 89 34 76 4 14 14 29 6 18 .no 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 Operators(n1) . { Struct int .

41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 fopen NULL fclose Fwrite sizeof Gotoxy fread goto Do rewind Strcmp stdin Fflush else Outtextxy settextstyle Switch case Break default gets Total 9 6 11 4 10 61 5 10 2 4 6 4 4 3 22 6 1 14 5 1 2 .

Operands and its occurrences S.no 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Operands(n2) medical bn ss pp mn cat s d m r co add search save goo goog f row c b up rec ch delall fd modify n y A dele readall Total No of occurrences(N2) 22 6 5 5 13 5 59 17 12 17 32 2 4 5 4 4 37 11 1 3 2 3 6 2 12 2 9 7 4 2 2 .

a greatly increased emphasis on reusing existing software and building new systems using off-the-shelf software components. software development techniques changed dramatically. and schedule when planning a new software development activity.COCOMO II Constructive Cost Model II (COCOMO II) is a model that allows one to estimate the cost. Barry Boehm in 1981. It consists of three sub models. tools. Early Design. ISR at . COCOMO II is the latest major extension to the original COCOMO (COCOMO 81) model published in 1981. The solution to the problem was to reinvent the model for the 1990s. These changes included a move away from mainframe overnight batch processing to desktop-based real-time turnaround. outsource. or purchase Making legacy software inventory decisions: what parts to modify. and Postarchitecture models. etc Deciding how to implement a process improvement strategy. and spending as much effort to design and manage the software development process as was once spent creating the software product. Listed in increasing fidelity. process maturit y. These changes and others began to make applying the origi nal COCOMO model problematic. reuse. effort. performance or quality factors Making software cost and schedule risk management decisions Deciding which parts of a software system to develop. etc Setting mixed investment strategies to improve organization's software capability. lease. each one offering increased fidelity the further along one is in the project planning and design process. via reuse. phase out. these sub models are called the Applications Composition. schedule. functionality. In t he ensuing decade and a half. and reflected the software development practices of the day. COCOMO II can be used for the following major decision situations y y y y y y y y Making investment or other financial decisions involving a software development effort Setting project budgets and schedules as a basis for planning and control Deciding on or negotiating tradeoffs among software cost. After several years and the combined efforts of USC-CSSE. such as that provided in the SEI CMM The original COCOMO model was first published by Dr. outsourcing.

or if there is mention of scale factors Precedentedness (PREC). This is an acronym derived from the first two letters of each word in the longer phrase Constructive Cost Model. and the COCOMO II Project Affiliate Organizations. or Embedded f or development mode. The word constructive refers to the fact that the model helps an estimator better understand the complexities of the software job to be done. To further avoid confusion. or Post -architecture. Intermediate.UC Irvine. after some confusion in how to designate subsequent releases of the software implementation of the new model. and by its openness permits the estimator to know exactly why the model gives the estimate it does. the new model (composed of all three sub models) was initially given the name COCOMO 2. or Process Maturity (PMAT). Early Design. However. there are a few obvious clues. the name was permanently changed to COCOMO II. a revised cost estimation model reflecting the changes in professional software development practice that have come about since the 1970s. Semidetached. Most references to COCOMO published from 1995 onward refer to what is now called COCOMO II. the original COCOMO model was also then re-designated COCOMO 81. then the model being discussed is COCOMO 81. .0. Not surprisingly. If in examining a reference you are still unsure as to which model is being discussed. All references to COCOMO found in books and literature published before 1995 refer to what is now called COCOMO 81. Team Cohesion (TEAM). the result is COCOMO II. Organic. improved COCOMO is now ready to assist professional software cost estimators for many years to come. Architecture/Risk Resolution (RESL). However. if the model names mentioned are Application Composition. This new. or Detailed for model names. then the model being discussed is COCOMO II. About the Nomenclature: The original model published in 1981 went by the simple name of COCOMO. If in the context of discussing COCOMO these terms are used: Basic. Development Flexibility (FLEX).

Sign up to vote on this title
UsefulNot useful