Software Development - PowerPoint PPT Presentation

1 / 19
About This Presentation
Title:

Software Development

Description:

Software Development Define the problem (Analysis) Plan the solution Code Test and debug Maintain and Document – PowerPoint PPT presentation

Number of Views:35
Avg rating:3.0/5.0
Slides: 20
Provided by: btaylor
Category:

less

Transcript and Presenter's Notes

Title: Software Development


1
Software Development
  • Define the problem (Analysis)
  • Plan the solution
  • Code
  • Test and debug
  • Maintain and Document

2
Code
  • Write program in a specified language
  • editor - key in- create source program
  • .cpp (if c is the language)
  • compiling - create object program
  • Syntax error
  • .obj
  • link - create executable
  • .exe
  • Run
  • Logic errors
  • Lab 1

3
Problem Analysis
  • Problems Take one of the following tasks and
    write a set of instructions(a solution) so
    complete that another person could perform the
    task without asking questions
  • Make a cup of cocoa
  • Sharpen a pencil
  • Decide which number is the largest from a group
    of three numbers
  • Start a car(include directions regarding what to
    do if the car does not start
  • Buy a soda from the soda machine

4
Problem Solving
  • Identify, understand the problem
  • Obtain additional information
  • Read and reread to obtain additional information
  • Alternatives
  • List instructions that enable you to solve the
    problem by the selected method

5
Problem Solving
  • Some problems require a series of actions or an
    algorithmic colution
  • Exa. solving a complicated calculus program
  • Alphabetizing 10,000 names
  • Other problems require reasoning built on
    knowledge and experience heuristic solution
  • Computers are better at algorithmic solutions
  • Problems with problem solving
  • Define problem incorrectly
  • Don't identify a sufficient list of alternatives

6
Analysis of the Problem
  • 1. Determine what is given - input
  • gtnouns, adjectives
  • 2. Determine what is required - output
  • gtnouns, adjectives
  • 3. Determine the transformations
    needed(processing)
  • -actions needed to produce the required output
  • gtverbs, adverbs

7
Example 1
Read three numbers, add them together and print
the total. Read three numbers, add them together
and print the total.
8
Example 2
Write a program to prompt the operator for the
maximum and minimum temperature readings on a
particular day, accept those readings as
integers, and calculate and display on the screen
the average temperature.
9
Structured Programming
  • Control structures
  • sequence
  • selection or IF-THEN-ELSE
  • repetition or looping
  • subprograms
  • Top Down Design
  • Modularity

10
Design/Plan the solution
  • Algorithm a step by step procedure for solving
    a problem
  • All programs are implementations of algorithms
  • subtasks - hierarchy chart
  • logic
  • flowcharts
  • pseudocode
  • test solution for correctness - trace

11
Algorithm
  • Algorithm set of steps that defines how a task
    is performed
  • Program set of instructions written in
    appropriate language
  • Correctness
  • efficiency

12
Pseudocode
  • structured concise English statements used to
    state operations
  •  language independent,no standard
  •  use words and phrases that are in line with
    basic computer operations
  •  

13
Pseudocode
  • Write statements in simple English
  • Write each instruction on a separate line.
  • Use keywords and indentation for control
    structures.
  • 4. Write instructions from top to bottom, with
    only one entry and one exit.

14
Pseudocode
  •  1. Input - receiving information
  •  keywords - read, get
  •  Read - receive information from a record on a
    file
  • Get - receive information from the keyboard.
  •  Read student_name
  • Get system_date
  • Read number_1,number_2
  • Get tax_code
  •  use one verb followed by one or more nouns

15
Pseudocode
  • 2. Output
  • putting information out
  • put, output,display - screen
  • print - printer
  • write - file
  • Print smaller.
  • Print 'Program Completed'
  • Write customer_record to file
  • Output total_tax
  • Display 'End of Data'

16
Output continued
  • Labels
  • Print 'label' or Print "label"
  •  statement inside quotes is printed as it appears
  • Print 'x' // if x 5
  • Yields x
  • Print x
  •  yields 5
  •  Print 'X ' and x
  •  yields X 5

17
Pseudocode
  • 3. Arithmetic
  •  use name of the operation or algebraic symbol
  •  add,subtract,multiply, divide, exponentiation
  •   - /
  •  x algebraic expression
  • count count 1
  • net pay hourly_pay_rate hours_worked
  • sales_tax cost_price 0.10
  • sales_tax price tax_rate

18
Pseudocode
  • 4. Assignment - place information into a storage
    location
  •  Initialize, Set - give variable initial value
  • Save,Store - save info for later
  •   //preferred
  • y 3 note does not mean equality
  • could involve calculation
  • area length width
  •   

19
Assignment
  • Examples
  • counter 0
  • Initialize counter to zero
  • Set count to 1
  • Initialize tot_accums to 0
  • Set upper_limit to 100
  • total_price cost_price sales_tax
Write a Comment
User Comments (0)
About PowerShow.com