Implementation Phase
Translate your Locate and
algorithm into a correct any errors
Programming in the code
Language (syntax, logic)
Steps in
Implementation
Phase
Execute the Maintain the
program program
Source code is generally
understood to
mean programming
Programming statements that are created by
Language a programmer with a text
editor or a visual
programming tool and then
saved in a file.
Errors
Logic errors occur when
Syntax errors, which are the there are mistakes in the
errors resulting from sequence of the program
incorrect use of the sentences, such as using the
programming language wrong mathematical formula,
syntax or misspelling a wrong operator in an
variable or keyword. expression or incorrect use of
looping structures.
Execute your program
This includes using test data to ensure that the
program is working as expected and can
produce error messages as needed.
Maintain the Program
This includes documenting the program
throughout the coding process by writing
comments on how to use the program, as well
as comments within the program on how it
works.
Converting a program from
source code to object code
This is performed by a ‘translator’
program. These are programs that
translate a specific program from one
language to another – from a high-level
language to a low-level language.
Interpreters, compilers and assemblers
are all translators.
Interpreter
Translates the source program line- by-line,
and if an error is detected then translation
is aborted (stopped) BASIC is a language
which is interpreted.
Compiler
• Translates all program instructions at one time and produces a ‘stand-
alone’ object program that can be executed (run) on its own. Error
checks (syntax and logic) are performed, and an error summary is
issued. Once the program is compiled and no errors are detected, the
compiler will then instruct the control unit to start executing the
program. If the program produces incorrect output, or stops
unexpectedly, then a runtime error is the cause (B). Otherwise, the
object program will be executed each time it is run, but the source code
only needs to be compiled once. If there are any modifications to the
source code, then it must be recompiled. COBOL is a language which is
compiled.
Occur as the program compiles
or ‘runs’. These errors are usually
due to unexpected events such
as division by zero or lack of
Runtime Errors memory for the computer to
manipulate the data. Runtime
errors can be very difficult to
trace as the program may
produce results most of the time.
Debugging
The process of finding the errors
in the source code (detection),
understanding why they
occurred (diagnosis) and
correcting them. Errors are often
found through error messages
generated by the program or the
operating system.