Chapter 1 Software Engineering Principles. Problem analysis Requirements elicitation Software specification High- and low-level design Implementation.

Slides:



Advertisements
Similar presentations
1 Software Engineering Lecture 11 Software Testing.
Advertisements

6-1 Chapter Goals Determine whether a problem is suitable for a computer solution Describe the computer problem-solving process and relate it to Polya’s.
Problem Solving and Algorithm Design
Chapter 6 Problem Solving and Algorithm Design. 6-2 Chapter Goals Determine whether a problem is suitable for a computer solution Describe the computer.
C++ Plus Data Structures
Important Definitions Class: A structured data type that is used to represent an abstract data type (ADT) Class member: A components of a class. It can.
Algorithms and Problem Solving
Chapter 6 Problem Solving and Algorithm Design Nell Dale John Lewis.
Fall 2007CS 2251 Software Engineering Intro. Fall 2007CS 2252 Topics Software challenge Life-cycle models Design Issues Documentation Abstraction.
Chapter 1 Principles of Programming and Software Engineering.
Chapter 1 Software Engineering. Homework ► Read Section 2.2 (pages 79-98) ► Answer questions: ► 7, 8, 11, 12, & 13 on page 134. ► Answer on paper, hand.
Copyright by Scott GrissomCh 1 Software Development Slide 1 Software Development The process of developing large software projects Different Approaches.
Software Engineering Principles and C++ Classes
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
SW Engineering. 2 Goals Describe the general activities in the software life cycle Describe the goals for "quality" software Explain the following terms:
1 Programming Style Files Lecture 1 Slides by Sylvia Sorkin, Community College of Baltimore County - Essex Campus Modified by Reneta Barneva, SUNY-Fredonia.
Outline Types of errors Component Testing Testing Strategy
Introduction to Software Design Chapter 1. Chapter 1: Introduction to Software Design2 Chapter Objectives To become familiar with the software challenge.
BY RAJESWARI S SOFTWARE TESTING. INTRODUCTION Software testing is the process of testing the software product. Effective software testing will contribute.
Extreme Programming Software Development Written by Sanjay Kumar.
Testing. What is Testing? Definition: exercising a program under controlled conditions and verifying the results Purpose is to detect program defects.
TESTING.
GENERAL CONCEPTS OF OOPS INTRODUCTION With rapidly changing world and highly competitive and versatile nature of industry, the operations are becoming.
Software Testing.
Introduction CS 3358 Data Structures. What is Computer Science? Computer Science is the study of algorithms, including their  Formal and mathematical.
COP 3530 PROGRAM, FILE & DATA STRUCTURES Syllabus Syllabus Lab Information Lab Information Overrides Overrides Questions? Questions?
Software Testing Testing types Testing strategy Testing principles.
1 Chapter-01 Programming Methodologies Procedural/Structured Design Objected-Oriented Design.
1 C++ Plus Data Structures Nell Dale Chapter 1 Software Engineering Principles Modified from the Slides made by Sylvia Sorkin, Community College of Baltimore.
Software Development Cycle What is Software? Instructions (computer programs) that when executed provide desired function and performance Data structures.
1 Systems Analysis and Design in a Changing World, Thursday, January 18, 2007.
Chapter 1 Software Engineering Principles. Lecture 2.
Introduction CS 3358 Data Structures. What is Computer Science? Computer Science is the study of algorithms, including their  Formal and mathematical.
Programming Life Cycle Problem analysisunderstand the problem Requirements definition specify what program will do High- and low-level designhow it meets.
Data Structures Using C++1 Chapter 1 Software Engineering Principles and C++ Classes.
Introduction to Computer Application (IC) MH Room 517 Time : 7:00-9:30pm.
CS Data Structures I Chapter 2 Principles of Programming & Software Engineering.
1 Introduction to Software Testing. Reading Assignment P. Ammann and J. Offutt “Introduction to Software Testing” ◦ Chapter 1 2.
Software Engineering Review CS 244 Brent M. Dingle, Ph.D. Game Design and Development Program Department of Mathematics, Statistics, and Computer Science.
The basics of the programming process The development of programming languages to improve software development Programming languages that the average user.
1 Program Input Software Design Chapter 4. 2 You Will Want to Know... Prompting for and reading values into a program. Accessing data from a file. What.
Data Structures Using C++ 2E
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
Software Engineering 2004 Jyrki Nummenmaa 1 BACKGROUND There is no way to generally test programs exhaustively (that is, going through all execution.
© 2006 Pearson Addison-Wesley. All rights reserved 2-1 Chapter 2 Principles of Programming & Software Engineering.
Software Engineering Issues Software Engineering Concepts System Specifications Procedural Design Object-Oriented Design System Testing.
Data Structure Introduction Dr. Bernard Chen Ph.D. University of Central Arkansas Fall 2010.
CSI 1340 Introduction to Computer Science II Chapter 1 Software Engineering Principles.
Chapter 1 Data Abstraction: The Walls CS Data Structures Mehmet H Gunes Modified from authors’ slides.
HNDIT23082 Lecture 09:Software Testing. Validations and Verification Validation and verification ( V & V ) is the name given to the checking and analysis.
Chapter 2 Principles of Programming and Software Engineering.
Chapter 1 Software Development Dr. Bernard Chen Ph.D. University of Central Arkansas Fall 2008.
Testing Overview Software Reliability Techniques Testing Concepts CEN 4010 Class 24 – 11/17.
Principles of Programming & Software Engineering
C++ Plus Data Structures
Chapter 2- Visual Basic Schneider
Chapter 1 Data Abstraction: The Walls
Principles of Programming and Software Engineering
Quality Management Perfectqaservices.
About the Presentations
Chapter 1 Software Engineering Principles
Computer Programming.
Chapter 1 Software Engineering.
Lecture 09:Software Testing
Chapter 2- Visual Basic Schneider
Chapter 1 Introduction(1.1)
Chapter 2- Visual Basic Schneider
Test Case Test case Describes an input Description and an expected output Description. Test case ID Section 1: Before execution Section 2: After execution.
Chapter 2. Problem Solving and Software Engineering
Dale/Weems/Headington Program Input and the Software Design Process
Presentation transcript:

Chapter 1 Software Engineering Principles

Problem analysis Requirements elicitation Software specification High- and low-level design Implementation Testing and Verification Delivery Operation Maintenance CS Software Engineering Principles 2 The Software Life Cycle

CS Software Engineering Principles 3 Waterfall Model

CS Software Engineering Principles 4 Spiral Model

A disciplined approach to the design, production, and maintenance of computer programs that are developed on time and within cost estimates, using tools that help to manage the size and complexity of the resulting software products CS Software Engineering Principles 5 Software Engineering

A logical sequence of discrete steps that describes a complete solution to a given problem computable in a finite amount of time CS Software Engineering Principles 6 An Algorithm Is...

Hardware the computers and their peripheral devices Software operating systems, editors, compilers, interpreters, debugging systems, test-data generators, and so on Ideaware shared body of knowledge CS Software Engineering Principles 7 Programmer ToolBoxes

It works It can be modified without excessive time and effort It is reusable It is completed on time and within budget CS Software Engineering Principles 8 Goals of Quality Software

Tells what the program must do, but not how it does it Is written documentation about the program CS Software Engineering Principles 9 Detailed Program Specification

A model of a complex system that includes only the details essential to the perspective of the viewer of the system Programs are abstractions CS Software Engineering Principles 10 Abstraction

CS Software Engineering Principles 11 Abstraction (cont.)

The practice of hiding the details of a module with the goal of controlling access to the details from the rest of the system A programmer can concentrate on one module at a time Each module should have a single purpose or identity CS Software Engineering Principles 12 Information Hiding

A problem is approached in stages Similar steps are followed during each stage, with the only difference being the level of detail involved Some variations: Top-down Bottom-up Functional decomposition Round-trip gestalt design CS Software Engineering Principles 13 Stepwise Refinement

CS Software Engineering Principles 14 Visual Tools

CS Software Engineering Principles 15 Visual Aids – CRC Cards

“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.” Grady Booch, “What is and isn’t Object Oriented Design,” CS Software Engineering Principles 16 Procedural vs. Object-Oriented Code

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 PROCEDURAL DECOMPOSITION OBJECT-ORIENTED DESIGN FOCUS ON: processes FOCUS ON: data objects 17 CS Software Engineering Principles Approaches to Building Manageable Modules

CS Software Engineering Principles 18 Functional Design Modules Find Weighted Average Print Weighted Average Main Print Data Print Heading Get Data Prepare File for Reading

A 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 CS Software Engineering Principles 19 Object-Oriented Design Private data << setf Private data >> get ignore cin cout

Testing: The process of executing a program with data sets Debugging: The process of removing known errors Acceptance Test: The process of testing the system in its real environment with real data Regression Testing: Reexecution of program tests after modifications have been made Ensuring Software Correctness CS Software Engineering Principles 20

CS Software Engineering Principles 21 Verification vs. Validation Program validation asks, “Are we doing the right job?” Program verification asks, “Are we doing the job right?” B.W. Boehm, Software Engineering Economics, 1981.

CS Software Engineering Principles 22

Specification Design Coding Input CS Software Engineering Principles 23 Types of Errors

CS Software Engineering Principles 24 Cost of a Specification Error Based on When It Is Discovered

Robustness: The ability of a program to recover following an error; the ability of a program to continue to operate within its environment Preconditions: Assumptions that must be true on entry into an operation or function for the postconditions to be guaranteed Postconditions: Statements that describe what results are to be expected at the exit of an operation or function assuming that the preconditions are true CS Software Engineering Principles 25 Controlling Errors

Deskchecking: Tracing an execution of a design or program on paper Walk-through: A verification method in which a team performs a manual simulation of the program or design Inspection: A verification method in which one member of a team reads the program or design line by line and others point out errors CS Software Engineering Principles 26 Design Review Activities

CS Software Engineering Principles 27 Program Testing Testing is the process of executing a program with various data sets designed to discover errors.

For Each Test Case: determine inputs determine the expected behavior of the program run the program and observe the resulting behavior compare the expected behavior and the actual behavior CS Software Engineering Principles 28 Program Testing (con't)

Unit testing: Testing a class or function by itself Black-box testing: Testing a program or function based on the possible input values, treating the code as a “black box” Clear (white) box testing: Testing a program or function based on covering all of the branches or paths of the code CS Software Engineering Principles 29 Types of Testing

30 CS Software Engineering Principles

31 CS Software Engineering Principles

Is performed to integrate program modules that have already been independently unit tested. CS Software Engineering Principles 32 Integration Testing Find Weighted Average Print Weighted Average Main Print Data Print Heading Get Data Prepare File for Reading

Integration Testing Approaches CS Software Engineering Principles 33 Ensures correct overall design logic. Ensures individual modules work together correctly, beginning with the lowest level. TOP-DOWN BOTTOM-UP USES: placeholder USES: a test driver to call module “stubs” to test the functions being tested. the order of calls.

Document showing the test cases planned for a program or module, their purposes, inputs, expected outputs, and criteria for success For program testing to be effective, it must be planned Start planning for testing before writing a single line of code CS Software Engineering Principles 34 Test Plans

CS Software Engineering Principles 35 Testing C++ Structures

Declare an instance of the class being tested Get name and open input file Get name and open output file Get label for the output file Write the label on the output file Read the next command from the input file Set numCommands to 0 While the command read is not ‘quit’ Execute member function of the same name Print the results to the output file Increment numCommands by 1 Print “Command number” numComands “completed” to the screen Read the next command from the input file Close the input and output files. Print “Testing completed” to the screen 36 CS Software Engineering Principles

37 Life-Cycle Verification Activities

When a stream enters the fail state, further I/O operations using that stream are ignored. But the computer does not automatically halt the program or give any error message. Possible reasons for entering fail state include: invalid input data (often the wrong type) opening an input file that does not exist opening an output file on a disk that is already full or is write-protected. CS Software Engineering Principles 38 Stream Failure