Copyright © 2015 Pearson Education, Inc.
Computer Science: An Overview Twelfth Edition
J. Glenn Brookshear by Dennis Brylow
Chapter 7:
Software Engineering
Copyright © 2015 Pearson Education, Inc. 7-2
Chapter 7: Software Engineering
• 7.1 The Software Engineering Discipline
• 7.2 The Software Life Cycle
• 7.3 Software Engineering Methodologies
• 7.4 Modularity
• 7.5 Tools of the Trade
• 7.6 Testing
• 7.7 Documentation
• 7.8 Software Ownership and Liability
The Software Engineering Discipline
• Distinct from other engineering fields – Prefabricated components
– Metrics
• Practitioners versus Theoreticians
• Professional Organizations: ACM, IEEE, etc.
Computer Aided Software Engineering (CASE) tools
• Project planning
• Project management
• Documentation
• Prototyping and simulation
• Interface design
Copyright © 2015 Pearson Education, Inc. 7-5
Figure 7.1 The software life cycle
Copyright © 2015 Pearson Education, Inc. 7-6
Figure 7.2 The development phase of the software life cycle
Analysis Stage
• Requirements – Application oriented
• Specifications – Technically oriented
• Software requirements document
Design Stage
• Methodologies and tools (discussed later)
• Human interface (psychology and
ergonomics)
Copyright © 2015 Pearson Education, Inc. 7-9
Implementation Stage
• Create system from design – Write programs
– Create data files – Develop databases
• Role of “software analyst” versus
“programmer”
Copyright © 2015 Pearson Education, Inc. 7-10
Testing Stage
• Validation testing
– Confirm that system meets specifications
• Defect testing – Find bugs
Software Engineering Methodologies
• Waterfall Model
• Incremental Model
– Prototyping (Evolutionary vs. Throwaway)
• Open-source Development
• Extreme Programming
Modularity
• Functions − Imperative paradigm – Structure charts
• Objects − Object-oriented paradigm – Collaboration diagrams
• Components − Component architecture
Copyright © 2015 Pearson Education, Inc. 7-13
Figure 7.3 A simple structure chart
Copyright © 2015 Pearson Education, Inc. 7-14
Figure 7.4 The structure of PlayerClass and its instances
Figure 7.5 The interaction between objects resulting from PlayerA’s serve
Figure 7.6 A structure chart
including data coupling
Copyright © 2015 Pearson Education, Inc. 7-17
Coupling versus Cohesion
• Coupling
– Control coupling – Data coupling
• Cohesion
– Logical cohesion – Functional cohesion
Copyright © 2015 Pearson Education, Inc. 7-18
Figure 7.7 Logical and functional cohesion within an object
Tools of the Trade
• Data Flow Diagram
• Entity-Relationship Diagram – One-to-one relation
– One-to-many relation – Many-to-many relation
Figure 7.8 A simple dataflow diagram
Copyright © 2015 Pearson Education, Inc. 7-21
Figure 7.9 A simple use case diagram
Copyright © 2015 Pearson Education, Inc. 7-22
Figure 7.10 A simple class diagram
Unified Modeling Language
• Use Case Diagram – Use cases
– Actors
• Class Diagram
Figure 7.11 One-to-one, one-to-many, and
many-to-many relationships between
entities of types X and Y
Copyright © 2015 Pearson Education, Inc. 7-25
Figure 7.12 A class diagram depicting generalizations
Copyright © 2015 Pearson Education, Inc. 7-26
Figure 7.13 A sequence diagram depicting a generic volley
Structured Walkthoughs
• “Theatrical” experiment
• Class-responsibility-collaboration cards
Design Patterns
• Well designed “templates” for solving recurring problems
• Examples:
– Adapter pattern: Used to adapter a module’s interface to current needs
– Decorator pattern: Used to control the complexity
involved when many different combinations of the
Copyright © 2015 Pearson Education, Inc. 7-29
Software Testing Strategies
• Glass-box testing – Pareto principle – Basis path testing
• Black-box testing – Boundary value analysis – Redundancy testing – Beta testing
Copyright © 2015 Pearson Education, Inc. 7-30