Académique Documents
Professionnel Documents
Culture Documents
Prepared by Koo
Communication with Computer
• Basically, for a computer to “understand” a message, it
requires instructions with specific rules.
• If the instructions that are provided is incorrect the computer may
give an error message, the wrong answer or may not respond at all.
• The main challenge in problem solving is to provide the most
efficient solution.
• When efficiency is important, only then should each solution be
examined and kept or discarded
• Two programmers may develop equally good solutions to a
problem, but the solutions may look entirely different.
Prepared by Koo
Organizing the problem
• Some organization tools can be used to help us learn to solve
problem in computer. These included :
Prepared by Koo
Problem Analysis Chart (PAC)
• Divide problem into four major parts.
Prepared by Koo
PAC Example
Problem : Calculate the gross pay of an employee who worked based
on hourly rate. Formula to be used is GrossPay = Hours x Pay rate
The asterisk (**) in the Solution Alternatives column indicates that this
alternative will be chosen.
Prepared by Koo
Structure Chart (Cont..)
Indicate that the modules are part
of a set of modules that are
processed many times
Prepared by Koo
Structure chart Example
Prepared by Koo
IPO Chart
• IPO (Input-process-output) chart extends and organizes the
information in the problem analysis chart
Prepared by Koo
Writing Algorithms
• After using the structure chart and the IPO chart, the next step is
develop sets of instruction for computer, called algorithm.
• The programmers writes a separate sets of instructions for each
module in the structure chart
• The algorithms pull the structure chart and IPO chart together to
give a logical step-by-step solution.
Prepared by Koo
Algorithm Example
Note:
END – end the entire program
EXIT – exit point of the module
Prepared by Koo
Flowchart
• Based on algorithms, the programmer produce flowchart, a
graphical representation of the algorithms.
Prepared by Koo
Flowchart (cont..)
Prepared by Koo
Example Flowchart
Prepared by Koo
Example Flowchart (cont..)
Prepared by Koo
Documentation
• 2 basic types of documentation:
• Internal documentation :
• consists of remarks written with the instructions to
explain what is being done in the program.
• For programmer
• External :
• made up of the manuals or help menus written about
the solution.
• For user of the system
Prepared by Koo
Review Learning Outcome
Successful students should be able to:
• List and describe the basic tools used to aid in the development of
a solution to a problem :
• Problem Analysis Chart (PAC)
• Structure Chart or Interactivity Chart
• IPO Chart
• Algorithms
• Flowcharts
• Describe the categories of documentations
All marble balls have the same weight (3g) except one
(3.5g).
Prepared by Koo