What is OOP(Object Oriented Programming) (1)
Object-Oriented Programming is one of the programming paradigms based on the concept of ‘objects,’ which can contain both data and code.
Let’s explore some differences between Object-Oriented Programming and Imperative and Procedural Programming.
If you write code by following the steps of a process without any strict boundaries or categories, it can be an example of Imperative and Procedural Programming, as demonstrated below.


The relationship between functions and data becomes very complicated when the code is written in this way. As more code is added, it will take a long time to figure out how all functions and data interact with each other, as you can see in the diagram.
Otherwise, Object-Oriented Programming is that grouping data and function in objects and make the data and functions interact with each other through the objects like below.

If some data or functions make some problem, we only need to manage and fix the object which have the issues, meanwhile we have to change everything in the same case with Imperative and Procedural Programming since they are all connected each other.
Object-Oriented Programming is reusable and scalable, allowing us to write high-quality code with increased productivity and improved handling of complex systems and large codebases.
To write code using Object-Oriented Programming, there are some concepts to understand, namely classes and objects.
A class is like a template; it declares the type of data and functions but does not contain any actual data. An object is an instance of a class that holds actual data. We can declare the same class once but produce objects of the class as many times as we want, as you can see below.
