Presentation is loading. Please wait.

Presentation is loading. Please wait.

Nyhoff, ADTs, Data Structures and Problem Solving with C++, Second Edition, © 2005 Pearson Education, Inc. All rights reserved. 0-13-140909-3 1 Software.

Similar presentations


Presentation on theme: "Nyhoff, ADTs, Data Structures and Problem Solving with C++, Second Edition, © 2005 Pearson Education, Inc. All rights reserved. 0-13-140909-3 1 Software."— Presentation transcript:

1 Nyhoff, ADTs, Data Structures and Problem Solving with C++, Second Edition, © 2005 Pearson Education, Inc. All rights reserved. 0-13-140909-3 1 Software Development Chapter 1

2 Home work assignment 1. Write few paragraphs (max two page) about yourself. Currently what is going on in your life, what you like and dislike, your family etc. You should have one paragraph about your expectation from this course. Please also mention what grade you expect in this course and your grade in CSC2100. Due date: 09/01/10 (Wednesday in class). CSC2110 - Data Structures/Algorithms 2

3 Nyhoff, ADTs, Data Structures and Problem Solving with C++, Second Edition, © 2005 Pearson Education, Inc. All rights reserved. 0-13-140909-3 3 Chapter Contents 1.1 Problem Analysis and Specification 1.2 Design 1.3 Coding 1.4 Testing, Execution, and Debugging 1.5 Maintenance

4 Nyhoff, ADTs, Data Structures and Problem Solving with C++, Second Edition, © 2005 Pearson Education, Inc. All rights reserved. 0-13-140909-3 4 Chapter Objectives Introduce software development approaches Contrast software development in programming course with real world Study top-down, objected oriented approaches Introduce design aspects –Select or build data types –Develop algorithms for operations on data Investigate error types Emphasize importance of testing Note time and effort devoted to maintenance

5 Nyhoff, ADTs, Data Structures and Problem Solving with C++, Second Edition, © 2005 Pearson Education, Inc. All rights reserved. 0-13-140909-3 5 5 Phases of Software Life Cycle Waterfall Model

6 Nyhoff, ADTs, Data Structures and Problem Solving with C++, Second Edition, © 2005 Pearson Education, Inc. All rights reserved. 0-13-140909-3 6 5 Phases of Software Life Cycle Realistic Waterfall Model

7 Nyhoff, ADTs, Data Structures and Problem Solving with C++, Second Edition, © 2005 Pearson Education, Inc. All rights reserved. 0-13-140909-3 7 Problem Analysis and Specification CS courses –small systems few hundred lines of code simple, straightforward self-contained “Real” world –large systems thousands of lines of code complex many components problem initially poorly defined 7

8 Nyhoff, ADTs, Data Structures and Problem Solving with C++, Second Edition, © 2005 Pearson Education, Inc. All rights reserved. 0-13-140909-3 8 Problem Analysis and Specification The specification or "contract" will include –Purpose –Precondition –Postcondition Real world contracts –Must be precise –May be required to prove end product meets these precise specifications

9 Nyhoff, ADTs, Data Structures and Problem Solving with C++, Second Edition, © 2005 Pearson Education, Inc. All rights reserved. 0-13-140909-3 9 Top Down Design Original problem partitioned into simpler subproblems –Each of these subproblems likewise subdivided

10 Nyhoff, ADTs, Data Structures and Problem Solving with C++, Second Edition, © 2005 Pearson Education, Inc. All rights reserved. 0-13-140909-3 10 OOD: Object-Oriented Design Identify the objects in the problem's specification and their types. Identify the operations or tasks to manipulate the objects 10

11 Nyhoff, ADTs, Data Structures and Problem Solving with C++, Second Edition, © 2005 Pearson Education, Inc. All rights reserved. 0-13-140909-3 11 OOD: Object-Oriented Design UML class diagram

12 Nyhoff, ADTs, Data Structures and Problem Solving with C++, Second Edition, © 2005 Pearson Education, Inc. All rights reserved. 0-13-140909-3 12 Data Types of the Objects Simple Structured –arrays –structures –class objects Think of them as Containers

13 Nyhoff, ADTs, Data Structures and Problem Solving with C++, Second Edition, © 2005 Pearson Education, Inc. All rights reserved. 0-13-140909-3 13 Algorithms Pseudo code Must be –Definite, unambiguous –Simple –Finite –correct and efficient –well structured Cannot separate data structures from algorithms

14 Nyhoff, ADTs, Data Structures and Problem Solving with C++, Second Edition, © 2005 Pearson Education, Inc. All rights reserved. 0-13-140909-3 14 Algorithms Unstructured goto's if-else's Structured while loop switch stmt

15 Nyhoff, ADTs, Data Structures and Problem Solving with C++, Second Edition, © 2005 Pearson Education, Inc. All rights reserved. 0-13-140909-3 15 Coding Select language of implementation Encode the design Example –Figure 1.9 Financial-aid update functionFigure 1.9 –Figure 1.10 Test-driver for Financial-aid update functionFigure 1.10 –Figure 1.11 Header file for FinancialAidAward classFigure 1.11 –Figure 1.12 Implementation file for FinancialAidAward classFigure 1.12 15

16 Nyhoff, ADTs, Data Structures and Problem Solving with C++, Second Edition, © 2005 Pearson Education, Inc. All rights reserved. 0-13-140909-3 16 Coding Verify integration –combining program units into a complete software system. Insure quality –programs must be correct, readable, and understandable –well-structured, documented, formatted for readability

17 Nyhoff, ADTs, Data Structures and Problem Solving with C++, Second Edition, © 2005 Pearson Education, Inc. All rights reserved. 0-13-140909-3 17 Testing, Execution, and Debugging Validation: "Are we building the right product?" –check that documents, program modules, etc. match the customer's requirements. Verification: "Are we building the product right?" –check that products are correct, –complete, –consistent with each other and with those of the preceding phases. 17

18 Nyhoff, ADTs, Data Structures and Problem Solving with C++, Second Edition, © 2005 Pearson Education, Inc. All rights reserved. 0-13-140909-3 18 Different Kinds Of Tests Required Unit tests: –Each individual program unit works? –Program components tested in isolation Integration tests : –Units combined correctly? –Component interface and information flow tested System tests: –Overall system works correctly? 18

19 Nyhoff, ADTs, Data Structures and Problem Solving with C++, Second Edition, © 2005 Pearson Education, Inc. All rights reserved. 0-13-140909-3 19 The "V" Life Cycle Model

20 Nyhoff, ADTs, Data Structures and Problem Solving with C++, Second Edition, © 2005 Pearson Education, Inc. All rights reserved. 0-13-140909-3 20 Types of Errors Syntax errors –errors in the grammar of the programming language Run-time errors –happen during program execution Logic errors –errors in algorithm design

21 Nyhoff, ADTs, Data Structures and Problem Solving with C++, Second Edition, © 2005 Pearson Education, Inc. All rights reserved. 0-13-140909-3 21 Black Box or Functional Test Outputs produced for various inputs –Checked for correctness –Do not consider structure of program component itself. Program unit is viewed as a black box –Accepts inputs and produces outputs, –Inner workings of the box are not visible. 21

22 Nyhoff, ADTs, Data Structures and Problem Solving with C++, Second Edition, © 2005 Pearson Education, Inc. All rights reserved. 0-13-140909-3 22 White Box or Structural Test Performance is tested –examine code’s internal structure. Test data is carefully selected –specific parts of the program unit are exercised. 22

23 Nyhoff, ADTs, Data Structures and Problem Solving with C++, Second Edition, © 2005 Pearson Education, Inc. All rights reserved. 0-13-140909-3 23 Maintenance Large % of –Computer center budgets –Programmer's time –Software development cost Because … –Includes modifications and enhancements –Poor structure, poor documentation, poor style Bug finding and fixing is tougher Impedes implementation of enhancements 23


Download ppt "Nyhoff, ADTs, Data Structures and Problem Solving with C++, Second Edition, © 2005 Pearson Education, Inc. All rights reserved. 0-13-140909-3 1 Software."

Similar presentations


Ads by Google