Note on Program Design tools

  • Note
  • Things to remember

INTRODUCTION

Also known as the Programming tools, Program Design tools are the tools used to develop a program. During designing a program, different tools are required to solve several problems. Some of the frequently used tools are:


1. Decision table:

A decision table allows an analyst to identify the exact course of action for given condition. A decision table provides unambiguous (clear) decisions leading to a good program design. A decision table generally consists of two parts: Conditions and Actions.

Decision table
Fig. Decision table

Source: academia.wikia.com

A decision table is preferred when one of the large numbers of actions is to be selected depends on upon a large number of conditions.


2. Decision tree:

Decision tree also does more or less same job as decision table, except that it allows the tree structure and each node of tree denote conditions. A decision tree is more user-friendly because it provides a graphical hierarchical diagrammatic view of the conditions and actions.

g

Fig. Decision tree

Source: www.doc.ic.ac.uk


3. Structured English (Pseudo code):

The general meaning of Pseudo code is false code or fake code. Before we write a real program, we write a program that looks like a code on the basis of algorithm and flowchart, which may not be syntactically correct but looks like a program code is called Pseudo code.The instruction of pseudo code is written by using English phrase and mathematical expression. It has no hard or fast rules for writing instruction but the instruction is closer to high-level language instructions. Therefore, the pseudo code designers should have basic knowledge about high-level language before writing it. It is independent of any programming language.


Example: Pseudo code for calculating area of rectangle

Input length, breadth

Calculate area= length*breadth

Output area


4. Algorithm:

An algorithm is a sequence of instructions or step by step instruction to find the solution of a problem. An algorithm should be simple and clear. It must be to the point and should lead to the solution of the problem in a finite number of steps.

In other words, the set of rules that define how a particular problem can be solved in a finite number of steps is known as an algorithm. An algorithm is composed of a finite set of steps, each of which may require one or more operations. Each operation must be definite, effective and finite

A program is the expression of an algorithm in a programming language. Thus, the success of a program depends on upon the algorithm. Therefore, the logic of the problem must be clearly expressed in an algorithm. In another way, we can say that an algorithm is a collection of a finite number of instructions arranged in a sequence to find the solution of a problem.

Example 1: Algorithm for adding the two numbers.

Step1: Start the program
Step2: Input number x,y
Step3: Read x, y
Step4: Z←x+y
Step5: Print Z
Step6: Stop the program

Example 2: An algorithm to go to the cinema and see a movie.

Step1: Start the program
Step2: Go to the cinema hall
Step3: Is the ticket counter open?
Step4: If it is not open, return home
Step5: If it is open, buy a ticket
Step6: Get into the cinema hall
Step7: Watch the movie
Step8: Return home
Step9: End the program


5. Flowchart:

A flowchart is a pictorial representation of an algorithm. We can also define it as a program planning tool for organizing a sequence of steps necessary to solve a problem, which is shown in terms of symbols.

Flowchart uses symbols that have geometrical shapes to indicate the different operations. These symbols are connected by flow lines which indicate the order of execution of the various activities. It is used by the programmers to develop programs and by system, designers to represent the overall system while analyzing and developing the system.

Example:

fig. flowchart
fig. flowchart


The advantages of flowchart are:

  • It is an independent language. So, the flowchart we design for programming in one language is applicable for programming in another language.
  • Once the flowchart is prepared, it is very easy to do the coding by looking at thealgorithm.
  • It is very easy to understand the logic of program by designing the flowchart. Even people who don’t know the coding can understand the logic of a program with the help of flowchart.
  • Systematic debugging and testing is easily possible with the help of flowchart.
  • It provides good documentation for an organization.
  • It is useful in debugging the program.
  • It provides valuable information which cannot be expressed by thousands of words.
  • It is user-friendly and can be more easily understood.
  • It expresses the clear logic of a given procedure.
  • It is unambiguous as there can be only one direction of logic at any one time.
  • It is used as working models in the design of new programs and systems.


The disadvantages of flowchart are:

  • Preparing a flowchart is a time-consuming process.
  • If there is a change in logic again, we have to develop the new flowchart.
  • Flowchart does not provide any convenient means to highlight the most important operation.
  • The flowchart is quite costly to produce and difficult to use and manage.
  • Complex and detailed charts can be laborious to plan and draw.
  • The translation of flowchart into computer programs is not easy.
  • Preparation of flowchart is a very slow process.
  • Most software developers believe that flowcharts are a waste of time and that these slow down the process of software development. So, they do not start the software development with flowcharts. Flowcharts are only used for the purpose of documentation.


Symbols for flowcharts:

s

Fig. Basic symbol for flowchart

Source: jmkeller66.wordpress.com


TYPESOF FLOWCHART

  • System flowchart

A flowchart that gives information about a system is called system flowchart. The system can be data processing system, production system, reservation system, inventory system, accounting system and evaluation system. It plays a very important role in analysis and designing of the new system.

In system flowchart, the information flows from one section of the organizational unit to another section or forms one processing machine to another. It is drawn by the system designer while developing the new system. It does not focus on the process to solve a particular problem. An information processing cycle can be illustrated below:
Example:

cbse-notes.blogspot.com
cbse-notes.blogspot.com


In other words, a system flowchart describes the data flow and operations for a data processing system. It shows how the data processing is to be accomplished.

  • Program flowchart:

Program flowchart describes the sequence of operations and decisions for a particular program. In other words, we can say that a diagrammatical or pictorial sequence of instructions used by a programmer to solve any problem is called Program Flowchart.

Program flowchart is a flowchart which is used by the programmer to solve a problem. It is the detailed program which is shown in the form of pictures that how program processing steps will be performed within the computer to convert input data into the desired output.
Example:

Flowchart for sum of two number
Fig. Flowchart for sum of two number

Source: forum.codecall.net

Differences between System flowchart and Program flowchart:

System flowchart

Program flowchart

It is designed by system designers.

It is designed by programmers.

It shows a system’s flow of data.

It shows a program’s flow of instructions.

It gives a broad overview of the overall system.

It gives a specific view of a control flow of a program.

It is used to design large sized real world problems.

It is used to design small sized logical & mathematical problems.

Since there are limited symbols, it is easy to understand for normal people also.

One must have good knowledge of various existing symbols to understand the system flowchart.

(Bhusal, Khanal, & Manandhar, 2013)



Bibliography

Bhusal, R., Khanal, R., & Manandhar, S. (2013). Computer Essentials I. Putalisadak, Kathmandu: Asmita's Publication.

Program Design Tools:

  • Decision table, Decision tree and Structured English (Pseudo code).
  • Algorithm.
  • Flowchart; System flowchart and Program flowchart.
  • Differences between System flowchart and Program flowchart.
  • Advantages and Disadvantages of flowchart.
  • Symbols for flowchart.
.

Very Short Questions

0%

DISCUSSIONS ABOUT THIS NOTE

You must login to reply

Forum Time Replies Report
sam chimouriya

Algorithm to prepare a tea


You must login to reply