Some of the commonly used tools in programming are:
- Algorithm
- pseudo code
- Flowchart
Algorithm
An algorithm is the finite set of step-by-step set of statements that solve a particular problem. Once the problem is clearly stated, it is broken down into a number of steps, which are written sequentially, such a sequential procedure to solve a problem is called an algorithm. It is written in simple human readable English language. Developing an algorithm requires a clear understanding of the problem. After preparing the algorithm, one must recheck it so as to ascertain the accuracy of the various steps involved. The number of steps in an algorithm should be reduced to a minimum so as to increase the speed of the program.
An algorithm should have the following properties.
- It should have an input.
- The steps mentioned in an algorithm can be executable by the computer.
- Each and every instruction should be in a simple language.
- The number of steps should be finite.
- It should not depend on a particular computer language or computer.
- The algorithm should give an output after executing the finite numbers of steps.
Example 1: Design an algorithm to go to the cinema and watch a movie.
Step 1: START.
Step 2: Go to the cinema hall.
Step 3: Is the ticket counter open? If it is not open, go to step 5 else go to step 3.
Step 4: Get into the cinema hall.
Step 5: Watch the movie.
Step 6: END.
Example 2: Find the sum of the two numbers.
Step 1: START.
Step 2: Read the two numbers A and B.
Step 3: Add the number A and B and store in D. or D=A+B₁
Step 4: Display D or print D.
Step 5: STOP.
Flow chart
flow chart is a diagrammatic (pictorial) representation that illustrates the sequence of operations to be performed. After designing an algorithm, the next stage is to design a flowchart to check the flow of logic running through it. It used different predefined graphical symbols to show the data flow within a program or a system. Designers use a flowchart as a program planning tool for visually organizing a sequence of steps necessary to solve a problem.
Advantages of Flowchart
- It is easier for a programmer to explain the logic of a program through the flowchart.
- It helps in the effective analysis of the program.
- Easy to detect, locate, and remove bugs in a program.
- Efficient means of communication.
- With the help of a flowchart, coding becomes effective and faster.
- Serve as documentation.
Disadvantages of Flowchart
- Very time-consuming and laborious job.
- Flowcharts are difficult to maintain.
- Occupies space while documentation.
- Translation of the flowchart to a computer program is difficult.
Type of Flowchart
System Flowchart
Program Flowchat
Pseudo Code
Author Spotlight
Santosh ChapagainGmail: chapagainsantoshcs@gmail.com
Phone no: +977-9863512955
0 Comments