SOFTWARE ENGINEERING WITH JAVA

Size: px
Start display at page:

Download "SOFTWARE ENGINEERING WITH JAVA"

Transcription

1 SOFTWARE ENGINEERING WITH JAVA Stephen R. Schach Vanderbilt University Irwin McGraw-Hill Boston, Massachusetts Burr Ridge, Illinois Dubuque, Iowa Madison, Wisconsin New York, New York San Francisco, California St. Louis, Missouri

2 Prologue 1 PART 1 Introduction to the Software Process 3 CHAPTER 1 Scope of Software Engineering Historical Aspects Economic Aspects Maintenance Aspects Specification and Design Aspects Team Programming Aspects The Object-Oriented Paradigm Terminology 22 Chapter Review 24 For Further Reading 25 Problems 26 References 27 CHAPTER 2 The Software Process and Its Problems Client, Developer, and User Requirements Phase Requirements Phase Testing Specification Phase Specification Phase Testing Planning Phase Planning Phase Testing Design Phase Design Phase Testing Implementation Phase Implementation Phase Testing Integration Phase Integration Phase Testing Maintenance Phase Maintenance Phase Testing Retirement Problems with Software Production: Essence and Accidents Complexity Conformity Changeability Invisibility No Silver Bullet? 49 Chapter Review 50 For Further Reading 50 Problems 51 References 52 CHAPTER 3 Software Life-Cycle Models Build-and-Fix Model 53 Waterfall Model Analysis of the Waterfall Model 57 Rapid Prototyping Model Integrating the Waterfall and Rapid Prototyping Models 61 Incremental Model Analysis of the Incremental Model 63 Spiral Model Analysis of the Spiral Model 70 Comparison of Life-Cycle Models 71 Capability Maturity Model 71 ISO Chapter Review 76 For Further Reading Problems 78 References 78 CHAPTER 4 Stepwise Refinement, CASE, and Other Tools of the Trade Stepwise Refinement Stepwise Refinement Example 83 xvii

3 xviii 4.2 Cost-Benefit Analysis CASE (Computer-Aided Software Engineering) Taxonomy of CASE Scope of CASE Software Versions Revisions Variations Configuration Control Configuration Control during Product Maintenance Baselines Configuration Control during Product Development Build Tools Productivity Gains with CASE Technology Software Metrics 103 Chapter Review 105 For Further Reading 105 Problems 106 References 108 CHAPTER 5 Testing Principles Quality Issues Software Quality Assurance Managerial Independence Nonexecution-Based Testing Walkthroughs Managing Walkthroughs Inspections Comparison of Inspections and Walkthroughs Metrics for Inspections Execution-Based Testing What Should Be Tested? Utility Reliability Robustness Performance Correctness Testing versus Correctness Proofs Example of a Correctness Proof Correctness Proof Case Study Correctness Proofs and Software Engineering Who Should Perform Execution-Based Testing? When Testing Stops 133 Chapter Review 134 For Further Reading 134 Problems 135 References 137 CHAPTER 6 Introduction to Objects What Is a Module? Cohesion Coincidental Cohesion Logical Cohesion Temporal Cohesion Procedural Cohesion Communicational Cohesion Informational Cohesion Functional Cohesion Cohesion Example Coupling Content Coupling Common Coupling Control Coupling Stamp Coupling Data Coupling Coupling Example Data Encapsulation Data Encapsulation and Product Development Data Encapsulation and Product Maintenance Abstract Data Types Information Hiding Objects Polymorphism and Dynamic Binding Cohesion and Coupling of Objects Reuse Impediments to Reuse Reuse Case Studies Raytheon Missile Systems Division Toshiba Software Factory NASA Software 183

4 xix GTE Data Services Hewlett-Packard Reuse and Maintenance Objects and Productivity 186 Chapter Review 188 For Further Reading 188 Problems 189 References 191 PART 2 The Phases of the Software Process 195 CHAPTER 7 Requirements Phase Requirements Analysis Techniques Rapid Prototyping Human Factors Rapid Prototyping as a Specification Technique Reusing the Rapid Prototype Other Uses of Rapid Prototyping Management Implications of the Rapid Prototyping Model Experiences with Rapid Prototyping Joint Application Design Comparison of Requirements Analysis Techniques Testing during the Requirements Phase CASE Tools for the Requirements Phase Metrics for the Requirements Phase MSG Case Study: Requirements Phase MSG Case Study: Rapid Prototype 216 Chapter Review 217 For Further Reading 218 Problems 219 References 220 CHAPTER 8 Specification Phase The Specification Document Informal Specifications Case Study: Text Processing Structured Systems Analysis Sally's Software Shop Other Semiformal Techniques Entity-Relationship Modeling Finite State Machines Elevator Problem: Finite State Machines Petri Nets Elevator Problem: Petri Nets Z Elevator Problem: Z Analysis of Z Other Formal Techniques Comparison of Specification Techniques Testing during the Specification Phase CASE Tools for the Specification Phase Metrics for the Specification Phase MSG Case Study: Structured Systems Analysis 258 Chapter Review 260 For Further Reading 261 Problems 262 References 264 CHAPTER 9 Object-Oriented Analysis Phase Object-Oriented versus Structured Paradigm Object-Oriented Analysis Elevator Problem: Object-Oriented Analysis Class Modeling Dynamic Modeling Functional Modeling Object-Oriented Life-Cycle Models 9.5 CASE Tools for the Object-Oriented Analysis Phase MSG Case Study: Object-Oriented Analysis

5 XX Chapter Review 286 For Further Reading 286 Problems 288 References 289 CHAPTER 10 Planning Phase Estimating Duration and Cost Metrics for the Size of a Product Techniques of Cost Estimation Intermediate COCOMO Tracking Duration and Cost Estimates Components of a Software Project Management Plan Software Project Management Plan Framework IEEE Software Project Management Plan Planning of Testing Planning of Object-Oriented Projects Training Requirements Documentation Standards CASE Tools for the Planning Phase Testing during the Planning Phase MSG Case Study: Planning Phase 315 Chapter Review 315 For Further Reading 316 Problems 317 References 318 CHAPTER 11 Design Phase Design and Abstraction Action-Oriented Design Data Flow Analysis Data Flow Analysis Example Extensions Transaction Analysis Data-Oriented Design Jackson System Development Overview of Jackson System Development Why Jackson System Development Is Presented in This Chapter Elevator Problem: Jackson System Development Analysis of Jackson System Development Techniques of Jackson, Warnier, and Orr Object-Oriented Design Elevator Problem: Object-Oriented Design Detailed Design Comparison of Action-, Data-, and Object-Oriented Design Difficulties Associated with Real-Time Systems Real-Time Design Techniques Testing during the Design Phase CASE Tools for the Design Phase Metrics for the Design Phase MSG Case Study: Object-Oriented Design 358 Chapter Review 359 For Further Reading 361 Problems 363 References 364 CHAPTER 12 Implementation Phase Choice of Programming Language Fourth Generation Languages Structured Programming History of Structured Programming Why the goto Statement Is Considered Harmful Good Programming Practice Coding Standards Team Organization Democratic Team Approach Analysis of the Democratic Team Approach Classical Chief Programmer Team Approach The New York Times Project 390

6 xxi Impracticality of the Classical Chief Programmer Team Approach 391 Beyond Chief Programmer and Democratic Teams 392 Portability Hardware Incompatibilities Operating System Incompatibilities Numerical Software Incompatibilities Compiler Incompatibilities 399 Why Portability? 402 Techniques for Achieving Portability Portable System Software Portable Application Software Portable Data 406 Module Reuse 407 Module Test Case Selection Testing to Specifications versus Testing to Code Feasibility of Testing to Specifications Feasibility of Testing to Code 409 Black-Box Module-Testing Techniques Equivalence Testing and Boundary Value Analysis Functional Testing 413 Glass-Box Module-Testing Techniques Structural Testing: Statement, Branch, and Path Coverage Complexity Metrics 415 Code Walkthroughs and Inspections 418 Comparison of Module-Testing Techniques 418 Cleanroom 419 Testing Objects 420 Management Aspects of Module- Testing When to Rewrite Rather Than Debug a Module 424 Testing Distributed Software 425 Testing Real-Time Software 427 CASE Tools for the Implementation Phase MSG Case Study: Black-Box Test Cases 429 Chapter Review 431 For Further Reading 431 Problems 433 References 435 CHAPTER 13 Implementation and Integration Phase Implementation and Integration Top-Down Implementation and Integration Bottom-Up Implementation and Integration Sandwich Implementation and Integration Implementation and Integration of Object-Oriented Products Management Issues during the Implementation and Integration Phase 446 Testing during the Implementation and Integration Phase 447 Integration Testing of Graphical User Interfaces 447 Product Testing 448 Acceptance Testing 449 CASE Tools for the Implementation and Integration Phase 450 CASE Tools for the Complete Software Process 451 Language-Centered Environments 451 Structure-Oriented Environments 452 Toolkit Environments 452 Integrated Environments Process Integration Tool Integration Other Forms of Integration 456 Environments for Business Applications 456 Public Tool Infrastructures 457 Comparison of Environment Types 458 Metrics for the Implementation and Integration Phase 458

7 xxii MSG Case Study: Implementation and Integration Phase 459 Chapter Review 460 For Further Reading 460 Problems 461 References 462 CHAPTER 14 Maintenance Phase Why Maintenance Is Necessary What Is Required of Maintenance Programmers Maintenance Case Study Management of Maintenance Fault Reports Authorizing Changes to the Product Ensuring Maintainability Problem of Repeated Maintenance Maintenance of Object-Oriented Software Maintenance Skills versus Development Skills Reverse Engineering Testing during the Maintenance Phase CASE Tools for the Maintenance Phase Metrics for the Maintenance Phase 479 Chapter Review 479 For Further Reading 480 Problems 480 References 481 Epilogue 483 Appendices A Osbert Oglesby Art Dealer 491 B Software Engineering Resources 494 C MSG Case Study: Rapid Prototype D MSG Case Study: Systems Analysis E 496 Structured 509 MSG Case Study: Object-Oriented Analysis 513 F MSG Case Study: Software Project Management Plan 514 G MSG Case Study: Design 519 H MSG Case Study: Black-Box Test Cases 539 MSG Case Study: Source Code 542 Bibliography 581 Author Index 605 Subject Index 608 I