Pseudocode - PowerPoint PPT Presentation

1 / 7
About This Presentation
Title:

Pseudocode

Description:

Pseudocode Developing Your Program Logic What is Pseudocode A computer program is the representation of an – PowerPoint PPT presentation

Number of Views:170
Avg rating:3.0/5.0
Slides: 8
Provided by: Donald193
Category:

less

Transcript and Presenter's Notes

Title: Pseudocode


1
Pseudocode
  • Developing Your Program Logic

2
What is Pseudocode
  • A computer program is the representation of an
    "algorithm" (an unambiguous set of steps, in a
    particular order, which when followed will solve
    the problem)
  • Pseudocode is the representation of these steps
    in "structured English"
  • Steps must be clear (i.e. unambiguous)
  • Order must be specified
  • When the steps (i.e., instructions) are followed,
    they must produce a solution to the specified
    problem

3
Why Develop Logic Using Pseudocode?
  • The alternative just enter Java code?
  • logic is not clear
  • computer language (e.g., Java) is too detailed
    and lengthy
  • focus moves to language syntax
  • is not conducive to successive refinement
  • Flowcharts and other design tools are suitable
    alternatives to pseudocode

4
Successive Refinement
  • Equally applicable whether you use pseudocode or
    flowcharting
  • Start at the "top" which is a one line statement
    of your program's purpose and break it down by
    stages into greater and greater levels of detail
  • Successive refinement stops when there is enough
    detail to write the program
  • Each pseudocode statement or flowchart symbol is
    a basic building block (like a tinker toy)
  • these are assembled into complex structures
  • assembled in specific ways

5
Applying Successive Refinement
  • Start with a one-line statement of the problem
  • Break down into 3-5 steps
  • Break down each of these into 3-5 steps
  • Continue this process (i.e. successive
    refinement) until each step will become one or a
    small number of Java statements

6
Program (Logic) Planning
  • Look at the output (desired product)
  • Determine what inputs are necessary to allow the
    creation of desired output
  • Design the logic (steps) to collect the input and
    build the desired output
  • Often this leads to a general program logic flow
    of
  • input
  • processing
  • output

7
Advantages Derived from Using Pseudocode
  • Good tool for program logic planning
  • Can use to review system logic with user
  • Can document logic for system maintenance
Write a Comment
User Comments (0)
About PowerShow.com