Algorithms in Computer Programming: Definition, Characteristics, and Flowcharts, Summaries of Java Programming

explaining of algorithm and some examples of it

Typology: Summaries

2021/2022

Uploaded on 10/03/2022

ahmad-yacine
ahmad-yacine 🇦🇪

2 documents

1 / 4

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
LO1: Define basic algorithms to carry out an operation and outline the process of
programming an application
Definition of Algorithm
- An algorithm is a step-by-step description to solve a problem.
- An algorithm is a step by step method of solving a problem. It is commonly used for data
processing, calculation and other related computer and mathematical operations.
- An algorithm is also used to manipulate data in various ways, such as inserting a new data
item, searching for a particular item or sorting an item.
2. Example of an algorithm
pf3
pf4

Partial preview of the text

Download Algorithms in Computer Programming: Definition, Characteristics, and Flowcharts and more Summaries Java Programming in PDF only on Docsity!

LO1: Define basic algorithms to carry out an operation and outline the process of programming an application

Definition of Algorithm

  • An algorithm is a step-by-step description to solve a problem.
  • An algorithm is a step by step method of solving a problem. It is commonly used for data processing, calculation and other related computer and mathematical operations.
  • An algorithm is also used to manipulate data in various ways, such as inserting a new data item, searching for a particular item or sorting an item.

2. Example of an algorithm

What is an Algorithm?

A set of rules is a series of instructions that we follow step by step to help us solve a problem. A simple way to remember a set of rules is using a recipe; we use this example to put together the cake and wish to follow a certain set of commands to solve our problem. Algorithms are used by all automated devices to carry out functions. They work by accepting input and executing all of the commands/steps in the set of rules to get an output. In computer programming, algorithms are often formed as functions. These functions serve as small programs that can be referenced by a larger program. In many cases, there are several ways to perform a specific operation within a software program. In general term, an algorithm is defined as a set of instructions designed to perform a specific task. Algorithms work via input and output. They take the input and apply each step of the algorithm to that information to produce an output. Characteristics of a good algorithm are,  Input and output should be defined accurately.  Each step in the algorithm should be clear and unmistakable.  Algorithms should be most effective among many different ways to solve a problem.  An algorithm shouldn't contain computer code. Instead, the algorithm should be written in such a way that it can be used in different programming languages.

Benefits of algorithm:

Algorithm is a step-wise representation of salutation of problem, which make us familiar with the problem and decreases its complexity. It makes the task easier to decide on a specific step. It is easier to start the program with the help of algorithm and also increases the flexibility of program. Algorithm development process allows and even delivers a rational study of the solution.

Limitations of algorithm:

Algorithm is not a program, but the concept of what the software should be. Lengthy development process is time expending and difficult to write. It is difficult to identify each process and program information.

Symbol Name Function Process Indicates any type of internal operation inside of the processor. Input/output Used for any input/output (I/O) operation. Decision Used to ask a question that can be answered in a binary format. Connector Allows the flowchart to be drawn without intersecting lines or without a reverse flow. Predefined process Used to invoke a subroutine or an interrupt program. Terminal Indicates the start or ending of program, process or interrupt program. Flow lines Indicates the direction of flow of program. Example of flowchart: Flowchart to display sum of two numbers.