Lesson 3
Lesson 3
2
List and describe development tools
Use problem analysis chart
Use interactivity chart
Use IPO chart
Use algorithms (flowcharts and pseudocode)
Describe importance of documentation
3
We use programming language to communicate
with a computer
Different type of programming language applies
different syntax.
◦ Syntax:
Syntax the rules governing the computer operating
system, language and application
◦ Bug : Coding error in a computer program
◦ Debugging:
Debugging Process to find and correct the coding
errors (bugs)
4
Four (4) categories of tools can be used to organize
solutions to problems on a computer:
◦ Problem Analysis Chart (PAC)
◦ Interactivity Chart / Structure Chart
◦ IPO Chart
◦ Algorithm
Flowchart
pseudocode
5
Shows a beginning analysis of the problem
Programmer will try to understand and analyze
requirements of the problem
Allows programmer to glean only facts from the
problem
Separated into four (4) parts:
1. The given data
2. The required results
3. The processing that is required in the problem
4. A list of solution alternatives
6
7
8
Shows the overall layout or structure of the solution
Divide the processing identified into subtasks called
modules
these modules are connected together to show the
interaction of processing between modules
Each module contain tasks for one function, not more
than 20 instructions
◦ Example of function:
Enter data
Print result
calculate result
9
All modules are being controlled by a Control or
Main Module
The breakdown (in the format of chart) allows
10
Do you know what are these
symbols???
Triangle on upper left of box??
Circle in chart??
11
Diamond shape after Module2??
The control module, read
module, calculation module,
and print module are BASIC to
most programs.
From there, add other modules
as needed along with the
addition of processing symbols
to show:
◦ Duplicates
◦ Decision
◦ Repetition in a loop
12
13
IPO(Input, processing and output)
Chart
Extends and organizes information in problem
analysis chart (PAC) and the interactive chart
Combine the strength of the interactive chart with
◦ Input
◦ Processing
◦ Module reference
◦ Output
14
Shows more detail/information about:
◦ What data items are input??
◦ What processing takes place on each specific data??
◦ What information is output??
Sequence of completing IPO Chart:
1.Output
2.Input
3.Processing Is the sequence logical?? Why??
15
16
Algorithm
Shows the sequence of instructions, which will
form solution
A good algorithm’s criteria:
17
Flowchart
Graphical representation of algorithm, which
shows the flow of the processing from the
beginning to the end of a solution.
A flowchart always starts at the top of the
18
19
20
21
Flowchart -
Read Module in the Payroll
Problem
22
Flowchart –
Calc Module in the Payroll
Problem
23
Flowchart and Pseudocode for
Print Module in the Payroll
Problem
24
How to simplify this
flowchart??
25
Pseudocode
Algorithm which is represented in simple English
form
Each instruction is written on a separate line
Starts with “Start/Begin” and terminates with
“End”
Keywords and instructions are written from top
26
Pseudocode (Cont.)
Important keywords:
1. A computer can receive information
Keyword: Read, Get
2. A computer can show information
Keyword: Display, Print, Write
3. A computer can perform arithmetic calculation
27
Pseudocode (Cont.)
4. A computer can assign value to memory
location
Keyword: Set, Initialize
5. A computer can compare two variables to
decide which action to be taken
Keyword; IF….ELSE…..END_IF
6. A computer can repeat a group of action.
Keyword: WHILE…END_WHILE, REPEAT…..UNTIL
28
Begin
REPEAT
Get Hours, PayRate
GrossPay = Hours * PayRate
Display GrossPay
UNTIL NoMoreEmployee = True
End
29
Try to organize solution for problem
illustrated below, with the help of FOUR (4)
tools that you have learnt in this chapter.
30
Documentation
31
Internal Documentation
For programmers
Made up of remarks written with the instructions
to explain what is being done in the computer
program, so that it can b easily understood by
other programmers
Example:
what is the main purpose of developing this program
What are the meaning of certain code blocks
Status of program development
??
32
External Documentation
For end users
Made up of manuals or help menus written about
the solutions.
Example:
Tutorial which shows the steps to use program
Installation instruction
Help files
??
33
Coding the Solution
To be performed after the completion of
analyzing problem and organizing the solution.
A process of converting algorithm into real
34
Testing the Solution
to make sure that the solution meets
requirements of user
to check for errors in logic or in setup of the
35
Thanks for listening
QUESTIONS??????????????