Monday, August 16, 2010

Steps in Programming

There are 6 steps in programming

  1. Defining and analyzing problems
    • Programming begin with a specification of problems.
    • This steps is to identify and understand what are the problems to resolve.
    • The problems must be clearly define, explicit and the requirements in resolving it.
    • Analyzing the problems will determine the input, output and information required to solve these problems, as follows:
      • input – data to be processed
      • output – the desired result
      • the constraint and additional features in resolving the problems
  2. Planning of variables
    • Variables are simply references to memory locations.
    • A well plan use of variables will produce an efficient execution of program in terms of speed and memory utilization.
  3. Drawing the flowchart
    • Flowchart represents algorithm in graphic form comprising of geometrical symbols which is interrelated by line of flow.
  4. Program writing
    • In the design of program it should be written as simple as possible.
    • The main objective is to give a clear, readable programs through an orderly and disciplined approach to programming.
  5. Testing and debugging program
    • Once the program has been written it must be compiled and executed.
    • This is accomplished by an editor and compiler.
    • An editor lets us type a program, makes changes and save it to a file.
    • The compiler then translates the program into a form that the computer can read.
    • Once the program has been compiled and executed the presence of errors will be readily apparent.
    •  There two types of errors
      • Syntactic and execution errors
        • usually result in the generation of error when compiling or executing a program.
        • Error of this type is usually quite easy to find and correct.
      • Logical errors
        • Since the output resulting from logically incorrect program may appear to be error free.
        • Thus a good bit of probing may be required which is known as logical debugging
  6. Documentation of program
    • Program must be documented for future references and maintenance process.
    • A well documented program will make it easier for the original programmer or other programmer to follow the program logic and design.
    • Program document should consist of :
      • An accurate specification of requirement
      • Detail input, output, constraint and formula for the above problems
      • Algorithm in the form of flowchart or pseudo code
      • Program source complete with comment
      • Sample program which had been run and executed and the tested data.
      • Guideline on how to use the program.

No comments:

Post a Comment