0b56ccaced95a59194e47d089d5fd248.ppt
- Количество слайдов: 59
Slide 9. 1 Object-Oriented and Classical Software Engineering Fifth Edition, WCB/Mc. Graw-Hill, 2002 Stephen R. Schach srs@vuse. vanderbilt. edu © The Mc. Graw-Hill Companies, 2002
CHAPTER 9 PLANNING AND ESTIMATING © The Mc. Graw-Hill Companies, 2002 Slide 9. 2
Overview l l l l l Slide 9. 3 Planning and the software process Estimating duration and cost Software project management plan components Software project management plan framework IEEE software project management plan Planning of testing Planning of object-oriented projects Training requirements Documentation standards © The Mc. Graw-Hill Companies, 2002
Planning and Estimating l l Before starting to build software, it is essential to plan the entire development effort in detail Planning continues during development and then maintenance – Initial planning is not enough – The earliest possible detailed planning is after the specification phase © The Mc. Graw-Hill Companies, 2002 Slide 9. 4
Planning and the Software Process l Accuracy of estimation increases as the process proceeds © The Mc. Graw-Hill Companies, 2002 Slide 9. 5
Planning and the Software Process (contd) Slide 9. 6 l Example – Cost estimate of $1 million during the requirements phase » Likely actual cost is in the range ($0. 25 M, $4 M) – Cost estimate of $1 million in the middle of the specification phase » Likely actual cost is in the range ($0. 5 M, $2 M) – Cost estimate of $1 million end of the specification phase (earliest appropriate time) » Likely actual cost is in the range ($0. 67 M, $1. 5 M) l This model is old (1976) – Estimating techniques have improved – But the shape of the curve is likely to be similar © The Mc. Graw-Hill Companies, 2002
Estimating Duration and Cost l l Accurate duration estimation is critical Accurate cost estimation is critical – Internal, external costs l There are too many variables for accurate estimate of cost or duration © The Mc. Graw-Hill Companies, 2002 Slide 9. 7
Human Factors l l Sackman (1968) showed differences of up to 28 to 1 between pairs of programmers He compared matched pairs of programmers – – – l Product size Product execution time Development time Coding time Debugging time Critical staff members may resign during project © The Mc. Graw-Hill Companies, 2002 Slide 9. 8
Metrics for the Size of a Product l l l Lines of Code (LOC) Software Science FFP Function Points COCOMO © The Mc. Graw-Hill Companies, 2002 Slide 9. 9
Lines of Code l l Slide 9. 10 Lines of code (LOC), or Thousand delivered source instructions (KDSI) – Source code is only a small part of total software effort – Different languages different lengths of code – LOC not defined for nonprocedural languages (like LISP) – It is not clear how to count lines of code » » » Executable lines of code? Data definitions ? Comments? JCL statements? Changed/deleted lines? – Not everything written is delivered to the client © The Mc. Graw-Hill Companies, 2002
Lines of Code (contd) l l Slide 9. 11 LOC is known when the product finished Estimation based on LOC is doubly dangerous – To start estimation process, LOC in finished product must be estimated – LOC estimate is then used to estimate the cost of the product — uncertain input to an uncertain cost estimator © The Mc. Graw-Hill Companies, 2002
Software Science l l l Slide 9. 12 Metrics based on number of operands, operators Limited predictive power—metrics can be computed only after the product has been implemented There are major doubts about the validity of Software Science © The Mc. Graw-Hill Companies, 2002
Metrics for the Size of a Product (contd) l Slide 9. 13 Metrics based on measurable quantities that can be determined early in software life cycle – FFP – Function Points © The Mc. Graw-Hill Companies, 2002
FFP Metric l l Slide 9. 14 For cost estimation of medium-scale DP systems The three basic structural elements of DP systems – files, flows, and processes l Given number of files (Fi), flows (Fl), processes (Pr) – Size (S), cost (C) given by S C l = = Fi + Fl + Pr b S Constant b varies from organization to organization © The Mc. Graw-Hill Companies, 2002
FFP Metric (contd) l Validity and reliability of FFP metric were demonstrated using a purposive sample – BUT, the metric was never extended to include databases © The Mc. Graw-Hill Companies, 2002 Slide 9. 15
Function Points l l Based on number of inputs (Inp), outputs (Out), inquiries (Inq), master files (Maf), interfaces (Inf) For any product, size in “function points” is given by FP = 4 Inp + 5 Out + 4 Inq + 10 Maf + 7 Inf l Slide 9. 16 Oversimplification of a 3 -step process. © The Mc. Graw-Hill Companies, 2002
Function Points (contd) l Slide 9. 17 1. Classify each component of product (Inp, Out, Inq, Maf, Inf) as simple, average, or complex. – Assign appropriate number of function points – Sum gives UFP (unadjusted function points) © The Mc. Graw-Hill Companies, 2002
Function Points (contd) l 2. Compute technical complexity factor (TCF) – Assign value from 0 (“not present”) to 5 (“strong influence throughout”) to each of 14 factors such as transaction rates, portability – Add 14 numbers total degree of influence (DI) TCF = 0. 65 + 0. 01 DI – Technical complexity factor (TCF) lies between 0. 65 and 1. 35 © The Mc. Graw-Hill Companies, 2002 Slide 9. 18
Function Points (contd) l 3. Number of function points (FP) given by FP = UFP TCF © The Mc. Graw-Hill Companies, 2002 Slide 9. 19
Analysis of Function Points l l l Slide 9. 20 Function points are usually better than KDSI— but there are some problems “Errors in excess of 800% counting KDSI, but only 200% in counting function points” (Jones, 1987) Like FFP, maintenance can be inaccurately measured © The Mc. Graw-Hill Companies, 2002
Mk II function points l l l Slide 9. 21 Intended to compute UFP more accurately Decompose software into component transactions, each consisting of input, process, and output Widely used all over the world © The Mc. Graw-Hill Companies, 2002
Techniques of Cost Estimation l l Slide 9. 22 Expert judgment by analogy Experts compare target product to completed products – – Guesses can lead to hopelessly incorrect cost estimates Experts may recollect completed products inaccurately Human experts have biases However, results of estimation by broad group of experts may be accurate © The Mc. Graw-Hill Companies, 2002
Techniques of Cost Estimation (contd) l l Bottom-up approach Break product into smaller components – Smaller components may be no easier to estimate – Process-level costs © The Mc. Graw-Hill Companies, 2002 Slide 9. 23
Techniques of Cost Estimation (contd) l l Slide 9. 24 Algorithmic models Metric used as input to model to compute cost, duration – An algorithmic model is unbiased, and superior to expert opinion – However, estimates are only as good as the underlying assumptions l Examples – SLIM Model – Price S Model – COnstructive COst MOdel (COCOMO) l COCOMO consists of three models – Macro-estimation model for product as a whole – Intermediate COCOMO – Micro-estimation model which treats product in detail l We examine intermediate COCOMO © The Mc. Graw-Hill Companies, 2002
Intermediate COCOMO l 1. Estimate length of product in KDSI © The Mc. Graw-Hill Companies, 2002 Slide 9. 25
Intermediate COCOMO (contd) l 2. Estimate product development mode (organic, semidetached, embedded) l Example – Straightforward product (“organic mode”) Nominal effort = 3. 2 (KDSI)1. 05 person-months © The Mc. Graw-Hill Companies, 2002 Slide 9. 26
Intermediate COCOMO (contd) l 3. Compute nominal effort l Example – Organic product, est. 12, 000 delivered source statements (12 KDSI) Nominal effort = 3. 2 (12)1. 05 = 43 person-months © The Mc. Graw-Hill Companies, 2002 Slide 9. 27
Intermediate COCOMO (contd) l 4. Multiply nominal value by 15 software development cost multipliers l Example – Product complexity multiplier l Intermodule control and decision tables © The Mc. Graw-Hill Companies, 2002 Slide 9. 28
Intermediate COCOMO (contd) l Software development effort multipliers © The Mc. Graw-Hill Companies, 2002 Slide 9. 29
Intermediate COCOMO (contd) l Slide 9. 30 Example – Microprocessor-based communications processing software for electronic funds transfer network with high reliability, performance, development schedule, and interface requirements l 1. Complex (“embedded”) mode © The Mc. Graw-Hill Companies, 2002
Intermediate COCOMO (contd) l Slide 9. 31 2. Estimate: 10, 000 delivered source instructions © The Mc. Graw-Hill Companies, 2002
Intermediate COCOMO (contd) l 3. Nominal effort = 2. 8 (10)1. 20 = 44 personmonths © The Mc. Graw-Hill Companies, 2002 Slide 9. 32
Intermediate COCOMO (contd) l 4. Product of effort multipliers = 1. 35, so estimated effort for project is – 1. 35 44 = 59 person-months © The Mc. Graw-Hill Companies, 2002 Slide 9. 33
Intermediate COCOMO (contd) l Software development effort multipliers © The Mc. Graw-Hill Companies, 2002 Slide 9. 34
Intermediate COCOMO (contd) l Slide 9. 35 Estimated effort for project (59 person-months) used as input for additional formulas for – – – Dollar costs Development schedules Phase and activity distributions Computer costs Annual maintenance costs Related items © The Mc. Graw-Hill Companies, 2002
Intermediate COCOMO (contd) l l Intermediate COCOMO has been validated with respect to broad sample Actual values within 20% of predicted values about 68% of time – Intermediate COCOMO was most accurate estimation method of its time © The Mc. Graw-Hill Companies, 2002 Slide 9. 36
COCOMO II l 1995 extension to 1981 COCOMO that incorporates – – – l Object orientation Modern life-cycle models Rapid prototyping Fourth-generation languages COTS software COCOMO II is far more complex than the first version © The Mc. Graw-Hill Companies, 2002 Slide 9. 37
COCOMO II (contd) l Three different models – Application composition model for early phases » Based on feature points (like function points) – Early design model » Based on function points – Post-architecture model » Based on function points or KDSI © The Mc. Graw-Hill Companies, 2002 Slide 9. 38
COCOMO II (contd) l COCOMO Effort model is effort = a (size)b – Intermediate COCOMO » Three values for (a, b) – COCOMO II » b varies depending on values of certain parameters l COCOMO II supports reuse © The Mc. Graw-Hill Companies, 2002 Slide 9. 39
COCOMO II (contd) l COCOMO II has 17 multiplicative cost drivers (was 15) – Seven are new l It is too soon for results regarding – Accuracy of COCOMO II – Extent of improvement (if any) over Intermediate COCOMO © The Mc. Graw-Hill Companies, 2002 Slide 9. 40
Tracking Duration and Cost Estimates l l Slide 9. 41 Whatever estimation method used, careful tracking is vital Components of a software project management plan (SPMP) – Work to be done – Resources with which to do it – Money to pay for it © The Mc. Graw-Hill Companies, 2002
Resources l Resources needed for software development: – People – Hardware – Support software © The Mc. Graw-Hill Companies, 2002 Slide 9. 42
Use of Resources Varies with Time l l Rayleigh curves accurately depict resource consumption Entire software development plan must be a function of time © The Mc. Graw-Hill Companies, 2002 Slide 9. 43
Work Categories l Slide 9. 44 Project function – Work carried on throughout project – Examples: project management, quality control l Activity – – – l Work that relates to a specific phase Major unit of work With precise beginning and ending dates That consumes resources, and Results in work products like budget, design, schedules, source code, or users’ manual Task – An activity comprises a set of tasks (the smallest unit of work subject to. The Mc. Graw-Hill Companies, accountability) management 2002 ©
Completion of Work Products l l Slide 9. 45 Milestone: Date on which the work product is to be completed It must first pass reviews performed by – Fellow team members – Management – Client l Once the work product has been reviewed and agreed upon, it becomes a baseline © The Mc. Graw-Hill Companies, 2002
Work Package l Work product, plus – – – l Slide 9. 46 Staffing requirements Duration Resources Name of responsible individual Acceptance criteria for work product Money – Vital component of plan – Detailed budget must be worked out as a function of time – Money must be allocated, as function of time, to » Project functions » Activities © The Mc. Graw-Hill Companies, 2002
How to Plan Software Development l l l Slide 9. 47 State problem clearly (Specification Phase) Determine viable solution strategies (Specification Phase) Should client be advised to computerize? – Cost–benefit analysis l If so, which viable solution strategy? Decide by – Minimizing total cost to client, or – Maximizing total return on investments, or – Other methods l Develop SPMP for product as whole © The Mc. Graw-Hill Companies, 2002
Software Project Management Plan (SPMP) Slide 9. 48 l l Determine work units Estimate resources required Draw up budget Come up with detailed timetable © The Mc. Graw-Hill Companies, 2002
Framework for SPMP l IEEE Standard 1058. 1 – Standard widely agreed upon – Designed for use with all types of software product – Advantages of standardization © The Mc. Graw-Hill Companies, 2002 Slide 9. 49
IEEE SPMP © The Mc. Graw-Hill Companies, 2002 Slide 9. 50
Planning of Testing l Slide 9. 51 SPMP must explicitly state what testing is to be done – Traceability – All black box test cases must be drawn up as soon as possible after specifications are complete © The Mc. Graw-Hill Companies, 2002
Planning of Object-Oriented Projects l l Object-oriented product consists of largely independent pieces Planning is somewhat easier Whole is more than the sum of its parts Use COCOMO II ( or modify intermediate COCOMO estimators) © The Mc. Graw-Hill Companies, 2002 Slide 9. 52
Planning of Object-Oriented Projects (contd) Slide 9. 53 l However, reuse destroys everything – Reuse of existing components during development – Production of components for future reuse l l These work in opposite directions Newer data: savings outweigh costs © The Mc. Graw-Hill Companies, 2002
Training Requirements l Slide 9. 54 “We don’t need to worry about training until the product is finished, and then we can train the user ” – Training is generally needed by the members of the development group, starting with training in software planning – New software development method necessitates training for every member of the group – Introduction of hardware or software tools of any sort necessitates training – Programmers may need training in the operating system, implementation language – Documentation preparation training may be needed – Computer operators require training © The Mc. Graw-Hill Companies, 2002
Documentation Standards l Slide 9. 55 How much documentation is generated by a product? – IBM internal commercial product (50 KDSI) » 28 pages of documentation per KDSI – Commercial software product of same size » 66 pages per KDSI – IMS/360 Version 2. 3 (about 166 KDSI) » 157 pages of documentation per KDSI – (TRW) For every 100 hours spent on coding activities, 150– 200 hours were spent on documentation-related activities © The Mc. Graw-Hill Companies, 2002
Types of Documentation l l l Planning Control Financial Technical Source code Comments within source code © The Mc. Graw-Hill Companies, 2002 Slide 9. 56
Documentation Standards l l l Reduce misunderstandings between team members Aid SQA Only new employees have to learn standards Standards assist maintenance programmers Standardization is important for user manuals © The Mc. Graw-Hill Companies, 2002 Slide 9. 57
CASE Tools for the Planning Phase l l l Slide 9. 58 Word processor, spreadsheet Automated intermediate COCOMO/COCOMO II Management tools assist with planning and monitoring – Mac. Project, Microsoft Project © The Mc. Graw-Hill Companies, 2002
Testing during the Planning Phase l l Must check SPMP as a whole Pay particular attention to duration and cost estimates © The Mc. Graw-Hill Companies, 2002 Slide 9. 59
0b56ccaced95a59194e47d089d5fd248.ppt