Object-Oriented Programming

Luiggi Trejo
2 min readJan 1, 2023
Photo by Mika Baumeister on Unsplash

Object-oriented programming (OOP) is a programming paradigm that is based on the concept of “objects”, which can contain data and code that manipulates that data. OOP languages are designed to encapsulate data and the functions that operate on that data within a single unit, or object.

In OOP, objects are created from templates called classes. A class defines the properties and behaviors that an object of that class will have. When an object is created from a class, it is called an instance of that class.

One of the main principles of OOP is encapsulation, which refers to the idea of bundling data and functions that manipulate that data within a single unit. Encapsulation helps to reduce complexity and increase reusability by allowing developers to create self-contained units of code that can be easily used and maintained.

Another principle of OOP is inheritance, which allows developers to create a new class that is a modified version of an existing class. The new class is called a subclass, and it inherits the properties and behaviors of the parent class. This allows developers to create a hierarchy of classes and reuse code more efficiently.

OOP languages also support the concept of polymorphism, which allows objects of different classes to be treated as if they were instances of a common superclass, even if they do not have a direct inheritance relationship. This allows developers to write code that can operate on a variety of different objects in a uniform way.

Some popular programming languages that support OOP include Java, C#, Python, and C++. In my particular case, I am always looking to get an edge over other market participants, and I´ve found that somewhat that this OOP trading philosophy makes it easier to express my trading ideas in code.

Stay tuned!

--

--