Lec 3 Basic of Structured Programming
Lec 3 Basic of Structured Programming
Structured Programming
1101
Rafid Mostafiz
IIT, NSTU
Structured Programming
2
Easy to write:
Modular design increases the programmer's
productivity by allowing them to look at the big picture
first and focus on details later.
Easy to debug
Since each procedure is specialized to perform just one
task, a procedure can be checked individually.
Easy to Understand
The relationship between the procedures shows the
modular design of the program.
Features
4
Easy to Change
Since a correctly written structured program is self-
documenting, it can be easily understood by another
programmer
Structured Programming
5
Decision (selection)
Do
Average
Decision Structures
10
If…Then If…Then…Else
Case
If…Then
11
Is
Add 1 to
Code =
Yes Code1-Count
1?
No
If…Then…Else
12
Is
Gender =
No "F"? Yes
Do Male Do Female
Do Benefit-
Analysis
Repetition (Looping or Iteration)
13
Structures
Top-test loop
Bottom-test
loop
14
Any Question?