Computer Science — An Overview J. Glenn Brookshear Chapter Two Data Manipulation.
Computer Science: An Overview Twelfth Editionr03944025/intro2015/files/...Title Chapter 7 Author J....
Transcript of Computer Science: An Overview Twelfth Editionr03944025/intro2015/files/...Title Chapter 7 Author J....
![Page 1: Computer Science: An Overview Twelfth Editionr03944025/intro2015/files/...Title Chapter 7 Author J. Glenn Brookshear Subject Software Engineering Created Date 12/6/2015 4:42:12 PM](https://reader034.fdocuments.in/reader034/viewer/2022042117/5e952895f98595298849ef12/html5/thumbnails/1.jpg)
Copyright © 2015 Pearson Education, Inc.
Computer Science: An Overview
Twelfth Edition
by
J. Glenn Brookshear
Dennis Brylow
Chapter 7:
Software Engineering
![Page 2: Computer Science: An Overview Twelfth Editionr03944025/intro2015/files/...Title Chapter 7 Author J. Glenn Brookshear Subject Software Engineering Created Date 12/6/2015 4:42:12 PM](https://reader034.fdocuments.in/reader034/viewer/2022042117/5e952895f98595298849ef12/html5/thumbnails/2.jpg)
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
![Page 3: Computer Science: An Overview Twelfth Editionr03944025/intro2015/files/...Title Chapter 7 Author J. Glenn Brookshear Subject Software Engineering Created Date 12/6/2015 4:42:12 PM](https://reader034.fdocuments.in/reader034/viewer/2022042117/5e952895f98595298849ef12/html5/thumbnails/3.jpg)
Copyright © 2015 Pearson Education, Inc. 7-3
The Software Engineering
Discipline
• Distinct from other engineering fields
– Prefabricated components
– Metrics
• Practitioners versus Theoreticians
• Professional Organizations: ACM, IEEE, etc.
– Codes of professional ethics
– Standards
![Page 4: Computer Science: An Overview Twelfth Editionr03944025/intro2015/files/...Title Chapter 7 Author J. Glenn Brookshear Subject Software Engineering Created Date 12/6/2015 4:42:12 PM](https://reader034.fdocuments.in/reader034/viewer/2022042117/5e952895f98595298849ef12/html5/thumbnails/4.jpg)
Copyright © 2015 Pearson Education, Inc. 7-4
Computer Aided Software
Engineering (CASE) tools
• Project planning
• Project management
• Documentation
• Prototyping and simulation
• Interface design
• Programming
![Page 5: Computer Science: An Overview Twelfth Editionr03944025/intro2015/files/...Title Chapter 7 Author J. Glenn Brookshear Subject Software Engineering Created Date 12/6/2015 4:42:12 PM](https://reader034.fdocuments.in/reader034/viewer/2022042117/5e952895f98595298849ef12/html5/thumbnails/5.jpg)
Copyright © 2015 Pearson Education, Inc. 7-5
Figure 7.1 The software life cycle
![Page 6: Computer Science: An Overview Twelfth Editionr03944025/intro2015/files/...Title Chapter 7 Author J. Glenn Brookshear Subject Software Engineering Created Date 12/6/2015 4:42:12 PM](https://reader034.fdocuments.in/reader034/viewer/2022042117/5e952895f98595298849ef12/html5/thumbnails/6.jpg)
Copyright © 2015 Pearson Education, Inc. 7-6
Figure 7.2 The development phase of
the software life cycle
![Page 7: Computer Science: An Overview Twelfth Editionr03944025/intro2015/files/...Title Chapter 7 Author J. Glenn Brookshear Subject Software Engineering Created Date 12/6/2015 4:42:12 PM](https://reader034.fdocuments.in/reader034/viewer/2022042117/5e952895f98595298849ef12/html5/thumbnails/7.jpg)
Copyright © 2015 Pearson Education, Inc. 7-7
Analysis Stage
• Requirements
– Application oriented
• Specifications
– Technically oriented
• Software requirements document
![Page 8: Computer Science: An Overview Twelfth Editionr03944025/intro2015/files/...Title Chapter 7 Author J. Glenn Brookshear Subject Software Engineering Created Date 12/6/2015 4:42:12 PM](https://reader034.fdocuments.in/reader034/viewer/2022042117/5e952895f98595298849ef12/html5/thumbnails/8.jpg)
Copyright © 2015 Pearson Education, Inc. 7-8
Design Stage
• Methodologies and tools (discussed later)
• Human interface (psychology and
ergonomics)
![Page 9: Computer Science: An Overview Twelfth Editionr03944025/intro2015/files/...Title Chapter 7 Author J. Glenn Brookshear Subject Software Engineering Created Date 12/6/2015 4:42:12 PM](https://reader034.fdocuments.in/reader034/viewer/2022042117/5e952895f98595298849ef12/html5/thumbnails/9.jpg)
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”
![Page 10: Computer Science: An Overview Twelfth Editionr03944025/intro2015/files/...Title Chapter 7 Author J. Glenn Brookshear Subject Software Engineering Created Date 12/6/2015 4:42:12 PM](https://reader034.fdocuments.in/reader034/viewer/2022042117/5e952895f98595298849ef12/html5/thumbnails/10.jpg)
Copyright © 2015 Pearson Education, Inc. 7-10
Testing Stage
• Validation testing
– Confirm that system meets specifications
• Defect testing
– Find bugs
![Page 11: Computer Science: An Overview Twelfth Editionr03944025/intro2015/files/...Title Chapter 7 Author J. Glenn Brookshear Subject Software Engineering Created Date 12/6/2015 4:42:12 PM](https://reader034.fdocuments.in/reader034/viewer/2022042117/5e952895f98595298849ef12/html5/thumbnails/11.jpg)
Copyright © 2015 Pearson Education, Inc. 7-11
Software Engineering
Methodologies
• Waterfall Model
• Incremental Model
– Prototyping (Evolutionary vs. Throwaway)
• Open-source Development
• Extreme Programming
![Page 12: Computer Science: An Overview Twelfth Editionr03944025/intro2015/files/...Title Chapter 7 Author J. Glenn Brookshear Subject Software Engineering Created Date 12/6/2015 4:42:12 PM](https://reader034.fdocuments.in/reader034/viewer/2022042117/5e952895f98595298849ef12/html5/thumbnails/12.jpg)
Copyright © 2015 Pearson Education, Inc. 7-12
Modularity
• Functions Imperative paradigm
– Structure charts
• Objects Object-oriented paradigm
– Collaboration diagrams
• Components Component architecture
![Page 13: Computer Science: An Overview Twelfth Editionr03944025/intro2015/files/...Title Chapter 7 Author J. Glenn Brookshear Subject Software Engineering Created Date 12/6/2015 4:42:12 PM](https://reader034.fdocuments.in/reader034/viewer/2022042117/5e952895f98595298849ef12/html5/thumbnails/13.jpg)
Copyright © 2015 Pearson Education, Inc. 7-13
Figure 7.3 A simple structure chart
![Page 14: Computer Science: An Overview Twelfth Editionr03944025/intro2015/files/...Title Chapter 7 Author J. Glenn Brookshear Subject Software Engineering Created Date 12/6/2015 4:42:12 PM](https://reader034.fdocuments.in/reader034/viewer/2022042117/5e952895f98595298849ef12/html5/thumbnails/14.jpg)
Copyright © 2015 Pearson Education, Inc. 7-14
Figure 7.4 The structure of
PlayerClass and its instances
![Page 15: Computer Science: An Overview Twelfth Editionr03944025/intro2015/files/...Title Chapter 7 Author J. Glenn Brookshear Subject Software Engineering Created Date 12/6/2015 4:42:12 PM](https://reader034.fdocuments.in/reader034/viewer/2022042117/5e952895f98595298849ef12/html5/thumbnails/15.jpg)
Copyright © 2015 Pearson Education, Inc. 7-15
Figure 7.5 The interaction between
objects resulting from PlayerA’s
serve
![Page 16: Computer Science: An Overview Twelfth Editionr03944025/intro2015/files/...Title Chapter 7 Author J. Glenn Brookshear Subject Software Engineering Created Date 12/6/2015 4:42:12 PM](https://reader034.fdocuments.in/reader034/viewer/2022042117/5e952895f98595298849ef12/html5/thumbnails/16.jpg)
Copyright © 2015 Pearson Education, Inc. 7-16
Figure 7.6 A structure chart
including data coupling
![Page 17: Computer Science: An Overview Twelfth Editionr03944025/intro2015/files/...Title Chapter 7 Author J. Glenn Brookshear Subject Software Engineering Created Date 12/6/2015 4:42:12 PM](https://reader034.fdocuments.in/reader034/viewer/2022042117/5e952895f98595298849ef12/html5/thumbnails/17.jpg)
Copyright © 2015 Pearson Education, Inc. 7-17
Coupling versus Cohesion
• Coupling
– Control coupling
– Data coupling
• Cohesion
– Logical cohesion
– Functional cohesion
![Page 18: Computer Science: An Overview Twelfth Editionr03944025/intro2015/files/...Title Chapter 7 Author J. Glenn Brookshear Subject Software Engineering Created Date 12/6/2015 4:42:12 PM](https://reader034.fdocuments.in/reader034/viewer/2022042117/5e952895f98595298849ef12/html5/thumbnails/18.jpg)
Copyright © 2015 Pearson Education, Inc. 7-18
Figure 7.7 Logical and functional
cohesion within an object
![Page 19: Computer Science: An Overview Twelfth Editionr03944025/intro2015/files/...Title Chapter 7 Author J. Glenn Brookshear Subject Software Engineering Created Date 12/6/2015 4:42:12 PM](https://reader034.fdocuments.in/reader034/viewer/2022042117/5e952895f98595298849ef12/html5/thumbnails/19.jpg)
Copyright © 2015 Pearson Education, Inc. 7-19
Tools of the Trade
• Data Flow Diagram
• Entity-Relationship Diagram
– One-to-one relation
– One-to-many relation
– Many-to-many relation
• Data Dictionary
![Page 20: Computer Science: An Overview Twelfth Editionr03944025/intro2015/files/...Title Chapter 7 Author J. Glenn Brookshear Subject Software Engineering Created Date 12/6/2015 4:42:12 PM](https://reader034.fdocuments.in/reader034/viewer/2022042117/5e952895f98595298849ef12/html5/thumbnails/20.jpg)
Copyright © 2015 Pearson Education, Inc. 7-20
Figure 7.8 A simple dataflow diagram
![Page 21: Computer Science: An Overview Twelfth Editionr03944025/intro2015/files/...Title Chapter 7 Author J. Glenn Brookshear Subject Software Engineering Created Date 12/6/2015 4:42:12 PM](https://reader034.fdocuments.in/reader034/viewer/2022042117/5e952895f98595298849ef12/html5/thumbnails/21.jpg)
Copyright © 2015 Pearson Education, Inc. 7-21
Figure 7.9 A simple use case diagram
![Page 22: Computer Science: An Overview Twelfth Editionr03944025/intro2015/files/...Title Chapter 7 Author J. Glenn Brookshear Subject Software Engineering Created Date 12/6/2015 4:42:12 PM](https://reader034.fdocuments.in/reader034/viewer/2022042117/5e952895f98595298849ef12/html5/thumbnails/22.jpg)
Copyright © 2015 Pearson Education, Inc. 7-22
Figure 7.10 A simple class diagram
![Page 23: Computer Science: An Overview Twelfth Editionr03944025/intro2015/files/...Title Chapter 7 Author J. Glenn Brookshear Subject Software Engineering Created Date 12/6/2015 4:42:12 PM](https://reader034.fdocuments.in/reader034/viewer/2022042117/5e952895f98595298849ef12/html5/thumbnails/23.jpg)
Copyright © 2015 Pearson Education, Inc. 7-23
Unified Modeling Language
• Use Case Diagram
– Use cases
– Actors
• Class Diagram
![Page 24: Computer Science: An Overview Twelfth Editionr03944025/intro2015/files/...Title Chapter 7 Author J. Glenn Brookshear Subject Software Engineering Created Date 12/6/2015 4:42:12 PM](https://reader034.fdocuments.in/reader034/viewer/2022042117/5e952895f98595298849ef12/html5/thumbnails/24.jpg)
Copyright © 2015 Pearson Education, Inc. 7-24
Figure 7.11 One-to-one, one-to-many, and
many-to-many relationships between
entities of types X and Y
![Page 25: Computer Science: An Overview Twelfth Editionr03944025/intro2015/files/...Title Chapter 7 Author J. Glenn Brookshear Subject Software Engineering Created Date 12/6/2015 4:42:12 PM](https://reader034.fdocuments.in/reader034/viewer/2022042117/5e952895f98595298849ef12/html5/thumbnails/25.jpg)
Copyright © 2015 Pearson Education, Inc. 7-25
Figure 7.12 A class diagram
depicting generalizations
![Page 26: Computer Science: An Overview Twelfth Editionr03944025/intro2015/files/...Title Chapter 7 Author J. Glenn Brookshear Subject Software Engineering Created Date 12/6/2015 4:42:12 PM](https://reader034.fdocuments.in/reader034/viewer/2022042117/5e952895f98595298849ef12/html5/thumbnails/26.jpg)
Copyright © 2015 Pearson Education, Inc. 7-26
Figure 7.13 A sequence diagram
depicting a generic volley
![Page 27: Computer Science: An Overview Twelfth Editionr03944025/intro2015/files/...Title Chapter 7 Author J. Glenn Brookshear Subject Software Engineering Created Date 12/6/2015 4:42:12 PM](https://reader034.fdocuments.in/reader034/viewer/2022042117/5e952895f98595298849ef12/html5/thumbnails/27.jpg)
Copyright © 2015 Pearson Education, Inc. 7-27
Structured Walkthoughs
• “Theatrical” experiment
• Class-responsibility-collaboration cards
![Page 28: Computer Science: An Overview Twelfth Editionr03944025/intro2015/files/...Title Chapter 7 Author J. Glenn Brookshear Subject Software Engineering Created Date 12/6/2015 4:42:12 PM](https://reader034.fdocuments.in/reader034/viewer/2022042117/5e952895f98595298849ef12/html5/thumbnails/28.jpg)
Copyright © 2015 Pearson Education, Inc. 7-28
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 same activities are required
• Inspired by the work of Christopher Alexander in architecture
![Page 29: Computer Science: An Overview Twelfth Editionr03944025/intro2015/files/...Title Chapter 7 Author J. Glenn Brookshear Subject Software Engineering Created Date 12/6/2015 4:42:12 PM](https://reader034.fdocuments.in/reader034/viewer/2022042117/5e952895f98595298849ef12/html5/thumbnails/29.jpg)
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
![Page 30: Computer Science: An Overview Twelfth Editionr03944025/intro2015/files/...Title Chapter 7 Author J. Glenn Brookshear Subject Software Engineering Created Date 12/6/2015 4:42:12 PM](https://reader034.fdocuments.in/reader034/viewer/2022042117/5e952895f98595298849ef12/html5/thumbnails/30.jpg)
Copyright © 2015 Pearson Education, Inc. 7-30
Documentation
• User Documentation
– Printed book for all customers
– On-line help modules
• System Documentation
– Source code
– Design documents
• Technical Documentation
– For installing, customizing, updating, etc.
![Page 31: Computer Science: An Overview Twelfth Editionr03944025/intro2015/files/...Title Chapter 7 Author J. Glenn Brookshear Subject Software Engineering Created Date 12/6/2015 4:42:12 PM](https://reader034.fdocuments.in/reader034/viewer/2022042117/5e952895f98595298849ef12/html5/thumbnails/31.jpg)
Copyright © 2015 Pearson Education, Inc. 7-31
Software Ownership
• Copyright
– Allow a product to be released while retaining
ownership of intellectual property
– Asserted in all works:
• Specifications
• Source code
• Final product
![Page 32: Computer Science: An Overview Twelfth Editionr03944025/intro2015/files/...Title Chapter 7 Author J. Glenn Brookshear Subject Software Engineering Created Date 12/6/2015 4:42:12 PM](https://reader034.fdocuments.in/reader034/viewer/2022042117/5e952895f98595298849ef12/html5/thumbnails/32.jpg)
Copyright © 2015 Pearson Education, Inc. 7-32
Software Ownership (continued)
• Software License
– A legal agreement that grants the user certain
permissions without transferring ownership
• Patents
– Must demonstrate that it is new, usable, and
not obvious to others with similar backgrounds
– Process is expensive and time-consuming