EducationColleges and Universities

How to create a flowchart. Block diagram of the program, array

A flowchart is a graphical representation of a process that clearly shows the systematic sequence of all stages of the task, as well as all the groups that are involved in the process. Such a scheme is a system of graphic symbols (blocks) and lines of transitions (arrows) between them. Each of these blocks corresponds to a certain step of the algorithm. Inside such a symbol, a description of this action is given.

What are the flowcharts for?

These systems are designed to perform the following functions:

- Develop a new process;

- describe and document the current algorithm;

- Develop modifications to this process or explore links with the likely occurrence of errors and failures;

- determine when, where and how to change the current algorithm, in order to test the stability of the entire system.

Workflow development

Any block diagram is built on the basis of an algorithm of actions describing the operation of the device or program. Therefore, the system itself is first constructed. "Algorithm" refers to the description of the sequence of operations to solve the task. In fact, these are the rules for executing the necessary information processing processes . Before you start to build the algorithm, you need to clearly define the task: what needs to be obtained as a result, what source information is needed, and what is already available, are there any restrictions for obtaining it. After this, a list of actions to be taken to obtain the desired result is compiled.

Types of algorithms

In practice, the following types of flowcharts are most often used:

- graphic, that is, in the basis of geometric symbols;

- verbal: compiled with the help of ordinary words of a language;

- pseudocodes: represent a semi-formalized description in a conditionally algorithmic language, which includes elements of the programming language and literary phrases, as well as generally accepted mathematical symbols;

- software: only programming languages are used for recording.

Block diagram of the device: description

A graphical representation of the sequence of actions includes an image of an algorithm describing the relationships of the functional blocks of this circuit, which correspond to the execution of one or more actions. The block diagram of the array consists of individual elements, the size and construction rules of which are determined by the state standard. For each type of action (data entry, calculation of expression values, checking conditions, control of repetition of actions, end of processing, etc.), a separate geometric figure is provided , represented as a block. These symbols are connected by lines that determine the sequence of actions.

Basic Elements Used in Drawing Up Flowcharts

The complete list of graphic symbols used to describe the algorithm consists of 42 elements. We will not give it all, but only the main one.

Elements of the flowchart:

1. A process means a computational action or a sequence of such actions, changing values, data layouts or presentation form. For the sake of clarity, such elements can be combined into one block. This symbol has the form of a rectangle, inside of which comments are written accompanying the operation (or group of operations).

2. The solution. This block is used to indicate the transition of control by a certain condition. In each such element, the question, comparison, or condition that defines it is indicated. In other words, the solution is the choice of direction for executing a program or algorithm, depending on a certain variable condition. The graphic appearance of this element is a rhombus. The symbol can be used as an image of the following unified structures: selection, fork, full and incomplete, "before" and "bye".

3. Modification. This block indicates the beginning of the cycle. It is used to organize a cyclic construction. Inside such an element write the parameter of the circle of actions, indicate its initial values, the boundary condition, and also the step of changing the parameter for the subsequent repetition. In other words, a modification is the execution of changing commands or their groups, operations that modify the program. The graphic representation of this symbol is a hexagon.

4. A predefined process means computing by a given or standard program. It is used to indicate the reference to an auxiliary algorithm, which exists autonomously in the form of separate independent modules, as well as for accessing library subroutines. Graphically, this symbol is represented by a rectangle with two vertical margins at the edges. This element serves for instructions of calls to functions, procedures, program modules.

5. Input / output of data in general form.

6. Start and stop. This element means the beginning and end of the algorithm, as well as entering and exiting the program. Graphically, this symbol resembles a rectangle with arcs instead of lateral lines.

7. Document means the output of the print job. Graphically, such an element resembles a rectangle, but instead of the bottom line a half-wave is inscribed.

8. Manual input means the start of data in the processing by the operator using a device that is connected to a computer (keyboard). The graphic symbol for manual input is a quadrilateral whose side lines are parallel, the bottom line is perpendicular to them, and the upper oblique line.

9. Display means input or output of information in case the device is directly connected to the processor. At the moment when data starts to be played back, the operator can make changes during their processing. Graphically this element represents a figure whose lower and upper lines are parallel, the right one is an arc, and the left one consists of two straight lines in the form of an arrow.

10. Flow lines are arrows that indicate the sequence of connections. No block diagram of the structure can do without this element. There are certain rules for drawing these symbols. We list them:

- these elements must be parallel to the lines of the outer perimeter or the boundaries of the page on which this block diagram is depicted;

- the direction of the line from top to bottom or from left to right is considered to be the main one, it is not indicated by arrows, other cases of indicating directions are indicated by them;

- the direction of this element is changed only at an angle of 90 °.

11. Connector. This element is intended to indicate communication on interrupted flow lines. These symbols are used in the event that the block diagram of the program is built from several parts. Then the flow line from one part must end with a "connector", and the new part begins with this symbol. Inside such an element is put the same sequence number. The graphic image of the "connector" is a circle.

12. Interstitial connector. The purpose of this element is similar to the previous one, only it is used to connect flow charts placed on different pages. The image of such an element is represented by a pentagon in the form of a house.

13. A comment is a link between various elements of a flowchart with explanations. This element allows you to include formulas and other information.

Building Flowcharts

The graphical construction of the algorithm is part of the documentation for the device or program, which is always available in abundance. However, in most cases, the software does not need a block diagram at all. Only units require the construction of an algorithm that occupies several sheets, the rest is quite a symbolic scheme. A simple block diagram shows the branching structure of programs in only one aspect. However, even such a structure is clearly visible only if the algorithm is placed on one sheet. In the opposite case, when the block diagram is located on several pages that are interconnected by crossings, it is very difficult to get a true representation about it. If it is placed on one sheet, then for a large program this image of the algorithm turns into its general plan with a list of main blocks and stages. Of course, such a schedule does not follow the standards for constructing schemes, but it does not need them, since this process is completely individual. Rules relating to the type of symbols, arrows and numbering order are necessary only for parsing detailed flowcharts.

Arrays and algorithms

An array is a collection of the same type of information that is stored in consecutive memory clusters and has a common name. Such cells are called "system elements". All clusters are numbered in order. This number is called the "array element index". How to draw up a flowchart for such a system? Consider an example of creating an algorithm for an elementary array of one - dimensional type. The simplest system has the form of a string. Set the name for this array - "A". We will assume that our system consists of eight cells (from 1 to 8). Each of these clusters contains a random number, which is called an "array element". To address a particular cell, you must specify the name in square brackets ([3]). Let's consider an example in which the block diagram of the array is intended to fill the system with random numbers and then display the information on the screen. What is such an algorithm? This is an elementary system. In fact, it has no practical application, but it is convenient for the learning process. The considered block diagram (the construction example is described below) contains only seven basic elements connected by the transition lines.

Description of the task sequence

1. The first element of the scheme is the symbol "Beginning".

2. The second block is the "Process", inside of which we enter "random initialization".

3. The next element is "Modification", in the block we enter the value of the cells of the array.

4. Further, according to the given function, there is a redirection to the next block of the "process", which specifies access to specific clusters of the system, specifying the limitation of random numbers in the range from zero to one hundred. After this operation, a return to the third block, and through it - further to the fifth.

5. In this "Modifications" block, according to the inscribed function, the next element is redirected.

6. "Output" displays information about the new contents of the array on the monitor with the subsequent direction to the previous block. Next - on the last element.

7. "End" of the algorithm.

On the basis of such a block diagram, a program is created that will ensure the work of the presented algorithm.

"Block diagram editor"

If you are wondering how to create a flowchart, then know that there are special programs that are designed to create, and also edit such systems. The convenience of the graphical display of the algorithm is that the user is not tied to the syntax of a particular programming language. The constructed block diagram is equally suitable for all languages (for example, C, Pascal, BASIC and others). In addition, the editor can be used to build diagrams and test the operation of circuits. Such a program is a specialized software. It provides a diverse set of tools needed to build flowcharts, which makes it more convenient than conventional graphics editors. Additional options allow to optimize the process of compiling the system with its further transformation into functions and procedures of the programming language. In addition, the flowchart editor offers a set of templates that can significantly speed up the work of a novice user. After all, it is known that when constructing an algorithm, repeated structures are often used, for example, various variants of cycles, alternatives (complete and incomplete), multiple branchings, and so on. The editor allows you to select frequently used elements in the flowcharts and add them to the schema being created. This avoids drawing them each time anew. In addition, with the help of the editor, you can import functions and procedures implemented in any known programming language. This option is useful for parsing the structure of the algorithm, which is written in an unfamiliar language. The system requirements of this program are rather modest, which allows using it on any personal computer.

Conclusion

Summing up, it's worth noting that detailed algorithms have already become obsolete. As a description of the process, they are of no interest to anyone. At best, flowcharts are suitable for training beginners who do not know how to think algorithmically. The elements proposed at the time with their content were a high-level language, they united the operators of the machine language into separate groups. At the moment, each graphic element corresponds to a specific operator. Hence, the character itself turned into an accidental, and most importantly - a useless drawing lesson, which can easily be abandoned. Today, even the transition lines have become redundant, since each operator is already defined. In fact, the graphic construction of algorithms is more extolled than it is used in practice. A programmer with extensive experience before writing a program rarely draws a flowchart. When the organization's standard requires a graphic algorithm, then draw it after the end of the work.

Similar articles

 

 

 

 

Trending Now

 

 

 

 

Newest

Copyright © 2018 en.unansea.com. Theme powered by WordPress.