"Software Engineering
A PRACTITIONER’S APPROACH
McGraw-Hill Series in Computer Science Senior Consulting Editor C. L. Liu, National Tsing Hua University Consulting Editor Allen B. Tucker, Bowdoin College Fundamentals of Computing and Programming Computer Organization and Architecture Systems and Languages Theoretical Foundations Software Engineering and Databases Artificial Intelligence Networks, Parallel and Distributed Computing Graphics and Visualization The MIT Electrical and Computer Science Series Software Engineering and Databases Atzeni, Ceri, Paraborschi, and Torlone, Database Systems, 1/e Mitchell, Machine Learning, 1/e Musa, Iannino, and Okumoto, Software Reliability, 1/e Pressman, Software Engineering: A Beginner’s Guide, 1/e Pressman, Software Engineering: A Practioner’s Guide, 5/e Ramakrishnan/Gehrke, Database Management Systems, 2/e Schach, Classical and ObjectOriented Software Engineering with UML and C++, 4/e Schach, Classical and ObjectOriented Software Engineering with UML and Java, 1/e
Software Engineering
A PRACTITIONER’S APPROACH
FIFTH EDITION
Roger S. Pressman, Ph.D.
Boston Burr Ridge, IL Dubuque, IA Madison, WI New York San Francisco St. Louis Bangkok Bogotá Caracas Lisbon London Madrid Mexico City Milan New Delhi Seoul Singapore Sydney Taipei Toronto
McGraw-Hill Higher Education
A Division of The McGraw-Hill Companies
SOFTWARE ENGINEERING Published by McGraw-Hill, an imprint of The McGraw-Hill Companies, Inc. 1221 Avenue of the Americas, New York, NY, 10020. Copyright/2001, 1997, 1992, 1987, 1982, by The McGraw-Hill Companies, Inc. All rights reserved. No part of this publication may be reproduced or distributed in any form or by any means, or stored in a database or retrieval system, without the prior written consent of The McGraw-Hill Companies, Inc., including, but not limited to, in any network or other electronic storage or transmission, or broadcast for distance learning. This book is printed on acid-free paper. 1 2 3 4 5 6 7 8 9 0 DOC/DOC 0 9 8 7 6 5 4 3 2 1 0 ISBN 0073655783 Publisher: Thomas Casson Executive editor: Betsy Jones Developmental editor: Emily Gray Marketing manager: John Wannemacher Project manager: Karen J. Nelson Production supervisor: Heather Burbridge Coordinator freelance design: Keith McPherson Supplement coordinator: Rose Range New media: Christopher Styles Cover design: Rhiannon Erwin Cover illustrator: Joseph Gilians Compositor: Carlisle Communications, Ltd. Typeface: 8.5/13.5 Leawood Printer: R. R. Donnelley & Sons Company Library of Congress Cataloging-in-Publication Data Pressman, Roger S. Software engineering: a practitioner’s approach / Roger S. Pressman.—5th ed. p. cm.— (McGraw-Hill series in computer science) Includes index. ISBN 0-07-365578-3 1. Software engineering. I. Title. II. Series. QA76.758.P75 2001 005.1—dc21 00-036133 http://www.mhhe.com
To my parents
ABOUT THE AUTHOR
R
oger S. Pressman is an internationally recognized authority in software process improvement and software engineering technologies. For over three decades, he has
worked as a software engineer, a manager, a professor, an author, and a consultant, focusing on software engineering issues. As an industry practitioner and manager, Dr. Pressman worked on the development of CAD/CAM systems for advanced engineering and manufacturing applications. He has also held positions with responsibility for scientific and systems programming. After receiving a Ph.D. in engineering from the University of Connecticut, Dr. Pressman moved to academia where he became Bullard Associate Professor of Computer Engineering at the University of Bridgeport and director of the university's Computer-Aided Design and Manufacturing Center. Dr. Pressman is currently president of R.S. Pressman & Associates, Inc., a consulting firm specializing in software engineering methods and training. He serves as principle consultant, helping companies establish effective software engineering practices. He also designed and developed the company’s software engineering training and process improvement products—Essential Software Engineering, a complete video curriculum that is among the industry's most comprehensive treatments of the subject, and Process Advisor, a selfdirected system for software engineering process improvement. Both products are used by hundreds of companies worldwide. Dr. Pressman has written many technical papers, is a regular contributor to industry periodicals, and is author of six books. In addition to Software Engineering: A Practitioner's Approach, he has written A Manager's Guide to Software Engineering (McGraw-Hill), an award-winning book that uses a unique Q&A format to present management guidelines for instituting and understanding software engineering technology; Making Software Engineering Happen (Prentice-Hall), the first book to address the critical management problems associated with software process improvement; and Software Shock (Dorset House), a treatment that focuses on software and its impact on business and society. Dr. Pressman is on the Editorial Boards of IEEE Software and the Cutter IT Journal, and for many years, was editor of the “Manager” column in IEEE Software. Dr. Pressman is a well-known speaker, keynoting a number of major industry conferences. He has presented tutorials at the International Conference on Software Engineering and at many other industry meetings. He is a member of the ACM, IEEE, and Tau Beta Pi, Phi Kappa Phi, Eta Kappa Nu, and Pi Tau Sigma.
vi
C O N T E N T S AT A G L A N C E
Preface
xxv
PA R T O N E
The Product and the Process
CHAPTER 1 CHAPTER 2 The Product
3
1
The Process 19
PA R T T W O
Managing Software Projects
CHAPTER 3 CHAPTER 4 CHAPTER 5 CHAPTER 6 CHAPTER 7 CHAPTER 8 CHAPTER 9
53 55 79
Project Management Concepts Software Project Planning
113
Software Process and Project Metrics Risk Analysis and Management Project Scheduling and Tracking Software Quality Assurance
193 145 165
Software Configuration Management
225
PA R T T H R E E
Conventional Methods for Software Engineering
CHAPTER 10 CHAPTER 11 CHAPTER 12 CHAPTER 13 CHAPTER 14 CHAPTER 15 CHAPTER 16 CHAPTER 17 CHAPTER 18 CHAPTER 19 System Engineering Analysis Modeling Architectural Design User Interface Design
245 271
243
Analysis Concepts and Principles
299
Design Concepts and Principles
365 401 423
335
Component-Level Design Software Testing Strategies
Software Testing Techniques Technical Metrics for Software
437 477 507
PA R T F O U R
Object-Oriented Software Engineering
CHAPTER 20 CHAPTER 21 CHAPTER 22 Object-Oriented Concepts and Principles Object-Oriented Analysis Object-Oriented Design
571 603
539 541
vii
viii
C O N T E N T S AT A G L A N C E
CHAPTER 23 CHAPTER 24
Object-Oriented Testing
631 653
Technical Metrics for Object-Oriented Systems
PA R T F I V E
Advanced Topics in Software Engineering
CHAPTER 25 CHAPTER 26 CHAPTER 27 CHAPTER 28 CHAPTER 29 CHAPTER 30 CHAPTER 31 CHAPTER 32 Formal Methods
673 699 721
671
Cleanroom Software Engineering Client/Server Software Engineering Web Engineering Reengineering The Road Ahead
769 799
Component-Based Software Engineering
747
Computer-Aided Software Engineering
845
825
TA B L E O F C O N T E N T S
PA R T O N E — T H E P R O D U C T A N D T H E P R O C E S S CHAPTER 1 THE PRODUCT 1.1 1.2
1 3
The Evolving Role of Software 4 Software 6 1.2.1 Software Characteristics 6 1.2.2 Software Applications 9 1.3 Software: A Crisis on the Horizon? 11 1.4 Software Myths 12 1.5 Summary 15 REFERENCES 15 PROBLEMS AND POINTS TO PONDER 16 FURTHER READINGS AND INFORMATION SOURCES CHAPTER 2 THE PROCESS 2.1 19
17
Software Engineering: A Layered Technology 20 2.1.1 Process, Methods, and Tools 20 2.1.2 A Generic View of Software Engineering 21 2.2 The Software Process 23 2.3 Software Process Models 26 2.4 The Linear Sequential Model 28 2.5 The Prototyping Model 30 2.6 The RAD Model 32 2.7 Evolutionary Software Process Models 34 2.7.1 The Incremental Model 35 2.7.2 The Spiral Model 36 2.7.3 The WINWIN Spiral Model 38 2.7.4 The Concurrent Development Model 40 2.8 Component-Based Development 42 2.9 The Formal Methods Model 43 2.10 Fourth Generation Techniques 44 2.11 Process Technology 46 2.12 Product and Process 46 2.13 Summary 47 REFERENCES 47 PROBLEMS AND POINTS TO PONDER 49 FURTHER READINGS AND INFORMATION SOURCES 50
ix
x
CONTENTS
PA R T T W O — M A N A G I N G S O F T WA R E P R O J E C T S CHAPTER 3
53 55
PROJECT MANAGEMENT CONCEPTS 3.1
The Management Spectrum 56 3.1.1 The People 56 3.1.2 The Product 57 3.1.2 The Process 57 3.1.3 The Project 57 3.2 People 58 3.2.1 The Players 58 3.2.2 Team Leaders 59 3.2.3 The Software Team 60 3.2.4 Coordination and Communication Issues 65 3.3 The Product 67 3.3.1 Software Scope 67 3.3.2 Problem Decomposition 67 3.4 The Process 68 3.4.1 Melding the Product and the Process 69 3.4.2 Process Decomposition 70 3.5 The Project 71 3.6 The W5HH Principle 73 3.7 Critical Practices 74 3.8 Summary 74 REFERENCES 75 PROBLEMS AND POINTS TO PONDER 76 FURTHER READINGS AND INFORMATION SOURCES 77 CHAPTER 4 S O F T WA R E P R O C E S S A N D P R O J E C T M E T R I C S 4.1 4.2 79
Measures, Metrics, and Indicators 80 Metrics in the Process and Project Domains 81 4.2.1 Process Metrics and Software Process Improvement 82 4.2.2 Project Metrics 86 4.3 Software Measurement 87 4.3.1 Size-Oriented Metrics 88 4.3.2 Function-Oriented Metrics 89 4.3.3 Extended Function Point Metrics 91 4.4 Reconciling Different Metrics Approaches 94 4.5 Metrics for Software Quality 95 4.5.1 An Overview of Factors That Affect Quality 95 4.5.2 Measuring Quality 96 4.5.3 Defect Removal Efficiency 98 4.6 Integrating Metrics Within the Software Engineering Process 98 4.6.1 Arguments for Software Metrics 99 4.6.2 Establishing a Baseline 100 4.6.3 Metrics Collection, Computation, and Evaluation 100 4.7 Managing Variation: Statistical Quality Control 100 4.8 Metrics for Small Organizations 104 4.9 Establishing a Software Metrics Program 105 4.10 Summary 107 REFERENCES 107
CONTENTS
xi PROBLEMS AND POINTS TO PONDER 109 FURTHER READINGS AND INFORMATION SOURCES
110
CHAPTER 5
S O F T WA R E P R O J E C T P L A N N I N G 5.1 5.2 5.3
113
Observations on Estimating 114 Project Planning Objectives 115 Software Scope 115 5.3.1 Obtaining Information Necessary for Scope 116 5.3.2 Feasibility 117 5.3.3 A Scoping Example 118 5.4 Resources 120 5.4.1 Human Resources 121 5.4.2 Reusable Software Resources 121 5.4.3 Environmental Resources 122 5.5 Software Project Estimation 123 5.6 Decomposition Techniques 124 5.6.1 Software Sizing 124 5.6.2 Problem-Based Estimation 126 5.6.3 An Example of LOC-Based Estimation 128 5.6.4 An Example of FP-Based Estimation 129 5.6.4 Process-Based Estimation 130 5.6.5 An Example of Process-Based Estimation 131 5.7 Empirical Estimation Models 132 5.7.1 The Structure of Estimation Models 132 5.7.2 The COCOMO Model 133 5.7.3 The Software Equation 135 5.8 The Make/Buy Decision 136 5.8.1 Creating a Decision Tree 137 5.8.2 Outsourcing 138 5.9 Automated Estimation Tools 139 5.10 Summary 140 REFERENCES 140 PROBLEMS AND POINTS TO PONDER 141 FURTHER READINGS AND INFORMATION SOURCES 142 CHAPTER 6 R I S K A N A LY S I S A N D M A N A G E M E N T 6.1 6.2 6.3 145
Reactive versus Proactive Risk Strategies 146 Software Risks 146 Risk Identification 148 6.3.1 Assessing Overall Project Risk 149 6.3.2 Risk Components and Drivers 149 6.4 Risk Projection 151 6.4.1 Developing a Risk Table 151 6.4.2 Assessing Risk Impact 153 6.4.3 Risk Assessment 154 6.5 Risk Refinement 156 6.6 Risk Mitigation, Monitoring, and Management 156 6.7 Safety Risks and Hazards 158 6.8 The RMMM Plan 159 6.9 Summary 159 REFERENCES 160
xii
CONTENTS
PROBLEMS AND POINTS TO PONDER 161 FURTHER READINGS AND INFORMATION SOURCES CHAPTER 7 PROJECT SCHEDULING AND TRACKING 7.1
162 165
Basic Concepts 166 7.1.1 Comments on “Lateness” 167 7.2.1 Basic Principles 168 7.2 The Relationship Between People and Effort 170 7.2.1 An Example 170 7.2.2 An Empirical Relationship 171 7.2.3 Effort Distribution 172 7.3 Defining a Task Set for the Software Project 172 7.3.1 Degree of Rigor 173 7.3.2 Defining Adaptation Criteria 174 7.3.3 Computing a Task Set Selector Value 175 7.3.4 Interpreting the TSS Value and Selecting the Task Set 7.4 Selecting Software Engineering Tasks 177 7.5 Refinement of Major Tasks 178 7.6 Defining a Task Network 180 7.7 Scheduling 181 7.7.1 Timeline Charts 182 7.7.2 Tracking the Schedule 185 7.8 Earned Value Analysis 186 7.9 Error Tracking 187 7.10 The Project Plan 189 7.11 Summary 189 REFERENCES 189 PROBLEMS AND POINTS TO PONDER 190 FURTHER READINGS AND INFORMATION SOURCES 192 CHAPTER 8 S O F T WA R E Q U A L I T Y A S S U R A N C E 8.1 193
176
8.2 8.3
8.4
8.5
8.6 8.7 8.8
Quality Concepts 194 8.1.1 Quality 195 8.1.2 Quality Control 196 8.1.3 Quality Assurance 196 8.1.4 Cost of Quality 196 The Quality Movement 198 Software Quality Assurance 199 8.3.1 Background Issues 200 8.3.2 SQA Activities 201 Software Reviews 202 8.4.1 Cost Impact of Software Defects 203 8.4.2 Defect Amplification and Removal 204 Formal Technical Reviews 205 8.5.1 The Review Meeting 206 8.5.2 Review Reporting and Record Keeping 207 8.5.3 Review Guidelines 207 Formal Approaches to SQA 209 Statistical Software Quality Assurance 209 Software Reliability 212 8.8.1 Measures of Reliability and Availability 212 8.8.2 Software Safety 213
CONTENTS
xiii 8.9 8.10 Mistake-Proofing for Software 214 The ISO 9000 Quality Standards 216 8.10.1 The ISO Approach to Quality Assurance Systems 8.10.2 The ISO 9001 Standard 217 8.11 The SQA Plan 218 8.12 Summary 219 REFERENCES 220 PROBLEMS AND POINTS TO PONDER 221 FURTHER READINGS AND INFORMATION SOURCES 222
217
CHAPTER 9
S O F T WA R E C O N F I G U R AT I O N M A N A G E M E N T 9.1 Software Configuration Management 226 9.1.1 Baselines 227 9.1.2 Software Configuration Items 228 9.2 The SCM Process 230 9.3 Identification of Objects in the Software Configuration 9.4 Version Control 232 9.5 Change Control 234 9.6 Configuration Audit 237 9.7 Status Reporting 237 9.8 SCM Standards 238 9.9 Summary 238 REFERENCES 239 PROBLEMS AND POINTS TO PONDER 239 FURTHER READINGS AND INFORMATION SOURCES 240
225
230
PA R T T H R E E — C O N V E N T I O N A L M E T H O D S F O R S O F T WA R E E N G I N E E R I N G CHAPTER 10 SYSTEM ENGINEERING 10.1 10.2 245
243
Computer-Based Systems 246 The System Engineering Hierarchy 248 10.2.1 System Modeling 249 10.2.2 System Simulation 251 10.3 Business Process Engineering: An Overview 251 10.4 Product Engineering: An Overview 254 10.5 Requirements Engineering 256 10.5.1 Requirements Elicitation 256 10.5.2 Requirements Analysis and Negotiation 258 10.5.3 Requirements Specification 259 10.5.4 System Modeling 259 10.5.5 Requirements Validation 260 10.5.6 Requirements Management 261 10.6 System Modeling 262 10.7 Summary 265 REFERENCES 267 PROBLEMS AND POINTS TO PONDER 267 FURTHER READINGS AND INFORMATION SOURCES 269
xiv
CONTENTS
CHAPTER 11
A N A LY S I S C O N C E P T S A N D P R I N C I P L E S 11.1 11.2
271
Requirements Analysis 272 Requirements Elicitation for Software 274 11.2.1 Initiating the Process 274 11.2.2 Facilitated Application Specification Techniques 11.2.3 Quality Function Deployment 279 11.2.4 Use-Cases 280 11.3 Analysis Principles 282 11.3.1 The Information Domain 283 11.3.2 Modeling 285 11.3.3 Partitioning 286 11.3.4 Essential and Implementation Views 288 11.4 Software Prototyping 289 11.4.1 Selecting the Prototyping Approach 289 11.4.2 Prototyping Methods and Tools 290 11.5 Specification 291 11.5.1 Specification Principles 291 11.5.2 Representation 292 11.5.3 The Software Requirements Specification 293 11.6 Specification Review 294 11.7 Summary 294 REFERENCES 295 PROBLEMS AND POINTS TO PONDER 296 FURTHER READINGS AND INFORMATION SOURCES 297 CHAPTER 12 A N A LY S I S M O D E L I N G 12.1 12.2 12.3 299
275
A Brief History 300 The Elements of the Analysis Model 301 Data Modeling 302 12.3.1 Data Objects, Attributes, and Relationships 302 12.3.2 Cardinality and Modality 305 12.3.3 Entity/Relationship Diagrams 307 12.4 Functional Modeling and Information Flow 309 12.4.1 Data Flow Diagrams 311 12.4.2 Extensions for Real-Time Systems 312 12.4.3 Ward and Mellor Extensions 312 12.4.4 Hatley and Pirbhai Extensions 315 12.5 Behavioral Modeling 317 12.6 The Mechanics of Structured Analysis 319 12.6.1 Creating an Entity/Relationship Diagram 319 12.6.2 Creating a Data Flow Model 321 12.6.3 Creating a Control Flow Model 324 12.6.4 The Control Specification 325 12.6.5 The Process Specification 327 12.7 The Data Dictionary 328 12.8 Other Classical Analysis Methods 330 12.9 Summary 331 REFERENCES 331 PROBLEMS AND POINTS TO PONDER 332 FURTHER READINGS AND INFORMATION SOURCES 334
CONTENTS
xv DESIGN CONCEPTS AND PRINCIPLES 13.1 13.2 335
CHAPTER 13
Software Design and Software Engineering 336 The Design Process 338 13.2.1 Design and Software Quality 338 13.2.2 The Evolution of Software Design 339 13.3 Design Principles 340 13.4 Design Concepts 341 13.4.1 Abstraction 342 13.4.2 Refinement 343 13.4.3 Modularity 343 13.4.4 Software Architecture 346 13.4.5 Control Hierarchy 347 13.4.6 Structural Partitioning 348 13.4.7 Data Structure 349 13.4.8 Software Procedure 351 13.4.9 Information Hiding 351 13.5 Effective Modular Design 352 13.5.1 Functional Independence 352 13.5.2 Cohesion 353 13.5.3 Coupling 354 13.6 Design Heuristics for Effective Modularity 355 13.7 The Design Model 357 13.8 Design Documentation 358 13.9 Summary 359 REFERENCES 359 PROBLEMS AND POINTS TO PONDER 361 FURTHER READINGS AND INFORMATION SOURCES 362 CHAPTER 14 ARCHITECTURAL DESIGN 14.1 365
14.2
14.3
14.4
14.5
14.6
14.7
Software Architecture 366 14.1.1 What Is Architecture? 366 14.1.2 Why Is Architecture Important? 367 Data Design 368 14.2.1 Data Modeling, Data Structures, Databases, and the Data Warehouse 368 14.2.2 Data Design at the Component Level 369 Architectural Styles 371 14.3.1 A Brief Taxonomy of Styles and Patterns 371 14.3.2 Organization and Refinement 374 Analyzing Alternative Architectural Designs 375 14.4.1 An Architecture Trade-off Analysis Method 375 14.4.2 Quantitative Guidance for Architectural Design 376 14.4.3 Architectural Complexity 378 Mapping Requirements into a Software Architecture 378 14.5.1 Transform Flow 379 14.5.2 Transaction Flow 380 Transform Mapping 380 14.6.1 An Example 380 14.6.2 Design Steps 381 Transaction Mapping 389 14.7.1 An Example 390 14.7.2 Design Steps 390
xvi
CONTENTS
14.8 Refining the Architectural Design 394 14.9 Summary 395 REFERENCES 396 PROBLEMS AND POINTS TO PONDER 397 FURTHER READINGS AND INFORMATION SOURCES CHAPTER 15 U S E R I N T E R FA C E D E S I G N 15.1 401
399
The Golden Rules 402 15.1.1 Place the User in Control 402 15.1.2 Reduce the User’s Memory Load 404 15.1.3 Make the Interface Consistent 404 15.2 User Interface Design 405 15.2.1 Interface Design Models 405 15.2.2 The User Interface Design Process 407 15.3 Task Analysis and Modeling 408 15.4 Interface Design Activities 410 15.4.1 Defining Interface Objects and Actions 410 15.4.2 Design Issues 413 15.5 Implementation Tools 415 15.6 Design Evaluation 416 15.7 Summary 418 REFERENCES 418 PROBLEMS AND POINTS TO PONDER 419 FURTHER READINGS AND INFORMATION SOURCES 420 CHAPTER 16 COMPONENT-LEVEL DESIGN 16.1 423
Structured Programming 424 16.1.1 Graphical Design Notation 425 16.1.2 Tabular Design Notation 427 16.1.3 Program Design Language 429 16.1.4 A PDL Example 430 16.2 Comparison of Design Notation 432 16.3 Summary 433 REFERENCES 433 PROBLEMS AND POINTS TO PONDER 434 FURTHER READINGS AND INFORMATION SOURCES 435 CHAPTER 17 S O F T WA R E T E S T I N G T E C H N I Q U E S 17.1 437
17.2 17.3 17.4
17.5
Software Testing Fundamentals 438 17.1.1 Testing Objectives 439 17.1.2 Testing Principles 439 17.1.3 Testability 440 Test Case Design 443 White-Box Testing 444 Basis ..."
|
You need to upgrade your Flash Player , or try to enable javascript in order see this document properly.
|
|