[go: up one dir, main page]

0% found this document useful (0 votes)
45 views3 pages

class-note-PROGRAM DEVELOPMENT

kin

Uploaded by

geogrjonathan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
45 views3 pages

class-note-PROGRAM DEVELOPMENT

kin

Uploaded by

geogrjonathan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

PROGRAM DEVELOPMENT

Definition of a program:
A computer program can be defined as a list of instructions issues to the computer to
perform a particular task.

CHARACTERISTICS OF A GOOD PROGRAM


Every good program must have the following characteristics:
1. Accuracy: every good program must be free of errors.
2. Readability: the program should be easy for any programmer to read and
understand. This can be achieved using comments and naming variables to match
the data they represent.
3. Maintainability: a good program should be easily modified by its present or future
developers in order to make improvements, customisations, fix errors (bugs) or
adapt it to new environments and technologies.
4. Efficiency/performance: the less the resources a program needs the higher its
efficiency. Such resources are processor time, memory space, network bandwidth
and user interaction.
5. Generality: a good program should be flexible enough to solve all similar
programs to the one for which it was developed.
6. Usability: this refers to the ease with which a person can use the program for its
intended purpose.
7. Robustness: is the ability of a program to anticipate other problems outside the
errors of the programmer. Such problems as incorrect or corrupt data,
unavailability of needed resources such as memory, network connection (access),
etc.

PRECAUTIONS TO BE TAKEN WHEN WRITING A PROGRAM


1. Do not rush, be careful, stable and patient when writing programs.
2. No step in programming should be skipped.
3. The order of execution must be followed sequentially especially during desk-
checking.
4. Do not develop a program under stress or fatigue. Give your mind much freedom
to reason the logic of your program.

STEPS INVOLVED IN PROGRAM DEVELOPMENT


1. Problem definition
2. Problem analysis
3. Flowcharting
4. Desk-checking
5. Program coding
6. Program compilation
7. Program testing/debugging
8. Program documentation
Problem definition: in this stage, the programmer ensures that he understands what
the program should do by stating clearly the task the program is expected to
perform.
Problem analysis: this is the second step in program development whereby the task
or problem is closely studied to determine how the program should solve it. The
input, processing and output parts of the program are determined.
Flow-charting: this is the phase that the programmer writes an algorithm and uses a
flowchart (diagrammatic representation) to show the steps the program will take to
solve the problem defined.
Desk checking: is the process of executing the statements of the algorithm yourself
on a sample set of data. Here, the programmer solves/tests his flowchart with a
sample data to know if any adjustments need to be made.
Program coding: is the process of transforming the statements of algorithm into
actual computer instructions using a particular programming language e.g., BASIC,
FORTRAN, JAVA, etc. In this phase the actual program is written with a programming
language.
Program compilation: when the coding process is complete, the program will be
compiled if the programming language uses a compiler. This step will not be
necessary if the programming language uses an interpreter.
Program testing/debugging: this phase involves running or executing the program
with a compiler or interpreter to test and check if the program is able to solve the
problem it is expected to solve.

Debugging is also done in this phase. It is the process of detecting and removing
errors (also known as bugs) in a computer program. There are 3 types of errors that
may be found in a program:
1. Syntax error: occurs when a programmer disobeys any of the rules of the
language e.g., misspelling of a keyword, incorrect format of a statement, etc. This
type of error can be detected by an interpreter or a compiler because a program
cannot run with syntax errors present.
2. Semantic or runtime error: has to do with what statements mean, and not how
they are written. A program can run with semantic error present but will produce
erroneous results. Examples of such errors are mismatch of data type, endless
loop, etc.
3. Logic error: occurs if a program produces an unintended or undesired output. A
logic error is likely to occur if a programmer does not understand a problem very
well. A program will run with logic error present but will produce a wrong result.
E.g., when a program to multiply 2 by 3 gives 5 instead of 6.
Program documentation: involves writing a detailed description about the program,
how to use it and how to maintain it. Proper documentation starts within a program
using comments and proper naming of variables. Program documentation helps a
programmer to maintain and to redesign a program.
EXAMPLES OF INTERPRETED PROGRAMS AND COMPILED PROGRAMS
Compilers and interpreters are the two examples of translators. A translator is a
program that converts program instructions written in a particular programming
language to machine codes, which can be understood and executed by the
computer.

Compiler: A compiler translates a program written in a High Level Language to an


executable code, often in the machine language of the computer. Usually, the
program written in High Level Language is called the Source code and its translated
version is the Object program or Object Code (which is executed independent of the
compiler).

Interpreter: An interpreter, on the other hand, does not produce an Object Code, but
executes the Source Program one statement at a time.

Examples of interpreted programs and compiled programs are shown in the table
below:
Interpreted programs Compiled programs
BASIC C
PHP C++
Python C#
Perl Pascal
Asp FORTRAN
ALGOL

You might also like