Chapter 2 Problem Solving, Abstraction, and Stepwise Refinement - PowerPoint PPT Presentation

About This Presentation
Title:

Chapter 2 Problem Solving, Abstraction, and Stepwise Refinement

Description:

Chapter 2. Problem Solving, Abstraction, and Stepwise Refinement. Chapter 2 ... Problem Abstraction. Abstraction provides for generalization in problem solving ... – PowerPoint PPT presentation

Number of Views:246
Avg rating:3.0/5.0
Slides: 10
Provided by: andrewst3
Category:

less

Transcript and Presenter's Notes

Title: Chapter 2 Problem Solving, Abstraction, and Stepwise Refinement


1
Chapter 2Problem Solving, Abstraction, and
Stepwise Refinement
2
Chapter 2
  • The Programmers AlgorithmDefine the
    problem.Plan the problem solution.Code the
    program.Test and debug the program.Document the
    program.

3
Chapter 2
  • Define the ProblemThe problem must defined in
    terms of output, input, and processing. Look for
    nouns in the problem statement that suggest
    output and input. Look for verbs to suggest
    processing steps.

4
Chapter 2
  • Plan the SolutionWhen planning computer
    programs, algorithms are used to outline the
    solution steps using Englishlike statements,
    called pseudocode. A good pseudocode algorithm
    should be independent of, but easily translated
    into, any formal procedural programming language.

5
Chapter 2
  • Code the ProgramCoding involves the actual
    writing of the program in a formal programming
    language. Once a language is chosen, the program
    is written, or coded, by translating your
    algorithm steps into the formal language code.

6
Chapter 2
  • Debug the ProgramRealize that you have an
    error.Locate and determine the cause of the
    error.Fix the error.
  • Desk-check the program,
  • Compile the program.
  • Run the program.
  • Debug the program using a debugger.

7
Chapter 2
  • Document the ProgramThe final program
    documentation is simply the recorded result of
    the problem definition, solution planning,
    coding, testing results, debugging results, and
    user instructions.

8
Chapter 2
  • Problem AbstractionAbstraction provides for
    generalization in problem solving by allowing you
    to view a problem in general terms, without
    worrying about the details of the problem
    solution.

9
Chapter 2
  • Stepwise RefinementStepwise refinement is the
    process of gradually adding detail to a general
    problem solution until it can be easily coded in
    a computer language.
Write a Comment
User Comments (0)
About PowerShow.com