Download presentation
Presentation is loading. Please wait.
Published byShon Briggs Modified over 9 years ago
1
Software Development Problem Analysis and Specification Design Implementation (Coding) Testing, Execution and Debugging Maintenance
2
Problem Analysis and Specification Computer Science programming assignment - specific statement of problem quantitative description clearly defined requirements for needed: input, output, calculations, test data Computer Science programming assignment - specific statement of problem quantitative description clearly defined requirements for needed: input, output, calculations, test data
3
Problem Analysis and Specification “Real World” request - general statement of problem qualitative (“more accurate”) not quantitative precision missing for input, output, processes “Real World” request - general statement of problem qualitative (“more accurate”) not quantitative precision missing for input, output, processes
4
Statement of specifications the formal statement of the problem’s requirements the major reference document a benchmark used to evaluate the final system
5
Design 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
6
Object-centered design 1. Identify the objects in the problem's specification. 2. Identify the operations needed to solve the problem. 3. Arrange the operations in a sequence of steps, called an algorithm, which, when applied to the objects, will solve the problem.
7
Algorithm May be written in pseudo-code Characteristics of steps (instructions), see pg 9: –Definite and unambiguous –Simple –Finite Difference between correctness and efficiency, see pp 7-8 –O(n) — grows linearly with size (n) of the input –O(1) — is constant, i.e. independent of size of input
8
Algorithm (Structured Version) / * Algorithm to read and count several triples of distinct numbers and print the largest number in each triple. * / 1. Initialize count to 0. 2. Read the first triple of numbers x, y, z. 3. While x is not the end-of-data-flag do the following: a. Increment count by 1. b. If x > y and x > z then display x. Else if y > x and y > z then display y Else display z. c. Read the next triple x, y, z. 4. Display count.
9
Implementation Select language of implementation Encode the design Verify Integration –combining program units into a complete software system. Insure Quality –programs must be correct, readable, and understandable –well-structured, documented, stylistic (see guidelines on pp. 15-18)
10
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.
11
Errors may occur in any of the phases –Specifications don't accurately reflect given information or the user's needs/requests –Logic errors in algorithms –Incorrect coding or integration –Failure to handle boundary data or test values
12
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?
13
The "V" Life Cycle Model
14
Unit testing –probably the most rigorous and time-intenstive –surely the most fundamental and important –kinds of errors tested — syntax — linking — run-time — logical
15
Black box or functional test Outputs produced for various inputs are checked for correctness without considering the structure of the module itself. ( Program unit is viewed as a black box that accepts inputs and produces outputs, but the inner workings of the box are not visible.
16
White box or structural test Performance is tested by examining code’s internal structure. Test data is carefully selected so that specific parts of the program unit are exercised.
17
Example: Binary search (pp. 19-23)
18
Black box test Use n = 7 and sample array a of integers
19
Boundary Testing
20
Techniques to locate error
21
White-box test
22
Maintenance –Large % of computer center budgets –Large % of programmer's time –Largest % of software development cost Why? –Includes modifications and enhancements –Poor structure, poor documentation, poor style less likely to catch bugs before release make fixing of bugs difficult and time-consuming impede implementation of enhancements
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.