Schaum's Outline of Software Engineering.Pdf
Total Page:16
File Type:pdf, Size:1020Kb
Y L F M A E T Team-Fly® Want to learn more? We hope you enjoy this McGraw-Hill eBook! If you’d like more information about this book, its author, or related books and web- sites, please click here. SCHAUM’S OUTLINE OF Theory and Problems of SOFTWARE ENGINEERING This page intentionally left blank. Theory and Problems of SOFTWARE ENGINEERING DAVID A. GUSTAFSON Computing and Information Sciences Department Kansas State University Schaum’s Outline Series McGRAW-HILL New York Chicago San Francisco Lisbon London Madrid Mexico City Milan New Delhi San Juan Seoul Singapore Sydney Toronto McGraw-Hill abc Copyright © 2002 by The McGraw-Hill Companies,Inc. All rights reserved. Manufactured in the United States of America. Except as per- mitted under the United States Copyright Act of 1976, 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 permission of the publisher. 0-07-140620-4 The material in this eBook also appears in the print version of this title:0-07-137794-8. All trademarks are trademarks of their respective owners. Rather than put a trademark symbol after every occurrence of a trademarked name, we use names in an editorial fashion only, and to the benefit of the trademark owner, with no intention of infringement of the trademark. Where such designations appear in this book, they have been printed with initial caps. McGraw-Hill eBooks are available at special quantity discounts to use as premiums and sales promotions, or for use in corporate train- ing programs. For more information, please contact George Hoare, Special Sales, at [email protected] or (212) 904- 4069. TERMS OF USE This is a copyrighted work and The McGraw-Hill Companies, Inc. (“McGraw-Hill”) and its licensors reserve all rights in and to the work. Use of this work is subject to these terms. Except as permitted under the Copyright Act of 1976 and the right to store and retrieve one copy of the work, you may not decompile, disassemble, reverse engineer, reproduce, modify, create derivative works based upon, transmit, distribute, disseminate, sell, publish or sublicense the work or any part of it without McGraw-Hill’s prior consent. You may use the work for your own noncommercial and personal use; any other use of the work is strictly prohibited. Your right to use the work may be terminated if you fail to comply with these terms. THE WORK IS PROVIDED “AS IS”. McGRAW-HILL AND ITS LICENSORS MAKE NO GUARANTEES OR WARRANTIES AS TO THE ACCURACY, ADEQUACY OR COMPLETENESS OF OR RESULTS TO BE OBTAINED FROM USING THE WORK, INCLUDING ANY INFORMATION THAT CAN BE ACCESSED THROUGH THE WORK VIA HYPERLINK OR OTHERWISE, AND EXPRESSLY DISCLAIM ANY WARRANTY, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. McGraw-Hill and its licensors do not warrant or guarantee that the functions contained in the work will meet your requirements or that its operation will be uninterrupted or error free. Neither McGraw-Hill nor its licensors shall be liable to you or anyone else for any inaccuracy, error or omission, regardless of cause, in the work or for any damages resulting therefrom. McGraw-Hill has no responsibility for the content of any information accessed through the work. Under no circumstances shall McGraw-Hill and/or its licensors be liable for any indirect, incidental, spe- cial, punitive, consequential or similar damages that result from the use of or inability to use the work, even if any of them has been advised of the possibility of such damages. This limitation of liability shall apply to any claim or cause whatsoever whether such claim or cause arises in contract, tort or otherwise. DOI: 10.1036/0071406204 Software Engineering is not just surveys of techniques and terminology; it includes techniques that students must master. This book is designed for college students taking courses in software engineering at the undergraduate and graduate level. During my 25+ years of teaching software engineering at both the undergraduate and graduate level, I have realized the need for solved examples and for guidance to help students with these techniques. This book is intended to be used in conjunction with a textbook or lecture notes on software engineering. The background and motivation for diagrams, notations and techniques are not included. Included are rules about proper construction of diagrams. Instructions on using techniques are given. Rules are included about applying techniques. Most important, examples and solved problems are given for diagrams, notations, and techniques. Writing this book was not a solitary effort. Many people have influenced this book. In particular, I wish to acknowledge the following: Karen, my wonderful wife, for all of her support and help in creating this book. Without her help, this book would not have been done. Steve, who took time from his PhD studies to critique many of the chapters. My students, who provided the original inspiration for writing this material and who have read these chapters as individual readings, have found mistakes, and have offered suggestions. I would like to thank Ramon, who suggested this book, and the McGraw-Hill editorial staff for their help and suggestions. DAVID A. GUSTAFSON v Copyright 2002 The McGraw-Hill Companies, Inc. Click Here for Terms of Use. This page intentionally left blank. For more information about this book, click here. CHAPTER 1 The Software Life Cycle 1 1.1 Introduction 1 1.2 Software Life Cycle Models 3 CHAPTER 2 Software Process and Other Models 7 2.1 The Software Process Model 7 2.2 Data Flow Diagrams 9 2.3 Petri Net Models 10 2.4 Object Models 11 2.5 Use Case Diagrams 14 2.6 Scenarios 15 2.7 Sequence Diagrams 15 2.8 Hierarchy Diagrams 16 2.9 Control Flow Graphs 16 2.10 State Diagrams 17 2.11 Lattice Models 19 CHAPTER 3 Software Project Management 30 3.1 Introduction 30 3.2 Management Approaches 30 3.3 TeamApproaches 31 3.4 Critical Practices 32 3.5 Capability Maturity Model 33 3.6 Personal Software Process 34 3.7 Earned Value Analysis 35 3.8 Error Tracking 36 3.9 Postmortem Reviews 37 CHAPTER 4 Software Project Planning 47 4.1 Project Planning 47 vii Copyright 2002 The McGraw-Hill Companies, Inc. Click Here for Terms of Use. viii CONTENTS 4.2 WBS–Work Breakdown Structure 47 4.3 PERT–ProgramEvaluation and Review Technique 50 4.4 Software Cost Estimation 54 CHAPTER 5 Software Metrics 72 5.1 Introduction 72 5.2 Software Measurement Theory 73 5.3 Product Metrics 76 5.4 Process Metrics 83 5.5 The GQM Approach 83 CHAPTER 6 Risk Analysis and Management 91 6.1 Introduction 91 6.2 Risk Identification 91 6.3 Risk Estimation 92 6.4 Risk Exposure 92 6.5 Risk Mitigation 94 6.6 Risk Management Plans 94 CHAPTER 7 Software Quality Assurance 99 7.1 Introduction 99 7.2 Formal Inspections and Technical Reviews 99 7.3 Software Reliability 101 7.4 Statistical Quality Assurance 102 CHAPTER 8 Requirements 112 8.1 Introduction 112 8.2 Object Model 112 8.3 Data Flow Modeling 113 8.4 Behavioral Modeling 114 8.5 Data Dictionary 116 8.6 SystemDiagrams 117 8.7 IEEE Standard for Software Requirements Specification 118 CHAPTER 9 Software Design 127 9.1 Introduction 127 9.2 Phases of the Design Process 128 9.3 Design Concepts 130 9.4 Measuring Cohesion 132 9.5 Measuring Coupling 135 9.6 Requirements Traceability 136 CHAPTER 10 Software Testing 145 10.1 Introduction 145 CONTENTS ix 10.2 Software Testing Fundamentals 145 10.3 Test Coverage Criterion 146 10.4 Data Flow Testing 154 10.5 RandomTesting 155 10.6 Boundary Testing 157 CHAPTER 11 Object-Oriented Development 169 11.1 Introduction 169 11.2 Identifying Objects 171 11.3 Identifying Associations 175 11.4 Identifying Multiplicities 178 CHAPTER 12 Object-Oriented Metrics 183 12.1 Introduction 183 12.2 Metrics Suite for Object-Oriented Design 184 12.3 The MOOD Metrics 189 CHAPTER 13 Object-Oriented Testing 199 13.1 IntroductionY 199 13.2 MM TestingL 200 13.3 Function Pair CoverageF 201 CHAPTER 14 Formal NotationsM 208 14.1 IntroductionA 208 14.2 Formal Specifications 208 14.3 Object ConstraintE Language (OCL) 210 T INDEX 219 Team-Fly® This page intentionally left blank. SCHAUM’S OUTLINE OF Theory and Problems of SOFTWARE ENGINEERING This page intentionally left blank. The Software Life Cycle 1.1 Introduction The software life cycle is the sequence of different activities that take place during software development. There are also different deliverables produced. Although deliverables can be agreements or evaluations, normally deliverables are objects, such as source code or user manuals. Usually, the activities and deliverables are closely related. Milestones are events that can be used for telling the status of the project. For example, the event of completing the user manual could be a mile- stone. For management purposes, milestones are essential because completion of milestones allow, the manager to assess the progress of the software development. 1.1.1 TYPES OF SOFTWARE LIFE CYCLE ACTIVITIES 1.1.1.1 Feasibility—Determining if the proposed development is worth- while. Market analysis—Determining if there is a potential market for this product. 1.1.1.2 Requirements—Determining what functionality the software should contain. Requirement elicitation—Obtaining the requirements from the user. Domain analysis—Determining what tasks and structures are common to this problem. 1.1.1.3 Project planning—Determining how to develop the software.