In this term paper we will discuss about:- 1. Meaning of and Symbols Used in Program Flow Chart 2. Rules 3. Advantages and Disadvantages 4. Examples.

Term Paper # 1. Meaning of and Symbols Used in Program Flow Chart:

A program flow-chart is a graphical representation of the various logical sequence of operations performed on input data to produce output information. Using standard symbols, a program flow-chart shows the flow of processing operations, required to be carried out to solve a programming problem. These standard symbols, approved by ANSI [American National Standard Institute], are used all over the world to convey the same meaning.

Symbols Used in Program Flow Chart:

Some of the important symbols used are:

ADVERTISEMENTS:

1. A Parallelogram for Input/output operations.

Parallelogram

2. A Rectangle with double lines for different predefined Processing Operations or Sub-Routines [small specific programs].

Rectangle

3. An Oval to represent Start / End of the flow.

Oval

In each case, simple narrations within the symbols indicate what is done at that stage — a symbol stands for a particular stage of operation. A line is used with an arrow-head, connecting two symbols, to show the flow of processing. It is taken for granted that the program flows from top to bottom of the paper or, if so writ­ten, from left to right.

Arrow

Using these three symbols, as shown above, a program flow-chart can be prepared showing the broad processing sequences only — this being called a Macro-level or High Level Flow Chart. The purpose of this type of chart is to prepare the outline of the program, without being bogged down by details.

ADVERTISEMENTS:

An example would make this clear:

Suppose, we have to write a program to find the roots of the quadratic equation: ax2 + bx + c = 0.

As you all know from school days, the roots ×1 and ×2 are given by:

where a, b, and c are the coefficients.

ADVERTISEMENTS:

The pseudo-code could be:

Pseudo-Code

The corresponding program flow-chart, which is at macro-level, will be as in the diagram below:

Macro-Level Flow Chart

Once the macro-level chart is drawn, we can go in for the micro-level chart, which shows the detailed sequence of processing as will be actually required to solve the problem. Naturally, additional symbols are required, as invariably some decision making based on conditions would be required.

These symbols are:

1. A Diamond indicates a case of Decision Making, fulfilment of condition deciding the next sequence of operation. There are two outlets for Yes and No.

Diamond

2. A Rectangle indicating codable processing operation.

Reactangle

3. A Circle indicates a connector, when the chart goes beyond the space of a page.

Circle

There are many other symbols for use in System Flow Chart, we now being involved with Program Flow Chart, these are sufficient.

Let us now modify the previous pseudo-code to find the roots of the quadratic equation at micro-level. Basically, the Step 2 of the previous pseudo-code will be enlarged.

Thus we have:

The micro-level program flow-chart will be:

Micro-Level Flow Chart

Term Paper # 2. Rules of Program Flow Chart:

To prepare a program flow-chart, the following rules must be followed:

1. There must be a definite Start/Begin and End positions, given by the appropriate symbols.

2. There will be a symbol for each operation — input, output, and processing [computations]; the details depending on the sequence.

3. When a decision is to be made, there must be two paths from it, taking care of both fulfilment and non-fulfilment of the condition stated.

4. There will be one decision symbol for each condition — the conditions cannot be combined.

5. A line, indicating the processing path, must start at a symbol and end at another symbol — it cannot be left dangling with a lose end.

6. Unless otherwise stated, vertical lines represent flow of processing from top to bottom of the page and horizontal line represents flow from left to right of the paper.

7. Where necessary, for shortage of space, a line may be broken by using connectors with proper matching notation, such as “1” in one page and in the next page.

Term Paper # 3. Advantages and Disadvantages of Program Flow Chart:

1. A program flow-chart clearly gives a visual display of the processing steps required to find a solution of a programming problem.

2. It forces a programmer to think logically and then draw a plan of execu­tion on paper, without wasting valuable computer time and missing vital steps. Allows you to check the logical reasoning and evaluate the alternatives.

3. It clarifies what input data would be required and the how the output will be presented.

4. Since the program flow-chart is gradually built in steps, the scope for taking care of all the possibilities exist.

5. Using real-life data, a programmer can theoretically trace the steps leading to the solution and to check whether the algorithm used result in correct solution.

However, preparing program flow-chart for large complex problems is quite difficult and may result in confusion. Sometimes, it becomes difficult to convert a program flow-chart to appropriate program codes. Program flow-chart paths become too complicated when the number of conditions involved in data processing becomes larger in number.

Term Paper # 4. Examples on Program Flow Chart:

Example 1:

Let us draw the Program Flow Chart for the Euclid’s Algorithm  to find out the highest common factor.

Program Flow Chart for the Euclid's Algorithm

Example 2:

To draw a PFC for Grading of Students.

PFC for Grading of Students

Home››Term Paper››Flow Chart››