A question for OOP experts. - page 34

 
Реter Konow:

I haven't read it. I'll read it at my leisure. What exactly would you recommend?

Kant, Hegel. A long time ago. But I developed a particular "object" model myself.

You'd better study the basics of OOP in programming.

And in general it is better to consider the concept of OOP from the point of view of Feuerbach's concepts, well, and maybe, some moments from the point of view of the Primordial Pansophism, while the approach of Neo-Luddism and Ekstropianism should be avoided, because from the point of view of Primordial Pansophism tradition they are not very suitable because of their heightened Conventionalism.

 
Dmitry Fedoseev:

Better learn the basics of OOP in programming.

...

Fundamentals: Take a task, select "objects" from it. Create a class for each object. Describe the object in the class.

We build a tree-like scheme, where "roots" are the most abstract objects with the most abstract properties, and then we create classes of descendant objects, with more specific properties and methods. Classes implement encapsulation ofobject description, class instances link properties and methods by inheritance chains. The general scheme of classes should logically correspond to the natural semantic classification. We "parse" the domain of meaning into entities and "hang" them in a tree-like sequence - from abstract to concrete, with the same "tree-like" form of inheritance of properties and methods. Convenient, but you have to put up with a complex syntactic barrier serving to separate and link objects, properties, methods and data.

 
Реter Konow:

Basics: Take a task, select "objects" from it. Create a class for each object. Describe the object in the class.

We build a tree-like scheme where the most abstract objects with the most abstract properties are "rooted" and then create derived object classes with more concrete properties and methods. Classes implement encapsulation of object description, class instances link properties and methods by inheritance chains. The general scheme of classes must logically match the natural semantic classification. We "span" the solution area into entities and "hang" them in a tree-like sequence - from abstract to concrete, with the same "tree-like" form of inheritance of properties and methods. Convenient, but you have to put up with a complex syntactic barrier serving to separate and link objects, properties, methods and data.

The erroneous thesis is highlighted. Classification must correspond to the task to be solved.

 
Dmitry Fedoseev:

This is not the issue here. It's only about separating an object from a set of entities.

Anyway, there's nothing to argue about...

 
aleger:

Never mind - there's nothing to argue about...

And yet... For example ADX indicator - the level of the ADX line shows the strength of the trend. Everything is of course approximate and relative.

 
Dmitry Fedoseev:

And if it does... For example the ADX indicator - the level of the ADX line shows the strength of the trend. Everything, of course, is approximate and relative.

I just need to know the beginning and the end of each trend and this is perfectly fulfilled by

The current trend indicator, the prototype of which was the well-known Zigzag.

 
Реter Konow:

I haven't read it. I'll read it at my leisure. What exactly would you recommend?

C++, of course.

But you could start with this.

ООП для школьников.
ООП для школьников.
  • 2019.09.08
  • www.mql5.com
======================================================================================================================== В этой теме будет нескольк...
 

When thinking about the meaning of inheritance and polymorphism, I came to the conclusion that they are tools to structure the dynamic content of an object, and help to link and encapsulate layers of distributed data. Inheritance is intended forstructuring data, polymorphism for methods. That is, - inheritance and polymorphism are the same tool applied to two kinds of content - information and methods.

Inheritance and polymorphism naturally generate a tree-like structure of an object in which specific chains are important. They perform an encapsulation function, where each of their segments can be treated as an independent object. Interestingly, OOP structuring always places data from abstract to concrete, and from general to private. The whole is divided into types and forms, and has a direct relationship to them through a chain of inheritance, with each chain separated from the other, but converging to it at a common root.

At first glance, I'm describing a simple tree-like hierarchy, but the point is that OOP puts it forward as a universal archetype of working with data, providing the most efficient and convenient way of programming. I won't deny it.

I wonder how OOP solves the problem of "cross-links" between chains.

 
Then it should be inheritance to extend functionality and polymorphism to override functionality. Although both polymorphism and inheritance are used in both cases.
 
Dmitry Fedoseev:
Then inheritance to extend functionality and polymorphism to override functionality. Although both polymorphism and inheritance are used in both cases.

How are cross-links between descendant classes that have a common root somewhere deep in the hierarchy established?

For example: Class F and class Z are the end links of an inheritance chain with a common root in the hierarchy, class A.

How to get data or methods of class Z from class F?

Reason: