Module 1
Module 1
INSTRUCTIONAL MATERIAL
General Overview
This Instructional Material gives a basic knowledge on structured programming which focuses
specifically on COBOL Programming language. COBOL stands for Common Business Oriented
Language. It is a high-level programming language design specifically for business applications.
COBOL is primarily used in business, finance, and administrative systems for companies and
governments.
General Objectives
“Everybody in this country should learn how to program a computer… because it teaches you how
to think” – Steve Jobs
Watch:
You can watch these Youtube link for more information about COBOL Programming Language:
https://www.youtube.com/watch?v=ZOLB4KqHmBs
https://www.youtube.com/watch?v=TBs7HXI76yU
https://www.youtube.com/watch?v=AT0Qtl2Ub2c
Read:
For your course guide, read the Programming 3 Course Syllabus and the Instructional Materials.
Activities/ Assessments:
Make sure that you read and understand the each module to answer the assessment activity at the
end of each module.
Module 1
Overview:
A flowchart is a formalized graphic representation of a logic sequence, work or
manufacturing process, organization chart, or similar formalized structure. The purpose of a flow
chart is to provide people with a common language or reference point when dealing with a project
or process.
Module Objectives:
After successful Completion of this module, you should be able to:
● Discuss the basic and advanced techniques of constructing process, data and business
process modeling flowchart
1. Process flowchart (PFD) is a diagram that illustrates and analyzes the overall flow of
activities in producing a product or service, which is always used in process engineering
and chemical industry where the depiction of the relationship between major components
needed. This type of flowchart can be used for:
2. Data Flowchart (DFD), one of the main tools for structural analysis, shows the way data is
processed. We can use the data flowchart for:
● Data management
● Modeling process aspects
● An overview of the system
● Visualization of data processing
● Where the data will come from and go to
Name
Flowchart Symbol
Usage
Process
indicates a set of steps that combine to create a sub-process that is defined elsewhere, often on
another page of the same drawing.
Decision
indicates a point where the outcome of a decision dictates the next step. There can be multiple
outcomes, but often there are just two - yes and no.
Start points
Terminal points
Data shape
indicates that information is coming into the process from outside, or leaving the process.
Delay shape
represents a waiting period where no activity is done. In Process Mapping, delays are often
important as they may result in adding to the cost of the product or simply delaying its
production.
Database shape
Use this shape for a step that results in information being stored.
Step
represents a single step within a process, and usually contains the name of a specific action.
Page symbols
refer to individual web pages, which may or may not contain multiple elements.
File symbols
represent those data elements that exist independently of navigational properties outside of that
page, e.g., audio sounds, movie clips, or a portable document file (PDF).
Decision point
indicates a sequence in the process at which the end user chooses an option, i.e., a "yes-no", or
"true-false" response, and then branches to different parts of the flowchart.
diagram the logical progression through the course, subject to the choices made at decision or
action points within the process.
Input/action symbol
represents a user response that directs the course flow from that point onwards, i.e., an online
test or questionnaire form.
Conditional selector
is similar to the conditional branch except that the user has the option to choose from a number
of paths that will fulfill the requested conditions, e.g., the results of a search engine request.
Annotations
provide helpful comments or explanations, e.g. denoting the location where an undeveloped new
page/process will fit into the navigational flow structure, or notes for specific team members for
further development.
are symbols for reusable sequences, such as logging in with a specific user id and password to
enter the course or to initiate an on-line quiz. The flow reference symbol acts as a placeholder for
the flow area sequence in the chart in every situation in which it is repeated. Flow area is used as
a flow area. It documents sections that share similar components/repeated steps within that flow,
and requires the use of the following two symbols: entry and exit points.
Exit point
concludes the subroutines, such as when the proper user id and password are verified, and
documents where the user re-enters the master flowchart.
Entry point
documents the place within the master flowchart where the process deviates into a subroutine.
Reference
is used as a connecting point when the flowchart necessitates using more than one page, or refers
to a complicated subroutine that would be impossible to contain on the main flowchart page.
On-page reference
indicates that the next or previous step is somewhere else on the flowchart. It is particularly
useful for large flowcharts.
Off-page reference
use a set of hyperlinks between two pages of a flowchart or between a sub-process shape and a
separate flowchart page that shows the steps in that sub-process.
Flowchart Shapes
The designers can click this multi-shape to set to any of the following shapes: Data, Document,
Decision, or Process. Any text you type onto the shape, or information you add to its Shape Data,
remains with the shape.
Document
Algorithms and flowcharts are two different ways of presenting the process of solving a problem.
Algorithms consist of a set of steps for solving a particular problem, while in flowcharts, those
steps are usually displayed in shapes and process boxes with arrows. So flowcharts can be used for
presenting algorithms.
Flowcharts are diagrams that visually present the process of solving problems. The steps of
creating algorithms flowcharts are described below.
Rules of Drawing Flowcharts for Algorithms
There are some basic shapes and boxes included in flowcharts that are used in the structure
of explaining steps of algorithms. Knowing how to use them while drawing flowcharts is crucial.
Here are some rules that should be known:
1. All boxes of flowcharts are connected with arrows to show the logical connection between
them,
2. Flowcharts will flow from top to bottom,
3. All flowcharts start with a Start Box and end with a Terminal Box
These examples will help you get a better understanding of flowchart techniques.
Example 1: Calculate the Interest of a Bank Deposit
Algorithm:
Flowchart:
Flowchart:
Structure You can make your flowcharts easier to understand and less subject to errors by
s using only a fixed set of structures. These structures include:
● Sequence
● Decision
● Loop
● Case
Whether you are flowcharting software programs or business processes, using only
these structures will make it easier to find and correct errors in your charts.
Each structure has a simple flow of control with one input and one output. These
structures can then be nested within each other. Any chart can be drawn using
only these structures. You do not have to use GOTO or draw spaghetti diagrams
just because you are drawing a flowchart. You can draw structured flowcharts.
The flowchart above demonstrates a sequence of steps. The reader would start at the Start shape
and follow the arrows from one rectangle to the other, finishing at the End shape. A sequence is
the simplest flowcharting construction. You do each step in order.
Decision
This structure is called a decision, "If Then.. Else" or a conditional. A question is asked in the
decision shape. Depending on the answer the control follows either of two paths. In the chart
above, if the temperature is going to be less than freezing (32 degrees Fahrenheit) the tomatoes
should be covered.
Loop
This structure allows you to repeat a task over and over. The red chart above on the left does the
task and repeats doing the task until the condition is false. It always does the task at least once.
The green chart on the right checks the condition first and continues doing the task while the
condition is true. In the green chart the task may not be done at all. You can also have the
conditions reversed and your loop is still a structured design loop.
The above chart is a "For Loop." In this example the task is performed 10 times as X counts from 0
to 10. Depending on the condition, the task may not be performed at all.
There is also a "For Each" structure that is like the for loop, but has no counter. It will go through
each item of a collection and do the task. You don't have to know the length of the collection or
use a counter. It is essentially saying "do this for every item in the collection".
Case
The structure above is called the case structure or selection structure. The
decision works fine if you have only two outputs, but if there are several, then
using multiple decisions makes the chart too busy. Since the case structure can
be constructed using the decision structure, it is superfluous, but useful. The
case structure helps make a flowchart more readable and saves space on the
paper.
module names
Module names are composed of 2 to 4 words. The first word should be a verb; the last
word should be a noun; intermediate words should be adjectives which qualify the noun.
The first letter of the first word should be capitalized and (within pseudo-code) the words
should be joined with underscores.
e.g. Calculate_Net_Pay
reference to a module
module definition
A pseudo-code module has the same form as a complete program pseudo-coded algorithm,
except that the terminator used for a sub-module is RETURN (instead of END).
Course Materials:
The edrawsoft.com and rff.com have free trial versionsand could be downloaded to be used in
the subject for flowchart creation. The following URL will help you to be more fluent in
flowcharting
https://www.edrawsoft.com/flowchart/three-types-of-flowchart.html
https://www.edrawsoft.com/flowchart-symbols.html
https://www.edrawsoft.com/algorithm-flowchart-examples.html
https://www.rff.com/structured_flowchart.php
http://elearning.algonquincollege.com/coursemat/pincka/dat2219d/lectures/27-Modules.htm#re
f01b