Showing posts with label Software Engineering. Show all posts
Showing posts with label Software Engineering. Show all posts

Friday, November 23, 2012

Software-Engineering-Rajib-Mall




This comprehensively revised second edition incorporates the latest advancements in software engineering techniques and practices. The principles' involved are thoroughly discussed and applied to practical software assignments to help students appreciate the intricacies of the software development process.

The book is logically organized to cover expanded and revised treatment of all software process activities. The chapter on object toriented design has been completely revamped due to the advent of UMl (Unified Modelling language) and its rapid acceptance by the industry and academia. Also a new chapter on software reuse and component -based software development has been introduced.

Several subtle and important concepts have been illustrated through small examples rather than through a single large running example. This approach helps students to quickly understand the specific details of design aspects.

This concise text is designed primarily for a one-semester course in Software Engineering for undergraduate students of computer science and engineering. It will be useful for MCA, MBA and IT courses as well. large number of worked-out examples and practice problems.

Key Features:
  • Practical assignments and exercises at ends of chapters allow fhe student to test understanding of the material.
  • PowerPoint slides and solutions manual to selected problems available from the author for instructors teaching from this book. 
Other Software Engineering Books
Other Software Engineering Books
 An Integrated Approach to Software Engineering
Guide to the Software Engineering Body of Knowledge
Software engineering - Wikipedia, the free encyclopedia
Software Engineering Institute

Tuesday, November 20, 2012

Software Engineering - Applying UML and Patterns - An Introduction to Object-Oriented Analysis and Design and the Unified Process




TABLE OF CONTENTS
Foreword xv
Preface xvii
PART I INTRODUCTION
1  Object-Oriented Analysis and Design        3
Applying UML and Patterns in OOA/D        3
Assigning Responsibilities        6
What Is Analysis and Design?        6
What Is Object-Oriented Analysis and Design?        7
An Example        7
The UML        10
Further Readings        11
2  Iterative Development and the Unified Process        13
The Most Important UP Idea: Iterative Development        14
Additional UP Best Practices and Concepts        18
The UP Phases and Schedule-Oriented Terms        19
The UP Disciplines (was Workflows)        20
Process Customization and the Development Case        23
The Agile UP        24
The Sequential "Waterfall" Lifecycle        25
You Know You Didn't Understand the UP When...        26
Further Readings        26
3  Case Study: The NextGen POS System        29
The NextGen POS System        29
Architectural Layers and Case Study Emphasis        30
The Book's Strategy: Iterative Learning and Development        31
PART II INCEPTION
4  Inception        35
Inception: An Analogy        36
Inception May Be Very Brief      36
What Artifacts May Start in Inception?        37
You Know You Didn't Understand Inception When...        38
5  Understanding Requirements        41
Types of Requirements     
42 Further Readings        43
6  Use-Case Model: Writing Requirements in Context        45
Goals and Stories        46
Background        46
Use Cases and Adding Value        47
Use Cases and Functional Requirements        48
Use Case Types and Formats        49
Fully Dressed Example: Process Sale        50
Explaining the Sections        54
Coals and Scope of a Use Case        59
Finding Primary Actors, Goals, and Use Cases        63
Congratulations: Use Cases Have Been Written, and Are Imperfect        67
Write Use Cases in an Essential Ul-Free Style        68
Use Cases Within the UP        75
Case Study: Use Cases in the NextGen Inception Phase        79
Further Readings        79
UP Artifacts and Process Context        81
7  Identifying Other Requirements        83
NextGen POS Examples        84
NextGen Example: (Partial) Supplementary Specification          84
Commentary: Supplementary Specification        88
NextGen Example: (Partial) Vision          91
Commentary: Vision        93
NextGen Example: A (Partial) Glossary          98
Commentary: Glossary (Data Dictionary)        99
Reliable Specifications: An Oxymoron?        100
Online Artifacts at the Project Website        101
Not Much UML During Inception?        101
Other Requirement Artifacts Within the UP        101
Further Readings        104
UP Artifacts and Process Context        105
8  From Inception to Elaboration        107
Checkpoint: What Happened in Inception?        108
On to Elaboration        109
Planning the Next Iteration        110
Iteration 1 Requirements and Emphasis: Fundamental OOA/D Skills        112
What Artifacts May Start in Elaboration?        118
You Know You Didn't Understand Elaboration When...        114
PART III ELABORATION ITERATION 1
9  Use-Case Model: Drawing System Sequence Diagrams        117
System Behavior        118
System Sequence Diagrams        118
Example of an SSD        119
Inter-System SSDs        120
SSDs and Use Cases        120
System Events and the System Boundary        120
Naming System Events and Operations        121
Showing Use Case Text        122
SSDs and the Glossary        122
SSDs Within the UP        123
Further Readings        124
UP Artifacts        125
10           Domain Model: Visualizing Concepts        127
Domain Models        128
Conceptual Class Identification        132
Candidate Conceptual Classes for the Sales Domain        136
Domain Modeling Guidelines        137
Resolving Similar Conceptual Classes—Register vs. "POST"        139
Modeling the Unreal World        140
Specification or Description Conceptual Classes        140
UML Notation, Models, and Methods: Multiple Perspectives        144
Lowering the Representational Gap        146
Example: The NextGen POS Domain Model        148
Domain Models Within the UP        148
Further Readings        150

Other Software Engineering Books
 An Integrated Approach to Software Engineering
Guide to the Software Engineering Body of Knowledge
Software engineering - Wikipedia, the free encyclopedia
Software Engineering Institute
Download

Friday, November 16, 2012

Software Engineering: A Practitioner's Approach 5th Edition





FIFTH EDITION
Roger S. Pressman, Ph.D.
PART ONE The Product and the Process   1
CHAPTER 1        The Product   3
CHAPTER 2        The Process  19
PART TWO Managing Software Projects    53
CHAPTER 3        Project Management Concepts   55
CHAPTER 4        Software Process and Project Metrics   79
CHAPTER 5        Software Project Planning   113
CHAPTER 6        Risk Analysis and Management   145
CHAPTER 7        Project Scheduling and Tracking   165
CHAPTER 8        Software Quality Assurance   193
CHAPTER 9        Software Configuration Management   225
PART THREE Conventional Methods for Software Engineering    243
CHAPTER 10      System Engineering   245
CHAPTER 11      Analysis Concepts and Principles   271
CHAPTER 12      Analysis Modeling   299
CHAPTER 13      Design Concepts and Principles   335
CHAPTER 14      Architectural Design   365
CHAPTER 15      User Interface Design   401
CHAPTER 16      Component-Level Design   423
CHAPTER 17      Software Testing Techniques   437
CHAPTER 18      Software Testing Strategies   477
CHAPTER 19      Technical Metrics for Software   507
PART FOUR Object-Oriented Software Engineering    539
CHAPTER 20      Object-Oriented Concepts and Principles   541
CHAPTER 21      Object-Oriented Analysis   571
CHAPTER 22      Object-Oriented Design   603
CHAPTER 23      Object-Oriented Testing   631
CHAPTER 24      Technical Metrics for Object-Oriented Systems   653
PART FIVE Advanced Topics in Software Engineering    671
CHAPTER 25      Formal Methods   673
CHAPTER 26      Cleanroom Software Engineering   699
CHAPTER 27      Component-Based Software Engineering   721
CHAPTER 28      Client/Server Software Engineering   747
CHAPTER 29      Web Engineering   769
CHAPTER 30      Reengineering   799
CHAPTER 31      Computer-Aided Software Engineering   825
CHAPTER 32      The Road Ahead   845

Software engineering - Wikipedia, the free encyclopedia
Software Engineering Institute
Guide to the Software Engineering Body of Knowledge
An Integrated Approach to Software Engineering
Other Software Engineering Books
Download

Wednesday, January 11, 2012

A Concise Introduction to Software Engineering






Contents
1. The Software Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.1 Cost, Schedule, and Quality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.2 Scale and Change . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.3 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Self-Assessment Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2. Software Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.1 Process and Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
2.2 Component Software Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.3 Software Development Process Models . . . . . . . . . . . . . . . . . . . . . . 13
2.3.1 Waterfall Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
2.3.2 Prototyping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
2.3.3 Iterative Development . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
2.3.4 Rational Unified Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
2.3.5 Timeboxing Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
2.3.6 Extreme Programming and Agile Processes . . . . . . . . . . . . 28
2.3.7 Using Process Models in a Project . . . . . . . . . . . . . . . . . . . . 30
2.4 Project Management Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
2.5 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Self-Assessment Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
3. Software Requirements Analysis and Specification . . . . . . . . . . 37
3.1 Value of a Good SRS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
3.2 Requirement Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
3.3 Requirements Specification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
3.3.1 Desirable Characteristics of an SRS . . . . . . . . . . . . . . . . . . . 41
3.3.2 Components of an SRS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
3.3.3 Structure of a Requirements Document . . . . . . . . . . . . . . . 46
3.4 Functional Specification with Use Cases . . . . . . . . . . . . . . . . . . . . . 49
3.4.1 Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
3.4.2 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
3.4.3 Extensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
3.4.4 Developing Use Cases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
3.5 Other Approaches for Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
3.5.1 Data Flow Diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
3.5.2 ER Diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
3.6 Validation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
3.7 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
Self-Assessment Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
4. Planning a Software Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
4.1 Effort Estimation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
4.1.1 Top-Down Estimation Approach . . . . . . . . . . . . . . . . . . . . . 71
4.1.2 Bottom-Up Estimation Approach . . . . . . . . . . . . . . . . . . . . . 74
4.2 Project Schedule and Staffing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
4.3 Quality Planning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
4.4 Risk Management Planning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
4.4.1 Risk Management Concepts . . . . . . . . . . . . . . . . . . . . . . . . . 80
4.4.2 Risk Assessment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
4.4.3 Risk Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
4.4.4 A Practical Risk Management Planning Approach . . . . . . 84
4.5 Project Monitoring Plan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
4.5.1 Measurements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
4.5.2 Project Monitoring and Tracking . . . . . . . . . . . . . . . . . . . . . 87
4.6 Detailed Scheduling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
4.7 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
Self-Assessment Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
5. Software Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
5.1 Role of Software Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
5.2 Architecture Views . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
5.3 Component and Connector View . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
5.3.1 Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
5.3.2 Connectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
5.3.3 An Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
5.4 Architecture Styles for C&C View . . . . . . . . . . . . . . . . . . . . . . . . . . 108
5.4.1 Pipe and Filter. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
5.4.2 Shared-Data Style . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
5.4.3 Client-Server Style . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
5.4.4 Some Other Styles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
5.5 Documenting Architecture Design . . . . . . . . . . . . . . . . . . . . . . . . . . 114
5.6 Evaluating Architectures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
5.7 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
Self-Assessment Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
6. Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
6.1 Design Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
6.1.1 Coupling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
6.1.2 Cohesion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
6.1.3 The Open-Closed Principle . . . . . . . . . . . . . . . . . . . . . . . . . . 129
6.2 Function-Oriented Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
6.2.1 Structure Charts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
6.2.2 Structured Design Methodology . . . . . . . . . . . . . . . . . . . . . . 134
6.2.3 An Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
6.3 Object-Oriented Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
6.3.1 OO Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
6.3.2 Unified Modeling Language (UML) . . . . . . . . . . . . . . . . . . . 147
6.3.3 A Design Methodology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156
6.3.4 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
6.4 Detailed Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
6.4.1 Logic/Algorithm Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169
6.4.2 State Modeling of Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . 170
6.5 Verification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
6.6 Metrics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172
6.6.1 Complexity Metrics for Function-Oriented Design . . . . . . 173
6.6.2 Complexity Metrics for OO Design . . . . . . . . . . . . . . . . . . . 175
6.7 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177
Self-Assessment Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178
7. Coding and Unit Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
7.1 Programming Principles and Guidelines . . . . . . . . . . . . . . . . . . . . . 182
7.1.1 Structured Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
7.1.2 Information Hiding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186
7.1.3 Some Programming Practices . . . . . . . . . . . . . . . . . . . . . . . . 187
7.1.4 Coding Standards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
7.2 Incrementally Developing Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194
7.2.1 An Incremental Coding Process . . . . . . . . . . . . . . . . . . . . . . 194
7.2.2 Test-Driven Development . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
7.2.3 Pair Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197
7.3 Managing Evolving Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
7.3.1 Source Code Control and Build . . . . . . . . . . . . . . . . . . . . . . 198
7.3.2 Refactoring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200
7.4 Unit Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204
7.4.1 Testing Procedural Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205
7.4.2 Unit Testing of Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207
7.5 Code Inspection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210
7.5.1 Planning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211
7.5.2 Self-Review . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212
7.5.3 Group Review Meeting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212
7.6 Metrics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214
7.6.1 Size Measures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215
7.6.2 Complexity Metrics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216
7.7 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221
Self-Assessment Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222
8. Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225
8.1 Testing Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226
8.1.1 Error, Fault, and Failure . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226
8.1.2 Test Case, Test Suite, and Test Harness . . . . . . . . . . . . . . . 227
8.1.3 Psychology of Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228
8.1.4 Levels of Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229
8.2 Testing Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231
8.2.1 Test Plan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231
8.2.2 Test Case Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233
8.2.3 Test Case Execution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234
8.3 Black-Box Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236
8.3.1 Equivalence Class Partitioning . . . . . . . . . . . . . . . . . . . . . . . 237
8.3.2 Boundary Value Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239
8.3.3 Pairwise Testing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240
8.3.4 Special Cases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243
8.3.5 State-Based Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244
8.4 White-Box Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247
8.4.1 Control Flow-Based Criteria . . . . . . . . . . . . . . . . . . . . . . . . . 248
8.4.2 Test Case Generation and Tool Support . . . . . . . . . . . . . . . 251
8.5 Metrics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252
8.5.1 Coverage Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252
8.5.2 Reliability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253
8.5.3 Defect Removal Efficiency . . . . . . . . . . . . . . . . . . . . . . . . . . . 254
8.6 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255
Self Assessment-Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256
Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265

Other Software Engineering Books
Download

Tuesday, January 10, 2012

Schaum's Outline of Theory and Problems of Software Engineering






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 Team Approaches 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
4.2 WBS–Work Breakdown Structure 47
4.3 PERT–Program Evaluation 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 System Diagrams 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
10.2 Software Testing Fundamentals 145
10.3 Test Coverage Criterion 146
10.4 Data Flow Testing 154
10.5 Random Testing 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 Introduction 199
13.2 MM Testing 200
13.3 Function Pair Coverage 201
CHAPTER 14 Formal Notations 208
14.1 Introduction 208
14.2 Formal Specifications 208
14.3 Object Constraint Language (OCL) 210


Other Software Engineering Books
Other Core of CS Books
Download

Saturday, November 26, 2011

An Integrated Approach to Software Engineering






Contents
Preface to the Third Edition xiii
1 Introduction 1
1.1 The Problem Domain 2
1.1.1 Industrial Strength Software 2
1.1.2 Software is Expensive 4
1.1.3 Late and Unreliable 5
1.1.4 Maintenance and Rework 6
1.2 The Software Engineering Challenges 8
1.2.1 Scale 9
1.2.2 Quality and Productivity 11
1.2.3 Consistency and Repeatability 14
1.2.4 Change 15
1.3 The Software Engineering Approach 15
1.3.1 Phased Development Process 16
1.3.2 Managing the Process 20
1.4 Summary 21
Exercises 22
2 Software Processes 25
2.1 Software Process 25
2.1.1 Processes and Process Models 26
2.1.2 Component Software Processes 27
2.1.3 ETVX Approach for Process Specification 29
2.2 Desired Characteristics of Software Process 31
2.2.1 Predictability 31
2.2.2 Support Testability and Maintainability 33
2.2.3 Support Change 34
2.2.4 Early Defect Removal 35
2.2.5 Process Improvement and Feedback 36
2.3 Software Development Process Models 37
2.3.1 Waterfall Model 37
2.3.2 Prototyping 41
2.3.3 Iterative Development 43
2.3.4 Timeboxing Model 46
2.3.5 Comparision of Models 50
2.4 Other Software Processes 50
2.4.1 Project Management Process 52
2.4.2 The Inspection Process 54
2.4.3 Software Configuration Management Process 61
2.4.4 Requirements Change Management Process 67
2.4.5 Process Management Process 69
2.5 Summary 73
Exercises 75
3 Softw^are Requirements Analysis and Specification 79
3.1 Software Requirements 80
3.1.1 Need for SRS 81
3.1.2 Requirement Process 85
3.2 Problem Analysis 89
3.2.1 Informal Approach 90
3.2.2 Data Flow Modeling 91
3.2.3 Object-Oriented Modeling 103
3.2.4 Prototyping 113
3.3 Requirements Specification 117
3.3.1 Characteristics of an SRS 118
3.3.2 Components of an SRS 120
3.3.3 Specification Language 124
3.3.4 Structure of a Requirements Document 125
3.4 Functional Specification with Use Cases 128
3.4.1 Basics 129
3.4.2 Examples 132
3.4.3 Extensions 135
3.4.4 Developing Use Cases 136
3.5 Validation 138
3.6 Metrics 142
3.6.1 Size—Function Points 142
3.6.2 Quality Metrics 147
3.7 Summary 148
Exercises 150
Case Studies 152
4 Software Architecture 159
4.1 Role of Software Architecture 160
4.2 Architecture Views 163
4.3 Component and Connector View 167
4.3.1 Components 167
4.3.2 Connectors 169
4.3.3 An Example 172
4.4 Architecture Styles for C&C View 176
4.4.1 Pipe and Filter 176
4.4.2 Shared-Data Style 178
4.4.3 Client-Server Style 181
4.4.4 Some Other Styles 182
4.5 Discussion 183
4.5.1 Architecture and Design 183
4.5.2 Preserving the Integrity of an Architecture 184
4.5.3 Deployment View and Performance Analysis 188
4.5.4 Documenting Architecture Design 190
4.6 Evaluating Architectures 194
4.6.1 The ATAM Analysis Method 195
4.6.2 An Example 196
4.7 Summary 199
Exercises 201
Case Studies 203
5 Planning a Software Project 207
5.1 Process Planning 208
5.2 Effort Estimation 208
5.2.1 Uncertainties in Effort Estimation 209
5.2.2 Building Effort Estimation Models 211
5.2.3 A Bottom-Up Estimation Approach 213
5.2.4 COCOMO Model 215
5.3 Project Scheduling and Staffing 219
5.3.1 Overall Scheduling 219
5.3.2 Detailed Scheduling 221
5.3.3 An Example 223
5.3.4 Team Structure 224
5.4 Software Configuration Management Plan 225
5.5 Quality Plan 226
5.5.1 Defect Injection and Removal Cycle 227
5.5.2 Approaches to Quality Management 228
5.5.3 Quality Plan 229
5.6 Risk Management 230
5.6.1 Risk Management Concepts 230
5.6.2 Risk Assessment 232
5.6.3 Risk Control 236
5.6.4 A Practical Risk Management Approach 237
5.7 Project Monitoring Plan 237
5.7.1 Measurements 239
5.7.2 Project Monitoring and Tracking 239
5.8 Summary 241
Exercises 243
Case Studies 245
6 Function-Oriented Design 247
6.1 Design Principles 248
6.1.1 Problem Partitioning and Hierarchy 250
6.1.2 Abstraction 251
6.1.3 Modularity 253
6.1.4 Top-Down and Bottom-Up Strategies 254
6.2 Module-Level Concepts 255
6.2.1 Coupling 255
6.2.2 Cohesion 257
6.3 Design Notation and Specification ' 260
6.3.1 Structure Charts 261
6.3.2 Specification 265
6.4 Structured Design Methodology 266
6.4.1 Restate the Problem as a Data Flow Diagram 267
6.4.2 Identify the Most Abstract Input and Output Data
Elements 269
6.4.3 First-Level Factoring 271
6.4.4 Factoring the Input, Output, and Transform Branches 273
6.4.5 Design Heuristics 276
6.4.6 Transaction Analysis 277
6.4.7 Discussion 279
6.5 Verification 281
6.6 Metrics 283
6.6.1 Network Metrics 284
6.6.2 Stability Metrics 285
6.6.3 Information Flow Metrics 288
6.7 Summary 290
Exercises 292
Case Studies 294
7 Object-Oriented Design 303
7.1 GO Analysis and GO Design 304
7.2 GG Concepts 306
7.2.1 Classes and Objects 307
7.2.2 Relationships Among Objects 312
7.2.3 Inheritance and Polymorphism 315
7.3 Design Concepts 323
7.3.1 Coupling 323
7.3.2 Cohesion 325
7.3.3 The Open-Closed Principle 327
7.3.4 Some Design Guidehnes 329
7.4 Unified Modehng Language (UML) 331
7.4.1 Class Diagram 331
7.4.2 Sequence and Collaboration Diagrams 335
7.4.3 Other Diagrams and Capabilities 339
7.5 A Design Methodology 341
7.5.1 Dynamic Modehng 343
7.5.2 Functional Modeling 345
7.5.3 Defining Internal Classes and Operations 346
7.5.4 Optimize and Package 347
7.5.5 Examples 348
7.6 Metrics 356
7.7 Summary 360
Exercises 362
Case Studies 364
8 Detailed Design 371
8.1 Detailed Design and PDL 371
8.1.1 PDL 371
8.1.2 Logic/Algorithm Design 374
8.1.3 State Modeling of Classes 378
8.2 Verification 380
8.2.1 Design Walkthroughs 380
8.2.2 Critical Design Review 381
8.2.3 Consistency Checkers 382
8.3 Metrics 383
8.3.1 Cyclomatic Complexity 383
8.3.2 Data Bindings 386
8.3.3 Cohesion Metric 387
8.4 Summary 388
Exercises 389
9 Coding 391
9.1 Programming Principles and Guidelines 392
9.1.1 Common Coding Errors 393
9.1.2 Structured Programming 398
9.1.3 Information Hiding 401
9.1.4 Some Programming Practices 402
9.1.5 Coding Standards 406
9.2 Coding Process 409
9.2.1 An Incremental Coding Process 410
9.2.2 Test Driven Development 411
9.2.3 Pair Programming 413
9.2.4 Source Code Control and Build 414
9.3 Refactoring 416
9.3.1 Basic Concepts 417
9.3.2 An example 419
9.3.3 Bad Smells 422
9.3.4 Common Refactorings 424
9.4 Verification 429
9.4.1 Code Inspections 429
9.4.2 Static Analysis 431
9.4.3 Proving Correctness 437
9.4.4 Unit Testing 444
9.4.5 Combining Different Techniques 449
9.5 Metrics 451
9.5.1 Size Measures 452
9.5.2 Complexity Metrics 453
9.6 Summary 456
Exercises 458
Case Studies 462
10 Testing 465
10.1 Testing Fundamentals 466
10.1.1 Error, Fault, and Failure . 466
10.1.2 Test Oracles 468
10.1.3 Test Cases and Test Criteria 469
10.1.4 Psychology of Testing 471
10.2 Black-Box Testing 472
10.2.1 Equivalence Class Partitioning 473
10.2.2 Boundary Value Analysis 475
10.2.3 Cause-Effect Graphing 477
10.2.4 Pair-wise Testing 480
10.2.5 Special Cases 483
10.2.6 State-Based Testing 484
10.3 White-Box Testing 487
10.3.1 Control Flow-Based Criteria 488
10.3.2 Data Flow-Based Testing 491
10.3.3 An Example 495
10.3.4 Mutation Testing 498
10.3.5 Test Case Generation and Tool Support 502
10.4 Testing Process 504
10.4.1 Levels of Testing 505
10.4.2 Test Plan 507
10.4.3 Test Case Specifications 509
10.4.4 Test Case Execution and Analysis 511
10.4.5 Defect Logging and Tracking 513
10.5 Defect Analysis and Prevention 516
10.5.1 Pareto Analysis 517
10.5.2 Perform Causal Analysis 517
10.5.3 Develop and Implement Solutions 520
10.6 Metrics—Reliability Estimation 521
10.6.1 Basic Concepts and Definitions 522
10.6.2 A Reliability Model 524
10.6.3 Failure Data and Parameter Estimation 529
10.6.4 Translating to Calendar Time 532
10.6.5 An Example 532
10.7 Summary 534
Exercises 536
Case Studies 539
Bibliography 543
Index 553

Another Software Engineering Books
Download

Tuesday, November 8, 2011

A Handbook of Software and Systems Engineering






Preface xv
List of abbreviations xvi
Chapter 1: Introduction 1
1.1 Computing as empirical science 1
1.2 From observations to laws and theories 2
1.3 The role of experiments 3
1.4 Laws as lessons learned by the profession 3
1.5 On principles, methods and tools 5
1.6 Search for theories 6
1.7 About this book 8
Chapter 2: Requirements definition, prototyping, and
modeling 10
2.1 Definitions and importance 10
2.2 General observations 13
2.3 Applicable laws and their theories 15
2.3.1 Glass’ law 16
2.3.2 Boehm’s first law 17
2.3.3 Boehm’s second law 19
2.3.4 Davis’ law 22
2.3.5 Booch’s first hypothesis 25
2.4 More on requirements definition 26
2.4.1 Vision statement 26
2.4.2 Requirements elicitation and prioritization 26
2.4.3 Knowledge acquisition and management 27
2.4.4 Feasibility study or risk analysis 27
2.4.5 Functional and non-functional requirements 28
2.4.6 Safety and security requirements 28
2.4.7 Detailed documentation of requirements 28
2.4.8 Buy-in, validation and approval of requirements 29
2.4.9 Requirements tracing and change control 30
2.5 Examples and study material 30
2.5.1 Text formatting requirements 30
2.5.2 Digital library requirements 31
Exercises 33
Chapter 3: System design and specification 34
3.1 Definitions and importance 34
3.2 General observations 35
3.3 Applicable laws and their theories 38
3.3.1 Curtis’ law 38
3.3.2 Simon’s law 40
3.3.3 Constantine’s law 43
3.3.4 Parnas’ law 45
3.3.5 Denert’s law 46
3.3.6 Fitts–Shneiderman law 48
3.3.7 Booch’s second hypothesis 50
3.3.8 Bauer–Zemanek hypothesis 50
3.3.9 Gamma’s hypothesis 53
3.4 More on system design and specification 55
3.4.1 Project goals and design criteria 55
3.4.2 Open architectures 56
3.4.3 Design quality and iterative design 56
3.4.4 Design of data structures and databases 57
3.4.5 Design for safety and security 58
3.4.6 Technology impact on system design 58
3.4.7 Documentation of design 59
3.4.8 CASE tools and design change control 59
3.4.9 Cognitive processes and group dynamics 60
3.4.10 User participation and growing of designers 60
3.5 Examples and study material 61
3.5.1 Text formatting design 61
3.5.2 Digital library design 62
3.5.3 Performance analysis 64
3.5.4 Metrics analysis 65
Exercises 67
Chapter 4: System construction and composition 68
4.1 Definitions and importance 68
4.2 General observations 69
4.3 Applicable laws and their theories 71
4.3.1 DeRemer’s law 71
4.3.2 Corbató’s law 72
4.3.3 Dijkstra–Mills–Wirth law 73
4.3.4 Lanergan’s law 76
4.3.5 McIlroy’s law 77
4.3.6 Conway’s law 81
4.3.7 Dahl–Goldberg hypothesis 83
4.3.8 Beck–Fowler hypothesis 84
4.3.9 Basili–Boehm COTS hypothesis 85
4.4 More on system construction and composition 86
4.4.1 Incremental development and integration 86
4.4.2 Implementation languages 87
4.4.3 Application generators 87
4.4.4 Visual programming languages 88
4.4.5 Programming by example 89
4.4.6 Software metrics 89
4.4.7 Configuration management and version control 90
4.4.8 Software factories 91
4.4.9 Legacy applications 93
4.5 Examples and study material 94
4.5.1 Text formatting implementation 94
4.5.2 Program size variations 95
4.5.3 Metrics application 95
Exercises 97
Chapter 5: Validation and static verification 98
5.1 Definitions and importance 98
5.2 General observations 99
5.3 Applicable laws and their theories 100
5.3.1 Fagan’s law 100
5.3.2 Porter–Votta law 103
5.3.3 Basili’s law 105
5.3.4 Hetzel–Myers law 107
5.3.5 Mills–Jones hypothesis 110
5.3.6 May’s hypothesis 110
5.3.7 Hoare’s hypothesis 112
5.4 More on validation and static verification 115
5.4.1 Formal analysis of code 115
5.4.2 Static software visualization 115
5.4.3 Model checking 117
5.5 Examples and study material 117
5.5.1 Formal specification 117
5.5.2 Design inspection 118
5.5.3 Code inspection 119
5.5.4 Static visualization 120
Exercises 122
Chapter 6: Testing or dynamic verification 123
6.1 Definitions and importance 123
6.2 General observations 125
6.3 Applicable laws and their theories 127
6.3.1 Sackman’s first law 127
6.3.2 Dijkstra’s law 128
6.3.3 Weinberg’s law 131
6.3.4 Pareto–Zipf-type laws 131
6.3.5 Gray–Serlin law 133
6.3.6 Nielsen–Norman law 134
6.3.7 Gutjahr’s hypothesis 136
6.3.8 Weyuker’s hypothesis 137
6.3.9 Endres–Glatthaar hypothesis 138
6.3.10 Hamlet’s hypothesis 139
6.4 More on testing 140
6.4.1 Compiler vaildation 140
6.4.2 Test planning and test case development 140
6.4.3 Test support and automation 141
6.4.4 Clean-room and other testing strategies 142
6.4.5 Testing of object-oriented or real-time software 143
6.4.6 Use of assertions and code-embedded test aids 144
6.4.7 Dynamic software visualization 144
6.4.8 Operational profile 145
6.5 Examples and study material 146
6.5.1 Text formatting unit test 146
6.5.2 Digital library system test 147
6.5.3 Arithmetic test suite 148
Exercises 149
Chapter 7: System manufacturing, distribution, and
installation 150
7.1 Definitions and importance 150
7.2 General observations 150
7.3 Applicable laws and their theories 151
7.3.1 Conjecture 1 151
7.3.2 Conjecture 2 152
7.3.3 Conjecture 3 153
7.3.4 Conjecture 4 154
7.4 More on system manufacturing, distribution, and installation 156
7.4.1 Software distribution methods and tools 156
7.4.2 Software installation methods and tools 157
7.4.3 User training and help services 157
7.4.4 Customizing, localizing, and conversion 157
7.4.5 Applets and servlets 158
7.5 Examples and study material 158
7.5.1 Manufacturing and distribution 158
Exercises 159
Chapter 8: System administration, evolution, and
maintenance 160
8.1 Definitions and importance 160
8.2 General observations 161
8.3 Applicable laws and their theories 163
8.3.1 Lehman’s first law 163
8.3.2 Lehman’s second law 165
8.3.3 Lehman’s third law 166
8.3.4 Basili–Möller law 167
8.3.5 McCabe’s hypothesis 168
8.3.6 Wilde’s hypothesis 170
8.3.7 Conjecture 5 171
8.3.8 Conjecture 6 172
8.4 More on system administration, evolution, and maintenance 173
8.4.1 Security strategy and control 173
8.4.2 Vendor strategies for service and maintenance 173
8.4.3 User strategies for service and maintenance 174
8.4.4 Preventative versus corrective maintemance 175
8.4.5 On-the-fly version updates 175
8.4.6 Re-engineering, re-development, and renovation 176
8.4.7 Retirement and withdrawal 177
8.5 Examples and study material 178
8.5.1 Quality tracking and prediction 178
8.5.2 Maintenance strategy 180
Exercises 183
Chapter 9: Project management and business analysis 184
9.1 Definitions and importance 184
9.2 General observations 185
9.3 Applicable laws and their theories 188
9.3.1 Sackman’s second law 188
9.3.2 Nelson–Jones law 190
9.3.3 Boehm’s third law 192
9.3.4 DeMarco–Glass law 194
9.3.5 Humphrey’s law 195
9.3.6 Brooks’ law 199
9.3.7 Baumol’s disease 199
9.3.8 Boehm’s hypothesis 201
9.4 More on project management and business analysis 203
9.4.1 Project plans and commitments 203
9.4.2 Project and process models 204
9.4.3 People assignment and skill management 204
9.4.4 Work environment and tools 205
9.4.5 Software pricing and business case 206
9.4.6 Product packaging and licensing 208
9.4.7 Intellectual property rights 209
9.4.8 The open source model 210
9.4.9 Total cost of system ownership 211
9.5 Examples and study material 212
9.5.1 Cost estimating (bottom-up approach) 212
9.5.2 Cost estimating (with COCOMO-II) 213
9.5.3 Business analysis 215
9.5.4 Project tracking 216
Exercises 218
Chapter 10: User skills, motivation, and satisfaction 219
10.1 Definitions and importance 219
10.2 General observations 220
10.3 Applicable laws and their theories 223
10.3.1 Kupfmüller’s law 223
10.3.2 Gestalt laws 224
10.3.3 Miller’s law 226
10.3.4 Krause’s law 227
10.3.5 Librarian’s law 228
10.3.6 Apprentice’s law 229
10.3.7 Maslow–Herzberg law 229
10.3.8 McGregor’s hypothesis 231
10.3.9 Hawthorne effect 232
10.3.10 Marketer’s hypothesis 233
10.4 More on user skills, motivation, and satisfaction 233
10.4.1 Conducting user studies 233
10.4.2 Special abilities and attitudes 234
10.4.3 Customer feedback and satisfaction 234
10.4.4 Social opportunities and risks 235
10.5 Examples and study material 236
10.5.1 Professional development and career planning 236
10.5.2 Customer satisfaction survey 239
Exercises 241
Chapter 11: Technology, architecture, and industry
capabilities 242
11.1 Definitions and importance 242
11.2 General observations 243
11.3 Applicable laws and their theories 244
11.3.1 Moore’s law 244
11.3.2 Hoagland’s law 247
11.3.3 Cooper’s law 249
11.3.4 Morris–Ferguson law 250
11.3.5 Metcalfe’s law 250
11.3.6 Shaw–Garlan hypothesis 252
11.3.7 Bayer’s hypothesis 252
11.3.8 Codd’s hypothesis 254
11.3.9 Engelbart’s hypothesis 254
11.4 More on technology, architecture, and industry capabilities 255
11.4.1 Technology assessment and prediction 255
11.4.2 Management of technology and innovation 256
11.4.3 Some emerging technologies and applications 257
11.4.4 Assessing industry capabilities 259
11.4.5 Developing an information systems strategy 259
11.5 Examples and study material 260
11.5.1 Information systems strategy 260
Exercises 263
Chapter 12: Measurements, experiments, and empirical
research 264
12.1 Definitions and importance 264
12.2 General observations 265
12.3 Applicable laws and their theories 267
12.3.1 Bayes’ theorem 267
12.3.2 Basili–Rombach hypothesis 268
12.3.3 Conjecture 7 269
12.3.4 Conjecture 8 269
12.3.5 Conjecture 9 270
12.3.6 Conjecture 10 271
12.3.7 Conjecture 11 272
12.3.8 Conjecture 12 273
12.4 More on measurements, experiments, and empirical research 273
12.4.1 Defining experimental goals 273
12.4.2 Deriving testable hypotheses 274
12.4.3 Designing experiments 274
12.4.4 Analysis and validation of results 275
12.4.5 Replication of experiments 276
12.4.6 Ethical issues 276
12.4.7 Limitations of the experimental approach 276
12.4.8 Nature of empirical research 277
12.5 Examples and study material 277
12.5.1 Comparative product evaluation 277
12.5.2 Evaluation of verification methods (hypothesis-based) 279
Exercises 281
Chapter 13: Conclusions and challenges 282
13.1 More on the laws and theories covered in the book 282
13.2 Frequency and quality of experiments 285
13.3 Research issues 285
13.4 Implications for education and practice 287
13.5 Future of software and systems engineering 288
13.6 Beyond observations, laws, and theories 289
Appendix 1: Summary of laws, hypotheses, and conjectures 290
Appendix 2: Biographies of pioneers and key contributors 294
Appendix 3: On-going projects/research groups 305
References 308
Index 325

Another Software Engineering Books
Download

Thursday, July 28, 2011

Introduction to Design Patterns in C#






1. What are Design Patterns? ............................................................ 21
Defining Design Patterns ...................................................................... 23
The Learning Process............................................................................ 25
Studying Design Patterns ...................................................................... 26
Notes on Object-Oriented Approaches ................................................. 26
C# Design Patterns................................................................................ 27
How This Book Is Organized ............................................................... 28
2. Syntax of the C# Language ............................................................ 29
Data Types ............................................................................................ 30
Converting Between Numbers and Strings ........................................... 32
Declaring Multiple Variables................................................................ 32
Numeric Constants ................................................................................ 32
Character Constants .............................................................................. 33
Variables ............................................................................................... 33
Declaring Variables as You Use Them............................................. 34
Multiple Equals Signs for Initialization................................................ 34
A Simple C# Program........................................................................... 34
Compiling & Running This Program................................................ 36
Arithmetic Operators............................................................................. 36
Increment and Decrement Operators .................................................... 37
Combining Arithmetic and Assignment Statements ............................. 37
Making Decisions in C#........................................................................ 38
Comparison Operators .......................................................................... 39
Combining Conditions .......................................................................... 39
The Most Common Mistake ................................................................. 40
The switch Statement ............................................................................ 41
C# Comments........................................................................................ 41
The Ornery Ternary Operator ............................................................... 42
Looping Statements in C#..................................................................... 42
The while Loop ..................................................................................... 42
The do-while Statement ........................................................................ 43
The for Loop ......................................................................................... 43
Declaring Variables as Needed in For Loops ....................................... 44
Commas in for Loop Statements........................................................... 44
How C# Differs From C ....................................................................... 45
Summary............................................................................................... 46
3. Writing Windows C# Programs ................................................... 47
Objects in C#......................................................................................... 47
Managed Languages and Garbage Collection ...................................... 48
Classes and Namespaces in C# ............................................................. 48
Building a C# Application .................................................................... 49
The Simplest Window Program in C# .................................................. 50
Windows Controls ................................................................................ 54
Labels ................................................................................................ 55
TextBox............................................................................................. 55
CheckBox.......................................................................................... 56
Buttons .............................................................................................. 56
Radio buttons .................................................................................... 56
Listboxes and Combo Boxes ............................................................ 57
The Items Collection......................................................................... 57
Menus................................................................................................ 58
ToolTips............................................................................................ 58
Other Windows Controls .................................................................. 59
The Windows Controls Program .......................................................... 59
Summary............................................................................................... 61
Programs on the CD-ROM ................................................................... 47
4. Using Classes and Objects in C# .................................................... 62
What Do We Use Classes For? ............................................................. 62
A Simple Temperature Conversion Program........................................ 62
Building a Temperature Class............................................................... 64
Converting to Kelvin......................................................................... 67
Putting the Decisions into the Temperature Class ................................ 67
Using Classes for Format and Value Conversion................................. 68
Handling Unreasonable Values......................................................... 71
A String Tokenizer Class ...................................................................... 71
Classes as Objects ................................................................................. 73
Class Containment ............................................................................ 75
Initialization.......................................................................................... 76
Classes and Properties........................................................................... 77
Programming Style in C#...................................................................... 79
Summary............................................................................................... 80
Programs on the CD-ROM ................................................................... 62
5. Inheritance ....................................................................................... 81
Constructors .......................................................................................... 81
Drawing and Graphics in C#................................................................. 82
Using Inheritance .................................................................................. 84
Namespaces........................................................................................... 85
Creating a Square From a Rectangle ................................................. 86
Public, Private and Protected ................................................................ 88
Overloading........................................................................................... 89
Virtual and Override Keywords ............................................................ 89
Overriding Methods in Derived Classes ............................................... 90
Replacing Methods Using New ............................................................ 91
Overriding Windows Controls .............................................................. 92
Interfaces ............................................................................................... 94
Abstract Classes .................................................................................... 95
Comparing Interfaces and Abstract Classes.......................................... 97
Summary............................................................................................... 99
Programs on the CD-ROM ................................................................... 99
6. UML Diagrams .............................................................................. 100
Inheritance........................................................................................... 102
Interfaces ............................................................................................. 103
Composition........................................................................................ 103
Annotation........................................................................................... 105
WithClass UML Diagrams ................................................................. 106
C# Project Files ................................................................................... 106
7. Arrays, Files and Exceptions in C# ............................................. 107
Arrays.................................................................................................. 107
Collection Objects............................................................................... 108
ArrayLists........................................................................................ 108
Hashtables ....................................................................................... 109
SortedLists ...................................................................................... 110
Exceptions ........................................................................................... 110
Multiple Exceptions ............................................................................ 112
Throwing Exceptions .......................................................................... 113
File Handling....................................................................................... 113
The File Object................................................................................ 113
Reading Text File........................................................................... 114
Writing a Text File .......................................................................... 114
Exceptions in File Handling................................................................ 114
Testing for End of File ........................................................................ 115
A csFile Class...................................................................................... 116
8. The Simple Factory Pattern......................................................... 121
How a Simple Factory Works ............................................................. 121
Sample Code ....................................................................................... 122
The Two Derived Classes ................................................................... 122
Building the Simple Factory............................................................... 123
Using the Factory............................................................................ 124
Factory Patterns in Math Computation............................................... 125
Programs on the CD-ROM ................................................................. 128
Thought Questions .............................................................................. 128
9. The Factory Method ..................................................................... 129
The Swimmer Class ............................................................................ 132
The Events Classes.............................................................................. 132
Straight Seeding .................................................................................. 133
Circle Seeding ................................................................................. 134
Our Seeding Program.......................................................................... 134
Other Factories .................................................................................... 135
When to Use a Factory Method .......................................................... 136
Thought Question................................................................................ 136
Programs on the CD-ROM ................................................................. 136
10. The Abstract Factory Pattern.................................................. 137
A GardenMaker Factory ..................................................................... 137
The PictureBox ............................................................................... 141
Handling the RadioButton and Button Events ................................ 142
Adding More Classes.......................................................................... 143
Consequences of Abstract Factory...................................................... 144
Thought Question................................................................................ 144
Programs on the CD-ROM ................................................................. 144
11. The Singleton Pattern ............................................................... 145
Creating Singleton Using a Static Method.......................................... 145
Exceptions and Instances .................................................................... 146
Throwing the Exception...................................................................... 147
Creating an Instance of the Class ........................................................ 147
Providing a Global Point of Access to a Singleton............................. 148
Other Consequences of the Singleton Pattern..................................... 149
Programs on Your CD-ROM.............................................................. 149
12. The Builder Pattern .................................................................. 150
An Investment Tracker........................................................................ 151
The Stock Factory........................................................................... 154
The CheckChoice Class .................................................................. 155
The ListboxChoice Class ................................................................ 156
Using the Items Collection in the ListBox Control ............................ 157
Plotting the Data.............................................................................. 158
The Final Choice ............................................................................. 159
Consequences of the Builder Pattern.................................................. 160
Thought Questions .............................................................................. 161
Programs on the CD-ROM ................................................................. 161
13. The Prototype Pattern .............................................................. 162
Cloning in C# ...................................................................................... 163
Using the Prototype............................................................................. 163
Cloning the Class ................................................................................ 167
Using the Prototype Pattern ................................................................ 170
Dissimilar Classes with the Same Interface .................................... 172
Prototype Managers ............................................................................ 176
Consequences of the Prototype Pattern............................................... 176
Thought Question................................................................................ 177
Programs on the CD-ROM ................................................................. 177
Summary of Creational Patterns ......................................................... 178
14. The Adapter Pattern................................................................. 180
Moving Data Between Lists................................................................ 180
Making an Adapter.............................................................................. 182
Using the DataGrid ............................................................................. 183
Detecting Row Selection................................................................. 186
Using a TreeView ............................................................................... 186
The Class Adapter ............................................................................... 188
Two-Way Adapters............................................................................. 190
Object Versus Class Adapters in C# ................................................... 190
Pluggable Adapters ............................................................................. 191
Thought Question................................................................................ 191
Programs on the CD-ROM ................................................................. 191
15. The Bridge Pattern.................................................................... 192
The VisList Classes............................................................................. 195
The Class Diagram.............................................................................. 196
Extending the Bridge .......................................................................... 197
Windows Forms as Bridges ................................................................ 201
Consequences of the Bridge Pattern ................................................... 202
Thought Question................................................................................ 203
Programs on the CD-ROM ................................................................. 203
16. The Composite Pattern............................................................. 204
An Implementation of a Composite .................................................... 205
Computing Salaries............................................................................. 206
The Employee Classes ........................................................................ 206
The Boss Class.................................................................................... 209
Building the Employee Tree ............................................................... 210
Self-Promotion.................................................................................... 213
Doubly Linked Lists ........................................................................... 213
Consequences of the Composite Pattern............................................. 215
A Simple Composite ........................................................................... 215
Composites in .NET............................................................................ 216
Other Implementation Issues .............................................................. 216
Thought Questions .............................................................................. 216
Programs on the CD-ROM ................................................................. 217
17. The Decorator Pattern.............................................................. 218
Decorating a CoolButton .................................................................... 218
Handling events in a Decorator........................................................... 220
Layout Considerations .................................................................... 221
Control Size and Position................................................................ 221
Multiple Decorators ............................................................................ 222
Nonvisual Decorators.......................................................................... 225
Decorators, Adapters, and Composites ............................................... 226
Consequences of the Decorator Pattern.............................................. 226
Thought Questions .............................................................................. 226
Programs on the CD-ROM ................................................................. 227
18. The Façade Pattern................................................................... 228
What Is a Database? ............................................................................ 228
Getting Data Out of Databases............................................................ 230
Kinds of Databases.............................................................................. 231
ODBC.................................................................................................. 232
Database Structure .............................................................................. 232
Using ADO.NET................................................................................. 233
Connecting to a Database................................................................ 233
Reading Data from a Database Table ............................................. 234
dtable = dset.Tables [0]; ............................................................ 235
Executing a Query........................................................................... 235
Deleting the Contents of a Table ..................................................... 235
Adding Rows to Database Tables Using ADO.NET .......................... 236
Building the Façade Classes ............................................................... 237
Building the Price Query................................................................. 239
Making the ADO.NET Façade............................................................ 239
The DBTable class.......................................................................... 242
Creating Classes for Each Table ......................................................... 244
Building the Price Table ..................................................................... 246
Loading the Database Tables .............................................................. 249
The Final Application ......................................................................... 251
What Constitutes the Façade? ............................................................. 252
Consequences of the Façade ............................................................... 253
Thought Question................................................................................ 253
Programs on the CD-ROM ................................................................. 253
19. The Flyweight Pattern .............................................................. 254
Discussion........................................................................................... 255
Example Code ..................................................................................... 256
The Class Diagram.......................................................................... 261
Selecting a Folder............................................................................ 261
Handling the Mouse and Paint Events ................................................ 263
Flyweight Uses in C#.......................................................................... 264
Sharable Objects ................................................................................. 265
Copy-on-Write Objects....................................................................... 265
Thought Question................................................................................ 266
Programs on the CD-ROM ................................................................. 266
20. The Proxy Pattern..................................................................... 267
Sample Code ....................................................................................... 268
Proxies in C# ....................................................................................... 270
Copy-on-Write .................................................................................... 271
Comparison with Related Patterns ...................................................... 271
Thought Question................................................................................ 271
Programs on the CD-ROM ................................................................. 271
21. Chain of Responsibility............................................................. 274
Applicability........................................................................................ 275
Sample Code ....................................................................................... 276
The List Boxes .................................................................................... 280
Programming a Help System .............................................................. 282
Receiving the Help Command ........................................................ 286
A Chain or a Tree? .............................................................................. 287
Kinds of Requests ............................................................................... 289
Examples in C# ................................................................................... 289
Consequences of the Chain of Responsibility .................................... 290
Thought Question................................................................................ 290
Programs on the CD-ROM ................................................................. 291
22. The Command Pattern ............................................................. 292
Motivation........................................................................................... 292
Command Objects............................................................................... 293
Building Command Objects................................................................ 294
Consequences of the Command Pattern ............................................. 297
The CommandHolder Interface .......................................................... 297
Providing Undo ................................................................................... 301
Thought Questions .............................................................................. 309
Programs on the CD-ROM ................................................................. 310
23. The Interpreter Pattern............................................................ 311
Motivation........................................................................................... 311
Applicability........................................................................................ 311
A Simple Report Example .................................................................. 312
Interpreting the Language ................................................................... 314
Objects Used in Parsing ...................................................................... 315
Reducing the Parsed Stack .................................................................. 319
Implementing the Interpreter Pattern.................................................. 321
The Syntax Tree .............................................................................. 322
Consequences of the Interpreter Pattern ............................................. 326
Thought Question................................................................................ 327
Programs on the CD-ROM ................................................................. 327
24. The Iterator Pattern.................................................................. 328
Motivation........................................................................................... 328
Sample Iterator Code .......................................................................... 329
Fetching an Iterator ......................................................................... 330
Filtered Iterators .................................................................................. 331
The Filtered Iterator ........................................................................ 331
Keeping Track of the Clubs ................................................................ 334
Consequences of the Iterator Pattern .................................................. 335
Programs on the CD-ROM ................................................................. 336
25. The Mediator Pattern ............................................................... 337
An Example System............................................................................ 337
Interactions Between Controls ............................................................ 339
Sample Code ....................................................................................... 341
Initialization of the System ............................................................. 345
Mediators and Command Objects....................................................... 345
Consequences of the Mediator Pattern................................................ 347
Single Interface Mediators.................................................................. 348
Implementation Issues......................................................................... 349
Programs on the CD-ROM ................................................................. 349
26. The Memento Pattern............................................................... 350
Motivation........................................................................................... 350
Implementation ................................................................................... 351
Sample Code ....................................................................................... 351
A Cautionary Note .......................................................................... 358
Command Objects in the User Interface ............................................. 358
Handling Mouse and Paint Events ...................................................... 360
Consequences of the Memento ........................................................... 361
Thought Question................................................................................ 361
Programs on the CD-ROM ................................................................. 362
27. The Observer Pattern ............................................................... 363
Watching Colors Change .................................................................... 364
The Message to the Media .................................................................. 367
Consequences of the Observer Pattern................................................ 368
Programs on the CD-ROM ................................................................. 369
28. The State Pattern ...................................................................... 370
Sample Code ....................................................................................... 370
Switching Between States ................................................................... 376
How the Mediator Interacts with the State Manager .......................... 377
The ComdToolBarButton ............................................................... 378
Handling the Fill State ........................................................................ 381
Handling the Undo List....................................................................... 382
The VisRectangle and VisCircle Classes............................................ 385
Mediators and the God Class .............................................................. 387
Consequences of the State Pattern...................................................... 388
State Transitions .................................................................................. 388
Thought Questions .............................................................................. 389
Programs on the CD-ROM ................................................................. 389
29. The Strategy Pattern................................................................. 390
Motivation........................................................................................... 390
Sample Code ....................................................................................... 391
The Context......................................................................................... 392
The Program Commands .................................................................... 393
The Line and Bar Graph Strategies..................................................... 394
Drawing Plots in C#............................................................................ 394
Making Bar Plots ............................................................................ 395
Making Line Plots ........................................................................... 396
Consequences of the Strategy Pattern................................................. 398
Programs on the CD-ROM ................................................................. 398
30. The Template Method Pattern ................................................ 399
Motivation........................................................................................... 399
Kinds of Methods in a Template Class ............................................... 401
Sample Code ....................................................................................... 402
Drawing a Standard Triangle .......................................................... 404
Drawing an Isosceles Triangle ........................................................ 404
The Triangle Drawing Program.......................................................... 405
Templates and Callbacks .................................................................... 406
Summary and Consequences .............................................................. 407
Programs on the CD-ROM ................................................................. 408
31. The Visitor Pattern ................................................................... 409
Motivation........................................................................................... 409
When to Use the Visitor Pattern ......................................................... 411
Sample Code ....................................................................................... 411
Visiting the Classes ............................................................................. 413
Visiting Several Classes...................................................................... 414
Bosses Are Employees, Too ............................................................... 416
Catch-All Operations with Visitors .................................................... 417
Double Dispatching............................................................................. 419
Why Are We Doing This? .................................................................. 419
Traversing a Series of Classes ............................................................ 419
Consequences of the Visitor Pattern................................................... 420
Thought Question................................................................................ 420
Programs on the CD-ROM ................................................................. 421
32. Bibliography .............................................................................. 422


Another C# Books
Another Programming Language Books
Another Software Engineering Books
Download
Related Posts with Thumbnails

Put Your Ads Here!