Discussion of article "Understanding MQL5 Object-Oriented Programming (OOP)"

 

New article Understanding MQL5 Object-Oriented Programming (OOP) has been published:

As developers, we need to learn how to create and develop software that can be reusable and flexible without duplicated code especially if we have different objects with different behaviors. This can be smoothly done by using object-oriented programming techniques and principles. In this article, we will present the basics of MQL5 Object-Oriented programming to understand how we can use principles and practices of this critical topic in our software.

Encapsulation is the method that enables to link of functions and data in one class, the data and functions in the class can be private which will be accessible only within the class or it can be public which will be accessible outside the class. The Encapsulation concept helps to hide the complexity of the class implementation and gives the developer full control of his data, helping to keep track of all values which rely on others without conflict.

So, we can say that Encapsulation helps to keep our system up and running and avoid a lot of possible errors in addition to giving a high level of control for the developer and helping in testing and processing classes data smoother and easier without affecting or changing the whole code of the software. According to what mentioned it helps also to solve errors and prevent to be coding complicated.

The following picture represents the Encapsulation concept:

Encapsulation

Author: Mohamed Abdelmaaboud