Module 4 Design a Flowchart of a Simple Program
Module 4 Design a Flowchart of a Simple Program
Computer
Programming
Quarter II – Module 4:
Design a Flowchart
1. Use the module with care. Do not put unnecessary mark/s on any part of
the module. Use a separate sheet of paper in answering the
exercises.
2. Read the instruction carefully before doing each task.
3. Observe honesty and integrity in doing the tasks and checking your
answers.
4. Finish the task at hand before proceeding to the next.
5. Return this module to your teacher/facilitator once you are through with it.
If you encounter any difficulty in answering the tasks in this module, do not
hesitate to consult your teacher or facilitator. Always bear in mind that you
are not alone.
We hope that through this material, you will experience meaningful learning
and gain deep understanding of the relevant competencies. You can do it!
ii
Explore
Introduction:
Computers are not intelligent. Yes, computers are fast. They are able to
calculate complex computations in mere seconds. However, being fast does not
make computers intelligent. It only makes them high-speed followers, nothing
more. In reality, computers are only as food as the instructions or programs you
feed them. This is very important point to consider in programming.
You might think that programming simply involves typing words and numbers in
a computer. Actually, this activity, called coding, is only a small part of the
whole programming process. Programming, also called software engineering, is a
multi-step process for creating a program.
1.
Learn
What is a Flowcharts?
A flowchart is a visual outline of an algorithm in which the steps and processes to
be followed are represented by symbols. There are actually two kinds of
flowcharts: the system flowcharts and the program flowchart.
Problem:
Get the following data from the user: employee’s name,
hourly rate, number of hours worked, and deductions
Calculate the employee’s gross pay and net pay
Display the employee’s name, gross pay, and net pay
Pseudocode:
READ name, hourly rate, hours worked, deductions
Calculate: Gross pay = hourly rate multiplied by number
of hours worked
Calculate: Net pay = Gross pay minus deductions
WRITE name, Gross pay, Net pay
The algorithm and pseudocode in Figure 1.1 would look liked one below as a
flowchart:
Start
Input
Name, HrlyRate,
HrsWork, Deductn
Print
Name, GrossPay,
Netpay
End
History of Flowcharts
The first structured method for documenting process flow, the "flow process
chart", was introduced by Frank and Lillian Gilbreth in the presentation "Process
Charts: First Steps in Finding the One Best Way to do Work", to members of the
American Society of Mechanical Engineers (ASME) in 1921. The Gilbreths' tools
quickly found their way into industrial engineering curricula. In the early 1930s,
an industrial engineer, Allan H. Mogensen began to train business people in the
use of some of the tools of industrial engineering at his Work Simplification
Conferences in Lake Placid, New York.
Art Spinanger, a 1944 graduate of Mogensen's class, took the tools back to
Procter and Gamble where he developed their Deliberate Methods Change
Program. Ben S. Graham, another 1944 graduate, Director of Formcraft
Engineering at Standard Register Industrial, applied the flow process chart to
information processing with his development of the multi-flow process chart, to
present multiple documents and their relationships. In 1947, ASME adopted a
symbol set derived from Gilbreth's original work as the "ASME Standard:
Operation and Flow Process Charts."
Douglas Hartree in 1949 explained that Herman Goldstine and John von
Neumann had developed a flowchart (originally, diagram) to plan computer
programs. His contemporary account was endorsed by IBM engineers and by
Goldstine's personal recollections. The original programming flowcharts of
Goldstine and von Neumann can be found in their unpublished report, "Planning
and coding of problems for an electronic computing instrument, Part II, Volume
1" (1947), which is reproduced in von Neumann's collected works.
The flowchart became a popular tool for describing computer algorithms, but its
popularity decreased in the 1970s, when interactive computer terminals and
third-generation programming languages became common tools for computer
programming, since algorithms can be expressed more concisely as source code
in such languages. Often pseudo-code is used, which uses the common idioms of
such languages without strictly adhering to the details of a particular one.
Nowadays flowcharts are still used for describing computer algorithms. Modern
techniques such as UML activity diagram and Drakon-charts can be considered to
be extensions of the flowchart.
Advantages of Flowchart:
Flowcharts are better way of communicating the logic of system.
Flowcharts act as a guide for blueprint during program designed.
Flowcharts helps in debugging process.
With the help of flowcharts programs can be easily analyzed.
It provides better documentation.
Flowcharts serve as a good proper documentation.
Disadvantages of Flowchart:
It is difficult to draw flowchart for large and complex programs.
In this their is no standard to determine the amount of detail.
Difficult to reproduce the flowcharts.
It is very difficult to modify the Flowchart.
Example of flowchart and coding in different
programming languages:
This is a hospital flowchart example that shows how clinical cases shall be
processed. This flowchart uses decision shapes intensively in representing
alternative flows.
Figure 1.9 Flowchart of Medical Service
1. https://en.wikipedia.org/wiki/Flowchart#History
2. https://www.visual-paradigm.com/tutorials/flowchart-tutorial/
3. Marinar F. Castro, A. R. (n.d.). understanding Structured Programming
(Second Edition ed.). Quezon City, Philippines: Vibal Publishing, Inc.
4. https://faradars.org/wp-content/uploads/2015/07/Algorithm-and-Flow-
Chart.pdf