Lec 2
Lec 2
learning otcomes
By the end of this session, you will be able to:
• Identify the process of creating programs.
• Understand the phases of program development.
• Identify the key activities that take place during program
development.
"Have you ever written or used a
program? What do you think goes into
creating it?"
Process of Creating Programs
1. Description of Program specifications(Definition)
Program specification is the first step in developing a computer
program. Program specification is also called program definition or
program analysis.
It requires the programmer to follow five specific tasks:
The program development life cycle is a set of steps or phases that are used to
develop a program in any programming language. Generally, the program
development life cycle contains 7 phases, which are as follows
i. Problem Definition
ii. Program Design
iii. Coding
iv. Debugging
v. Testing
vi. Documentation
vii. Maintenanc
i. Problem Definition:
• The first step in the process of program development is
the thorough understanding and identification of the
problem for which the program or software is to be
developed.
• In this step, the problem has to be defined formally.
• All the factors like Input/output, processing requirements,
memory requirements, error handling, and interfacing with
other programs have to be taken into consideration in this
stage.
ii. Program Design:
• The next stage is the program design. The software
developer makes use of tools like algorithms and
flowcharts to develop the design of the program.
• Algorithm
• Flowchart
iii. Coding:
• Once the design process is complete, the actual computer program is
written, i.e. the instructions are written in a computer language.
• Coding is generally a very small part of the entire program
development process and also a less time-consuming activity in reality.
• In this process all the syntax errors i.e. errors related to spelling,
missing commas, undefined labels, etc. are eliminated. For effective
coding some of the guidelines which are applied are : Use of
meaningful names and labels of variables, Simple and clear
expressions,
• Modularity with emphasis on making modules generalized,
• Making use of comments and indenting the code properly,
• Avoiding jumps in the program to transfer control.
iv. Debugging:
• At this stage, the errors in the programs are detected and
corrected.
• This stage of program development is an important process.
Debugging is also known as program validation.
• Some common errors which might occur in the programs
include: Un initialization of variables.
• Reversing of an order of operands.
• Confusion of numbers and characters.
• Inverting of conditions eg jumping on zero instead of on not
zero.
v. Testing:
• The program is tested on several suitable test cases.
• A test plan of the program has to be done at the stage of
the program design itself.
• This ensures a thorough understanding of the
specifications.
• The most trivial and most special cases should be
identified and tested.
• It is always useful to include the maximum and minimum
values of all variables as test data.
vi. Documentation:
• Documentation is a very essential step in program
development.
• Documentation helps the users and the people who
maintain the software.
This ensures that future modifications if required can be
done easily. Also, it is required during redesigning and
maintenance.
vii. Maintenance:
• Updating and correction of the program for changed
conditions and field experience are accounted for in
maintenance.
• Maintenance becomes essential in the following
situations:
• Change in the specification,
• Change in equipment,
• Errors are found during the actual execution of the
program.
Program development methodologies
AGILE
It is a practice that promotes continuous iteration of development
and testing throughout the software development lifecycle of the
project. In the Agile model, both development and testing activities
are concurrent, unlike in the Waterfall model.