next up previous
Next: Programming paradigms Up: Unit 01 Previous: Class diagram

Realization of operations: algorithms

Usually, we realize an operation when we need to solve a specific problem.

Example: given a person name, find the corresponding telephone number in a telephone registry.

To delegate to a computer the solution of a problem, it is necessary to find an algorithm that solves the problem.

Algorithm: procedure through which we obtain the solution of a problem. In other words, a sequence of statements that, when executed one after the other, allow one to calculate the solution of the problem starting from the information provided as input.

An algorithm is characterized by:

Example of an algorithm: scan the person names, one after the other as they appear in the registry, until you have found the requested one; return the associated telephone number.

Are there other algorithms to solve the same problem? Yes!

Once we have found/developed an algorithm, we have to code it in the selected programming language.


next up previous
Next: Programming paradigms Up: Unit 01 Previous: Class diagram