Copyright © 1994 Carnegie Mellon University1Disciplined SoftwareEngineeringLecture #4 Software Engineering Institute Carnegie Mellon University Pittsburgh, PA 15213 Sponsored by the U.S. Department of DefenseCopyright © 1994 Carnegie Mellon University2Lecture #4 Overview - EstimatingSoftware Size - 2 Size estimating overview The PROBE estimating method Categorizing object data The regression method Process additionsCopyright © 1994 Carnegie Mellon University3Size Estimating OverviewObtain historicalsize dataProduce conceptualdesignSubdivide the productinto partsDo the parts resemble parts in the database?Select the database partsmost like new onesEstimate the new part’s relative sizeSum the estimated sizes of the new partsEstimate totalproduct sizeRepeat forall partsRepeat until theproduct parts arethe right sizeProduct requirementSize estimateCopyright © 1994 Carnegie Mellon University4The PROBE Estimating Method ConceptualDesignStartIdentify ObjectsNumber ofMethodsObjectTypeRelativeSizeReuseCategoriesCalculate Added andModified LOCEstimateProgram SizeCalculatePrediction IntervalEstimateCopyright © 1994 Carnegie Mellon University5PROBE Method Description The following charts describe the PROBEmethod. Use form C39 in Appendix C as a referenceduring the discussion. The examples are taken from Table 5.8 inChapter 5.Copyright © 1994 Carnegie Mellon University6Conceptual Design A conceptual design is needed•to relate the requirements to the product•to define the product elements that willproduce the desired functions•to estimate the size of what will be built For understood designs, conceptual designscan be done quickly. If you do not understand the design, you donot know enough to make an estimate.Copyright © 1994 Carnegie Mellon University7Identify the Objects - 1 Where possible, select application entities. Judge how many methods each object will likelycontain. Determine the type of the object, i.e.: data,calculation, file, control, etc. Judge the relative size of each object: verysmall (VS), small (S), medium (M), large (L), verylarge (VL).Copyright © 1994 Carnegie Mellon University8Identify the Objects - 2 From historical object data, determine the sizein LOC/method of each object. Multiply by the number of methods to get theestimated object LOC. Judge which objects will be added to the reuselibrary and note as “New Reused.”Copyright © 1994 Carnegie Mellon University9Identify the Objects - 3 When objects do not fit an existing type, theyare frequently composites.•Ensure they are sufficiently refined•Refine those that are not elemental objects Watch for new object typesCopyright © 1994 Carnegie Mellon University10Identifying Objects - Example 1 From Table 5.8, 3 new objects are identified,with their numbers of methods, relative size,and LOC. New Objects Type Methods Size LOC Matrix Data 13 M 115 Linear System Calc. 8 L 197 Linked List Data 3 L 49*Copyright © 1994 Carnegie Mellon University11Identifying Objects - Example 2 3 reused objects are also shown in Table 5.8. New objects to be put in the reuse library areidentified by an asterisk, such as Linked List. The unmodified reused objects are Linked List 73 Data Entry 96 Linked List is an existing 73 LOC object with anadded method of 49 LOC.Copyright © 1994 Carnegie Mellon University12Estimate Program Size - 1 Total program size consists of•newly developed code (adjusted with theregression parameters)•reused code from the library•base code from prior versions, less deletions Newly developed code consists of•base additions (BA) - additions to the base•new objects (NO) - newly developed objects•modified code (M) - base LOC that arechangedCopyright © 1994 Carnegie Mellon University13Estimate Program Size - 2 Calculate the new and changed LOC from thenewly developed code•BA+NO+M•use regression to get new and changed LOC The regression parameters are calculated fromhistorical data on prior estimated newlydeveloped (object) LOC and actual new andchanged LOC.New&Changed=β0+β1*BA+NO+M()yk=β0+β1*xkCopyright © 1994 Carnegie Mellon University14Estimate Program Size - 3 Code used from the reuse library should becounted and included in the total LOC sizeestimate. Base code consists of:•LOC from the previous version•subtract deleted code•subtract modified code (or it would becounted twice)Copyright © 1994 Carnegie Mellon University15Completing the Estimate The completed estimate consists of:•the estimated new and changed LOCcalculated with the regression parameters•the 70% and 90% upper prediction interval(UPI) and lower prediction interval (LPI) for thenew and changed LOC•the total LOC, considering base, reused,deleted, and modified code•the projected new reuse LOC to be added tothe reuse libraryCopyright © 1994 Carnegie Mellon University16Completed Example - 1 Base Program (B) 695 LOC Deleted (D) 0 LOC Modified (M) 5 LOC Base Additions (BA) 0 LOC New Objects: NO = 115+197+49 = 361 LOC Reused Programs 169 LOCCopyright © 1994 Carnegie Mellon University17Completed Example - 2 Use the regression parameters to calculate Newand Changed LOC (N): Added code: BA + NO +M = 366 LOC New and changed: N = 62 + 366*1.3 = 538 LOC Total: T = 538 + 695 - 5 + 169 = 1397 LOCNew&Changed=β0+β1*BA+NO+M()Copyright © 1994 Carnegie Mellon University18To Make Size Estimates, You NeedSeveral Items Data on historical objects, divided into types Estimating factors for the relative sizes of eachobject type Regression parameters for computing new andchanged LOC from:•estimated object LOC•LOC added to the base•modified LOCCopyright © 1994 Carnegie Mellon University19Historical Data on Objects Object size is highly variable•depends on language•influenced by design style•helps to normalize by number of methods Pick basic types•logic, control•I/O, files, display•data, text, calculation•set-up, error handlingCopyright © 1994 Carnegie Mellon University20Estimating Factors for Objects You seek size ranges for each type that will helpyou judge
View Full Document