27
Chapter 23 Estimation Software Engineering: A Practitioner’s Approach 6 th Edition Roger S. Pressman

Chapter 23

  • Upload
    donat

  • View
    42

  • Download
    3

Embed Size (px)

DESCRIPTION

Chapter 23. Estimation. Software Engineering: A Practitioner’s Approach 6 th Edition Roger S. Pressman. Software Project Estimation (1). S/W is the most expensive element of virtually all computer based systems S/W cost and effort estimation will never be an exact science - PowerPoint PPT Presentation

Citation preview

Page 1: Chapter 23

Chapter 23

Estimation

Software Engineering: A Practitioner’s Approach6th Edition

Roger S. Pressman

Page 2: Chapter 23

2

Software Project Estimation (1)

S/W is the most expensive element of virtually all computer based systems

S/W cost and effort estimation will never be an exact science– Too many variables

• Human• Technical• Environmental• Political

Page 3: Chapter 23

3

Software Project Estimation (2) Options for estimation

– Delay estimation until late in the project• Attractive, but not practical

– Base estimates on similar projects that have already been completed• Unfortunately, past experience has not always been a

good indicator of future results– Use relatively simple decomposition techniques to

generate project cost and effort estimates• “Divide and conquer” approach

– Use one or more empirical models for software cost and effort estimation• Can be used as a cross-check for the previous option

and vice versa

Page 4: Chapter 23

4

Decomposition Techniques

Two different points of view for the decomposition approach– Decomposition of the problem– Decomposition of the process

But first, the project planner must– Understand the scope of the s/w to be built– Generate an estimate of its “size”

Page 5: Chapter 23

5

Software Sizing Sizing represents the project planner’s first

major challenge Size refers to a quantifiable outcome of the

s/w project (e.g. LOC and/or FP) Four different approaches to the sizing

problem [PUT92]– “Fuzzy Logic” sizing– Function point sizing– Standard component sizing– Change sizing

Page 6: Chapter 23

6

An Example of LOC-Based Estimation (1)Function Estimated LOCUser interface and control facilities (UICF)Two-dimensional geometric analysis (2DGA)Three-dimensional geometric analysis (3DGA)Database management (DBM)Computer graphics display facilities (CGDF)Peripheral control function (PCF)Design analysis modules (DAM)

2,3005,3006,8003,3504,9502,1008,400

Estimated lines of code 33,200

Page 7: Chapter 23

7

An Example of LOC-Based Estimation (2) Estimated lines of code = W = 33,200 Let,

– Average productivity = 620 LOC/pm = X– Labor rate = $8,000 per month = Y

So,– Cost per line of code = Z = Y/X = $13 (approx.)– Total estimated project cost = W*Z = $431,000

(approx.)– Estimated effort = W/X = 54 person-months

(approx)

Page 8: Chapter 23

8

An Example of FP-Based Estimation (1)

Information Domain Value

Count Weighting factorSimple Average Complex

External Inputs (EIS) 3 X 3 4 6 = 9

External Outputs (EOs) 2 X 4 5 7 = 8

External Inquiries (EQs) 2 X 3 4 6 = 6

Internal Logical Files (ILFs)

1 X 7 10 15 = 7

External Interface Files (EIFs)

4 X 5 7 10 = 20

Count Total 50

Figure 15.4: Computing function points

Page 9: Chapter 23

9

An Example of FP-Based Estimation (2)

Page 10: Chapter 23

10

An Example of FP-Based Estimation (3)

Value Adjustment Factors 1.17

Page 11: Chapter 23

11

An Example of FP-Based Estimation (4) Now,

– FPestimated = count-total [0.65 + 0.01 (Fi)]• Fi (i = 1 to 14 are value adjustment factors)

So,– FPestimated = W = 320 [0.65 + 0.01 52] = 375

(approx.) Let,

– Average Productivity = X = 6.5 FP/pm– Labor rate = Y = $8,000 per month

So,– Cost per FP = Z = Y/X = $1,230 (approx.)– Total estimated project cost = W*Z = $461,000 (approx.)– Estimated effort = W/X = 58 person-months (approx)

Page 12: Chapter 23

12

Empirical Estimation Models

Uses empirically derived formulas to predict effort as a function of LOC or FP

The empirical data are derived from a limited sample of projects

So, no estimation model is appropriate for all classes of s/w and in all development environments

The results obtained from such models must be used judiciously

An estimation model should be calibrated to reflect local conditions

Page 13: Chapter 23

13

The Structure of Estimation Models (1) Derived using regression analysis on data

collected from past s/w projects Overall structure, E = A + B (ev)c

Here,– A, B, and C are empirically derived constants– E is effort in person-months– ev is the estimation variable (either LOC or FP)

Some form of project adjustment component is also used

Page 14: Chapter 23

14

The Structure of Estimation Models (2) Example of a LOC-oriented estimation model

(Bailey-Basili model)E = 5.5 + 0.73 (KLOC)1.16

Example of a FP-oriented estimation model (Kemerer model)E = -37 + 0.96 FP

Estimation models must be calibrated for local needs.

Page 15: Chapter 23

15

The COCOMO II Model (1) COnstructive COst Model A hierarchy of estimation models Addresses the following areas

– Application composition model– Early design stage model– Post-architecture stage model

Three different sizing options are available– Object points– Function points– Lines of source code

Page 16: Chapter 23

16

The COCOMO II Model (2) The COCOMO II application

composition model uses object points Object point is computed using counts

of the number of– Screens (at the user interface)– Reports– Components likely to be required to build

the application

Page 17: Chapter 23

17

The COCOMO II Model (3)

Object typeComplexity weight

Simple Medium Difficult

Screen 1 2 3

Report 2 5 8

3GL component 10

Figure 23.6: Complexity weighting for object types

Page 18: Chapter 23

18

The COCOMO II Model (4)

Developer’s experience/capability

Very low Low Nominal High Very

High

Environment maturity/capability

Very low Low Nominal High Very

High

PROD 4 7 13 25 50

Figure 23.7: Productivity rate for object points

Page 19: Chapter 23

19

The COCOMO II Model (5) NOP = (object points) [(100-%reuse)/100]

– NOP = New Object Points– Object Points = Weighted Total– %reuse = Percent of reuse

Estimated effort = NOP/PROD– PROD = Productivity Rate– PROD = NOP/person-month

Page 20: Chapter 23

20

The Software Equation [PUT92] (1) It is a multivariate model Has been derived from productivity data

collected for over 4000 contemporary s/w projects

E = [LOC B0.333/P]3 (1/t4) Here,

– E = effort in person-months or person-years– t = project duration in months or years– B = “special skills factor”– P = “productivity parameter”

Page 21: Chapter 23

21

The Software Equation [PUT92] (2) For small programs (KLOC = 5 to 15)

– B = 0.16 For programs greater than 70 KLOC

– B = 0.39 P = 2000 for development of real-time

embedded s/w P = 10,000 for telecommunication and

systems s/w P = 28,000 for business systems applications

Page 22: Chapter 23

22

The Software Equation [PUT92] (3) Simplified formulas

– tmin = 8.14 (LOC/P)0.43 in months for tmin > 6 months• tmin = minimum development time

– E = 180 Bt3 in person-months for E 20 person-months• Here t is represented in years

Page 23: Chapter 23

23

The Make/Buy Decision S/W acquisition options

– s/w may be purchased (or licensed) off the shelf

– “full-experience” or “partial-experience” s/w components may be acquired and then modified and integrated to meet specific needs

– s/w may be custom built by an outside contractor to meet the purchaser’s specifications

Page 24: Chapter 23

24

Creating a Decision Tree

system Xsystem Xreusereuse

simple (0.30)simple (0.30)

difficult (0.70)difficult (0.70)

minorminor changeschanges(0.40)(0.40)

majormajorchangeschanges

(0.60)(0.60)

simple (0.20)simple (0.20)

complex (0.80)complex (0.80)

majormajor changeschanges (0.30)(0.30)

minorminor changeschanges(0.70)(0.70)

$380,000$380,000

$450,000$450,000

$275,000$275,000

$310,000$310,000

$490,000$490,000

$210,000$210,000

$400,000$400,000

buybuy

contractcontract

without changes (0.60)without changes (0.60)

with changes (0.40)with changes (0.40)

$350,000$350,000

$500,000$500,000

buildbuild

Page 25: Chapter 23

Computing Expected Cost

(path probability) x (estimated path cost) i i

For example, the expected cost to build is:

expected cost = 0.30 ($380K) + 0.70 ($450K)

similarly,

expected cost = $382K

expected cost = $267K

expected cost = $410K

build

reuse

buy

contr

expected cost =

= $429 K

25

Page 26: Chapter 23

26

Outsourcing

S/W engineering activities are contracted to a third party who does the work at lower cost and, hopefully, higher quality

S/W work conducted within a company is reduced to a contract management activity

The decision to outsource can be either strategic or tactical

Has both merits and demerits

Page 27: Chapter 23

27

Chapter 23 23.5, 23.6, 23.6.1, 23.6.3, 23.6.4 23.7 23.10 Exercises-

23.4, 23.5, 23.7