7907 Program Development
7907 Program Development
Meaning of a Program
A computer program is a general term used to describe the set of instructions that the computer
use to performs a specific task. A computer program is usually written by a computer
programmer using a programming language.
Characteristics of a Good Program
1. Problem definition
2. Problem analysis
3. Algorithm/Flowcharting
4. Desk checking
5. Program coding
6. Program compilation
7. Program testing and debugging
8. Program documentation.
1. Problem Definition: Entails defining and understanding the problem statement and
deciding the boundaries of the problem. In this phase we need to understand the problem
statement, what is our requirement, what should be the output of the problem solution?
These are defined in this first phase of the program development life cycle.
2. Problem Analysis: The requirements like variables, functions, or resources to solve
the problem are gathered.
3. Algorithm/Flowcharting: During this phase, a step by step procedure to solve the
problem using the specification given in the previous phase is developed.
4. Desk checking: This involves manual checking of the logic of a program for
correctness
5. Coding: This phase involves using a programming language to write or implement
actual programming instructions for the steps defined in the previous phase. In this phase,
we construct actual program. That means we write the program to solve the given
problem using programming languages like C, C++, Java etc.,
6. Program compilation: Compilation is the process whereby the source program
(program written in other language different from machine language), is translated into
machine readable code. A compiler does the job of compilation.
7. Testing & Debugging: During this phase, we check whether the code written in
previous step is solving the specified problem or not, i.e. check whether input data will
provide desired output or not.
8. Maintenance: During this phase, the program is actively used by the users. If the user
encounters any problem or wants any enhancement, then we need to repeat all the phases
from the starting, so that the encountered problem is solved or enhancement is added.
9. Documentation: Program documentation includes hard-copy or electronic manuals
that enable users, program developers, and operators to interact successfully with a
program, e.g. user manual (a description of software commands and troubleshooting
guide).
Compilation and interpretation of program
A compiler translates the entire program (source code/program) written in a high level language
into an intermediate form called (object code/program), which can be directly executed by the
machine. On the other hand, an interpreter does not produce an object code but translate the
source program line by line directly into machine language.
Examples of compiled programs languages are: C, C++, C#, Ada, ALGOL, Java, COBOL,
Visual Basic, Lisp, FORTRAN, Pascal
Examples of interpreted languages are: QBASIC, JavaScript, PHP, ASP, APL
How a compiler works
The brain of the compiler is the parser. It knows the syntax (rule) of the source language or the
grammatical rules that determine how the source statements are written. Whenever the parser
needs more of the source program statements to work on, it calls upon the scanner. The scanner
reads in the source program statement and breaks it into a sequence of tokens – words, numbers,
identifiers, operators etc. It hands them one at a time to the parser whenever the parser calls for
the next one.
The parser also knows the semantics (meaning) of the source language. The parser’s knowledge
of the semantics enables it to call the code generator to produce the object code, which performs
the operation specified by the instruction. This continues until the entire program has been read
in and translated.
How an interpreter works
Just like the compiler, an interpreter also has a parser that controls it. Its scanner does the same
job as that of the compiler. However, an interpreter has an executor instead of the code
generator.