Professional Documents
Culture Documents
Structure Programming
2.1 Approach
Algorithm, Pseudo-Code
2.3 and Flowchart
2 YAW- credit to HAA,RAK & AIH
Lesson Outcomes
1. Explain the structured programming approach
2. Develop simple algorithm to solve basic
arithmetic operation
What is a Program?
A set of instruction for computer to execute
A collection of instructions necessary to solve a
specific problem
SOFTWARE or FIRMWARE?
Procedural or
Functional
Object oriented
memory addresses
Information stored in memory address is
accessed by fetch-execute cycle
Program Counter (PC) store current memory
address information
Registers store current instruction and data
executed
Written
descriptions and
procedures about a
program
User manual
Transform design to coding
Writing the program or
Debugging coding
Syntax errors
Logic errors
10 YAW- credit to HAA,RAK & AIH
2.3 Algorithm, Pseudo-Code and Flowchart
Algorithm
Method for solving well structured problem
Sequence of steps to accomplish specific task
connector
operation
input/output Off-page
connector
decision
2. Read number1
Read number2
3. Read number2
5. Display sum
Display Sum
5. End
end
17 YAW- credit to HAA,RAK & AIH
Solution
FALSE
value < 0?
TRUE
Print The
value is
negative
End
FALSE FALSE
value < 0? value == 0?
TRUE TRUE
End
24 YAW- credit to HAA,RAK & AIH
END OF CHAPTER 2
1. Q& A
2. Outcomes
Explain the structured programming approach
Develop simple algorithm to solve basic
arithmetic operation
3. Reflection