2 minute read
1.8 TYPES OF DESIGN TOOLS
1.8 TYPES OF DESIGN TOOLS
Design tools are the tools used to develop a program. Three types of design tools are algorithm, pseudocode and flowchart.
Advertisement
1.8.1 Algorithm
A specific set of instructions for carrying out a procedure or solving a problem. Usually with the requirement that the procedure terminate at some point. Specific algorithms sometimes also go by the name method, procedure, or technique. Step by step procedure designed to perform an operation, and which (like a map or flowchart) will lead to the sought result if followed correctly. Algorithms have a definite beginning and a definite end, and a finite number of steps.
Below is an example of an algorithm and based on the problem statement.
PROBLEM STATEMENT Writeanalgorithmtoaddtwonumbersenteredbyuser.
Step 1 : Start Step 2 : Declare variables NUM1, NUM2 and TOTAL Step 3 : Read values NUM1 and NUM2 Step 4 : Add num1 and num2and assign the result to sum TOTAL = NUM1 + NUM2 Step 5 : Display TOTAL Step 6 : Stop
“Algorithm is not the computer code. Algorithm are just the instructions which gives clear idea to write the computer code”
1.8.2 Pseudocode
Pseudo code is an abbreviated version of actual computer code. When the pseudo code is completed it can be easily translated into any computer language. Artificial and informal language Helps programmer to plan algorithm Not an actual programming language Each line of code represents a step/process. Below is the example of pseudocode.
Figure 1.11: Example of the Program using Pseudocode
PROBLEM STATEMENT The pseudo code below is to find the volume of a box if thelength,widthandheightaregiven.Writetheprogram basedonthepseudocodebelow.
START INPUT length of the box INPUT width of the box INPUT height of the box Volume = Length XWidth X Height DISPLAY volume of the box END
1.8.3 Flowchart
Graphic representation of algorithm is known as a flowchart which consists of geometric symbols. The symbols are connected by a line of arrows called flow lines. The shape of the symbol indicates the type of operation that is to occur. Flow from the top of the page to the bottom.
Figure 1.12: Flowchart Symbol and Function
PROBLEM STATEMENT
Create a flowchart to add 2 numbers together and then displaytheresult.
Step 1 - Describe the input, output information and formula
Input : 2 numbers Process : Sum = A + B Output : Result sum of two numbers
2. Step 2 - Develop logical sequence of steps to solve problem
Figure 1.13: Flowchart of Problem Statement