csi 1340 introduction to computer science ii chapter 1 software engineering principles
DESCRIPTION
Software Engineering A disciplined approach to the design, production, and maintenance of computer programs that (1) are developed on time (2) and within cost estimates (3) using tools that help to manage the size and complexity of the resulting software productsTRANSCRIPT
![Page 1: CSI 1340 Introduction to Computer Science II Chapter 1 Software Engineering Principles](https://reader036.vdocuments.mx/reader036/viewer/2022062503/5a4d1aca7f8b9ab05996f469/html5/thumbnails/1.jpg)
CSI 1340Introduction to Computer Science II
Chapter 1Software Engineering Principles
![Page 2: CSI 1340 Introduction to Computer Science II Chapter 1 Software Engineering Principles](https://reader036.vdocuments.mx/reader036/viewer/2022062503/5a4d1aca7f8b9ab05996f469/html5/thumbnails/2.jpg)
Software Engineering
A disciplined approach to the design, production, and maintenance of computer programs that (1) are developed on time (2) and within cost estimates(3) using tools that help to manage the size and complexity of the resulting software products
![Page 3: CSI 1340 Introduction to Computer Science II Chapter 1 Software Engineering Principles](https://reader036.vdocuments.mx/reader036/viewer/2022062503/5a4d1aca7f8b9ab05996f469/html5/thumbnails/3.jpg)
Goals of Quality Software
• It works.• It can be read and understood.• It can be modified without excruciating time and
effort.• It is completed on time and within budget.
![Page 4: CSI 1340 Introduction to Computer Science II Chapter 1 Software Engineering Principles](https://reader036.vdocuments.mx/reader036/viewer/2022062503/5a4d1aca7f8b9ab05996f469/html5/thumbnails/4.jpg)
Software Life Cycle
• Analysis• Requirements Specification• Design• Implementation• Testing & Verification• Delivery• Operation• Maintenance
![Page 5: CSI 1340 Introduction to Computer Science II Chapter 1 Software Engineering Principles](https://reader036.vdocuments.mx/reader036/viewer/2022062503/5a4d1aca7f8b9ab05996f469/html5/thumbnails/5.jpg)
Analysis
Clear understanding of the problem
![Page 6: CSI 1340 Introduction to Computer Science II Chapter 1 Software Engineering Principles](https://reader036.vdocuments.mx/reader036/viewer/2022062503/5a4d1aca7f8b9ab05996f469/html5/thumbnails/6.jpg)
Software Specifications
Identify:• Inputs• Outputs• Processing & error handling requirements• AssumptionsServes as an important piece of written documentation
![Page 7: CSI 1340 Introduction to Computer Science II Chapter 1 Software Engineering Principles](https://reader036.vdocuments.mx/reader036/viewer/2022062503/5a4d1aca7f8b9ab05996f469/html5/thumbnails/7.jpg)
Detailed Program Specification
Tells what the program must do, but not how it does it.
Is written documentation about the program.
![Page 8: CSI 1340 Introduction to Computer Science II Chapter 1 Software Engineering Principles](https://reader036.vdocuments.mx/reader036/viewer/2022062503/5a4d1aca7f8b9ab05996f469/html5/thumbnails/8.jpg)
Design
• Develop a step-by-step description of the solution to the problem (algorithm)
![Page 9: CSI 1340 Introduction to Computer Science II Chapter 1 Software Engineering Principles](https://reader036.vdocuments.mx/reader036/viewer/2022062503/5a4d1aca7f8b9ab05996f469/html5/thumbnails/9.jpg)
Design Tools
• Abstraction• Information hiding• Functional decomposition• Object-oriented design
![Page 10: CSI 1340 Introduction to Computer Science II Chapter 1 Software Engineering Principles](https://reader036.vdocuments.mx/reader036/viewer/2022062503/5a4d1aca7f8b9ab05996f469/html5/thumbnails/10.jpg)
Abstraction
• A model of a complex system that includes only the details essential to the perspective of the viewer of the system
![Page 11: CSI 1340 Introduction to Computer Science II Chapter 1 Software Engineering Principles](https://reader036.vdocuments.mx/reader036/viewer/2022062503/5a4d1aca7f8b9ab05996f469/html5/thumbnails/11.jpg)
Information Hiding
Hiding the details of a function or data structure with the goal of controlling access to the details of a module or structure.
PURPOSE: To prevent high-level designs from depending on low-level design details that may be changed.
![Page 12: CSI 1340 Introduction to Computer Science II Chapter 1 Software Engineering Principles](https://reader036.vdocuments.mx/reader036/viewer/2022062503/5a4d1aca7f8b9ab05996f469/html5/thumbnails/12.jpg)
Two Approaches to Building Manageable Modules
Divides the problem into more easily handled subtasks, until the functional modules (subproblems) can be coded.
Identifies various objects composed of data and operations, that can be used together to solve the problem.
FUNCTIONALDECOMPOSITION
OBJECT-ORIENTED DESIGN
FOCUS ON: processes FOCUS ON: data objects
![Page 13: CSI 1340 Introduction to Computer Science II Chapter 1 Software Engineering Principles](https://reader036.vdocuments.mx/reader036/viewer/2022062503/5a4d1aca7f8b9ab05996f469/html5/thumbnails/13.jpg)
FindWeighted Average
PrintWeighted Average
Functional Design Modules
Main
Print Data
Print Heading
Get DataPrepare File for Reading
![Page 14: CSI 1340 Introduction to Computer Science II Chapter 1 Software Engineering Principles](https://reader036.vdocuments.mx/reader036/viewer/2022062503/5a4d1aca7f8b9ab05996f469/html5/thumbnails/14.jpg)
Object-Oriented DesignA technique for developing a program in which
the solution is expressed in terms of objects -- self- contained entities composed of data and operations on that data.
Private data
set( )
hour( )...
Private data
set( )
month( )...
year( )
Date Time
second( )
![Page 15: CSI 1340 Introduction to Computer Science II Chapter 1 Software Engineering Principles](https://reader036.vdocuments.mx/reader036/viewer/2022062503/5a4d1aca7f8b9ab05996f469/html5/thumbnails/15.jpg)
More about OOD
Languages supporting OOD include: C++, Java, Smalltalk, Eiffel, and Object-Pascal.
A class is a programmer-defined data type and objects are variables of that type.
![Page 16: CSI 1340 Introduction to Computer Science II Chapter 1 Software Engineering Principles](https://reader036.vdocuments.mx/reader036/viewer/2022062503/5a4d1aca7f8b9ab05996f469/html5/thumbnails/16.jpg)
Procedural vs. Object-Oriented Code
“Read the specification of the software you want to build. Underline the verbs if you are after procedural code, the nouns if you aim for an object-oriented program.”
Brady Gooch, “What is and Isn’t Object Oriented Design,” 1989.
![Page 17: CSI 1340 Introduction to Computer Science II Chapter 1 Software Engineering Principles](https://reader036.vdocuments.mx/reader036/viewer/2022062503/5a4d1aca7f8b9ab05996f469/html5/thumbnails/17.jpg)
Implementation
• Translate the design into a computer program
![Page 18: CSI 1340 Introduction to Computer Science II Chapter 1 Software Engineering Principles](https://reader036.vdocuments.mx/reader036/viewer/2022062503/5a4d1aca7f8b9ab05996f469/html5/thumbnails/18.jpg)
Program Verification is the process of determining the degree to which a software product fulfills its specifications.
Program Verification
PROGRAM
SPECIFICATIONS
Inputs
Outputs
Processing Requirements
Assumptions
![Page 19: CSI 1340 Introduction to Computer Science II Chapter 1 Software Engineering Principles](https://reader036.vdocuments.mx/reader036/viewer/2022062503/5a4d1aca7f8b9ab05996f469/html5/thumbnails/19.jpg)
Verification vs. Validation
Program verification asks, “Are we doing the job right?”
Program validation asks, “Are we doing the right job?”
B. W. Boehm, Software Engineering Economics, 1981.
![Page 20: CSI 1340 Introduction to Computer Science II Chapter 1 Software Engineering Principles](https://reader036.vdocuments.mx/reader036/viewer/2022062503/5a4d1aca7f8b9ab05996f469/html5/thumbnails/20.jpg)
Various Types of Errors
Design errors occur when specifications are wrong
Compile errors occur when syntax is wrong
Run-time errors result from incorrect assumptions, incomplete understanding of the programming language, or unanticipated user errors.
![Page 21: CSI 1340 Introduction to Computer Science II Chapter 1 Software Engineering Principles](https://reader036.vdocuments.mx/reader036/viewer/2022062503/5a4d1aca7f8b9ab05996f469/html5/thumbnails/21.jpg)
Robustness
Robustness is the ability of a program to recover following an error; the ability of a program to continue to operate within its environment.
![Page 22: CSI 1340 Introduction to Computer Science II Chapter 1 Software Engineering Principles](https://reader036.vdocuments.mx/reader036/viewer/2022062503/5a4d1aca7f8b9ab05996f469/html5/thumbnails/22.jpg)
Verification of Software Correctness
• Design for correctness• Perform code and design walk-throughs and
inspections• Use debugging methods• Choose test goals and data• Write test plans• Perform structured integration testing
![Page 23: CSI 1340 Introduction to Computer Science II Chapter 1 Software Engineering Principles](https://reader036.vdocuments.mx/reader036/viewer/2022062503/5a4d1aca7f8b9ab05996f469/html5/thumbnails/23.jpg)
A Walk-Through Is a verification method using a team to perform a manual
simulation of the program or design, using sample test inputs, and keeping track of the program’s data by hand.
Its purpose is to stimulate discussion about the programmer’s design or implementation.
![Page 24: CSI 1340 Introduction to Computer Science II Chapter 1 Software Engineering Principles](https://reader036.vdocuments.mx/reader036/viewer/2022062503/5a4d1aca7f8b9ab05996f469/html5/thumbnails/24.jpg)
Program Testing
Testing is the process of executing a program with various data sets designed to discover errors.
DATA SET 1
DATA SET 2
DATA SET 3
DATA SET 4
. . .
![Page 25: CSI 1340 Introduction to Computer Science II Chapter 1 Software Engineering Principles](https://reader036.vdocuments.mx/reader036/viewer/2022062503/5a4d1aca7f8b9ab05996f469/html5/thumbnails/25.jpg)
Delivery
• Turn the program over to the customer or user
![Page 26: CSI 1340 Introduction to Computer Science II Chapter 1 Software Engineering Principles](https://reader036.vdocuments.mx/reader036/viewer/2022062503/5a4d1aca7f8b9ab05996f469/html5/thumbnails/26.jpg)
Operation
• Use the program
![Page 27: CSI 1340 Introduction to Computer Science II Chapter 1 Software Engineering Principles](https://reader036.vdocuments.mx/reader036/viewer/2022062503/5a4d1aca7f8b9ab05996f469/html5/thumbnails/27.jpg)
Maintenance
• Make changes to fix errors• Modify the program