This post is also available in:
English
The Structured Control Theorem is a basic part of programming that you must learn to become a programmer. Structured Control Theorem is a concept of structured programming. The control structure is a program flow structure that is often used by programmers. There are three types of control structures that we will discuss this time, including:
- Sequence
- Selection
- Repetitation
Sequance
Sequence is an instruction that is executed sequentially according to the instruction flow. This diagram is divided into two dimensions, namely vertical and horizontal which shows the objects. This diagram is divided into two dimensions, namely vertical and horizontal which shows the objects.
The purpose of the sequence diagram is to determine the sequence of events to produce the desired output. As well as describe the workflow of an activity and describe the flow of data in more detail.
Sequence has several components that are often used.
- Actor
The chord component serves to describe the user as a user who is outside the system who interacts with the system.
- Lifeline
The lifeline component serves to describe the shape of the dotted line. This component has a box that has objects to describe the object’s activities.
- Activation box
Activation box component serves to represent the time it takes the object to complete the object.
- Object
The object component serves to describe having a box shape that contains the object name with an underline.
- Message
The message component serves to describe communication between objects.
A basic example of a sequence diagram flow:

Instructions executed on the flow will be sorted from top to bottom according to the instructions.
Example of a sequence diagram on an ATM machine.

Selection
Selection is an instruction flow where an instruction will be executed after certain conditions are met.
There are two selection models:
- if – else
- case
If-else & Case
Is a model to create a branching condition when processing a data, it will be checked first before the next data execution.
In the world of programming, it can be called branching, often made to condition the input and output processes. Branching in the programming world means a decision-making process.
An example of an if-else is as follows:
if (kondisi) {
….
}
else {
….
An example of this case is as follows;
switch (var) {
case nilai1: ….;
break;
default : ….;
}
Here is the diagram format.

Repetation
Repetition is a flow of instructions that function to be done repeatedly until the condition is reached.
In programming this can be done by looping. Loops can function to run code repeatedly with a certain number of up to a predetermined number.
We can use two repetition models, namely:
- for
- while
for repeat
We can use this collection as a repetition at the beginning of the format. Before you use repetition you must first determine how many times this repetition will occur.
Example using for:
for (initialValue; valueFinalLimit; multiplication) {
….
}
let text = "";
for (x=0; x<3; x++) {
text += "The number is " + i +;
}
output:
The number is 0
The number is 1
The number is 2
The number is 3
The number is 4
Example diagram for:

Those are some Structured Controls that we can learn for a basic understanding of programming.
Thanks.