Computer for SEE and NEB

It is a complete SEE and NEB solution for computer science. It includes Computer Fundamentals, Database (SQL), Programming in C QBASIC, CSS, JavaScript, and PHP for beginners.

Breaking

Post Top Ad

Your Ad Spot

Friday, March 18, 2022

Program Design Tools Algorithm Flowchart and Pseudo code

 

Program Design Tools
Algorithm Flowchart and Pseudo code

 

Program Design Tools Algorithm Flowchart and Pseudo code


Introduction

Program design is the process of creating a plan or a set of instructions for a computer program that will enable it to solve a particular problem. This process involves a number of tools that are used to help developers organize their thoughts and ideas, and to make the process of writing code more efficient. In this article, we will discuss three of the most commonly used program design tools algorithms, flowcharts, and pseudocode.


Following are the different tools that are used to plan the problems.

  • Algorithm
  • Pseudo Code
  • Flowchart


Algorithm

An algorithm is a step-by-step procedure that can be followed to solve a problem. In the context of programming, an algorithm is a set of instructions that a computer can follow to perform a specific task. When designing an algorithm, developers must consider the input, the processing steps, and the output. Algorithms can be expressed in a variety of ways, including natural language, mathematical notation, and computer code.

Following are the characteristic of good algorithm.
  • An algorithm must be simple and in easy language.
  • An algorithm should have finite number of steps.
  • The algorithm can be easily modified.
  • The algorithm should be able to produce accurate result.

Example 1:

Write an algorithm to switch on the computer system.

STEP – 1 Start
STEP – 2 Put the main switch on
STEP – 3 Switch on the UPS.
STEP – 4 Switch on the CPU button.
STEP – 5 Switch on the Monitor button
STEP – 6 End

Example 2:

Write an algorithm to input any two numbers and display the average of given two numbers.

STEP-1: Start

STEP-2: Input first no. (a)

STEP-3: Input second no (b)

STEP-4: Calculate average (a+b)/2

STEP-5: Print average

STEP-6: End


Pseudo Code:

Pseudo code is a high-level description of a computer program that uses plain language rather than programming syntax. Pseudocode is used to describe the steps involved in a program's execution without getting bogged down in the details of the programming language. This makes it easier to understand the program's logic and to identify potential problems. Pseudocode is often used as an intermediate step between the initial design of a program and its implementation in a specific programming language.


Example:

Write a Pseudo code to read two numbers and display their sum.
Prompt the user to enter the first number.
Prompt the user to enter a second number.
Calculate the sum of the two input numbers.
Display an output prompt that explains the answer the sum.
Display the result.


Flowchart

A flowchart is a diagram that represents a process or a system. In the context of programming, flowcharts are used to represent the steps involved in a program's execution. Flowcharts are useful because they provide a visual representation of the program's logic, which can be helpful when trying to identify errors or improve the program's efficiency. Flowcharts use a set of symbols to represent different types of operations, such as input/output, decision points, and processing steps.

There are two types of flowchart:

a) System Flowchart:

A system flowchart is a diagram that gives an overview of the processing in the complete system.

b) Program Flowchart:

A program flowchart is used by the computer programmers to show the sequence of instructions in a single program or subroutine.

Rules for constructing flowcharts.
  • First plan the logic and then incorporate the details.
  • It should be started on the top of the page and flow down and to the right.
  • Only standard flowcharting symbols should be used.
  • Flowchart should be clear, neat and easy to understand.
  • There should be start and stop to the flowchart.
  • There should be a list of activities inside each symbol.
  • The connectors joining the different pages must be adequately referenced when drawing a chart than one sheet of paper.
Example:

Draw the flowchart to calculate the average of two numbers.



Choosing the right tool

When designing a program, it's important to choose the right tool for the job. Algorithms are useful for breaking down complex problems into manageable steps, while flowcharts are useful for visualizing the program's logic. Pseudocode can be useful for describing a program's logic in plain language before it is implemented in code. It's also important to remember that these tools are not mutually exclusive; they can be used together to provide a more complete picture of the program's design.




Conclusion

Program design is a crucial step in the development of any computer program. The use of tools such as algorithms, flowcharts, and pseudocode can help developers to organize their thoughts and ideas, and to design programs that are efficient, reliable, and easy to maintain. By choosing the right tool for the job, developers can create programs that meet the needs of their users and that solve complex problems in an elegant and efficient way.


You can also Read:





No comments:

Post a Comment

Post Top Ad

Your Ad Spot

Pages