Object-Oriented Programming
Procedural programming is a set of not explicitly related functions and variables for storing and processing information. This approach is simple and straightforward, and it can be used for tasks with no closely related entities (data and functions to process them).

Let's consider an example of procedural code with variables and a function to calculate the result.
const baseSalary = 30000;
const overtime = 10;
const rate = 20;
const getWage = (baseSalary, overtime, rate) => {
return baseSalary + overtime * rate;
};
getWage(baseSalary, overtime, rate);
Object-oriented programming (OOP) is a methodology describing a program as a collection of objects, each of which contains data (properties) and methods for interacting with them.

Let’s use OOP by collecting data into the employee
object.
const employee = {
baseSalary: 30000,
overtime: 10,
rate: 20,
getWage() {
return this.baseSalary + this.overtime * this.rate;
},
};
employee.getWage();
With this approach, the method has no parameters. In this case, object properties are used, which are set when the object is created, and they may be changed by other methods. As a result, you get an entity with a simple interface, which simplifies the program.
Conceptually, OOP is an approach to programming that views it as modeling. Its main task is to structure information in terms of manageability, which significantly improves the control of the modeling process.
OOP entities
Imagine you are designing a car. It will have an engine, four wheels, a gas tank, etc. The car must be able to start, accelerate and slow down. You know how the engine and wheels work together, that is, you know the laws of interaction between various parts of your car.
Class
You describe all the parts that make up the car, how these parts work together and what the driver must do in order for the car to brake, turn on the lights, and more. As a result, you will create a design (template, diagram). This is what OOP calls a class.
Class is a way of describing entities, their state and behavior depending on this state, along with the rules for interacting with this entity (contract).
In our case, the class describes an entity, a car. This class will have properties such as the engine, wheels, lights, etc. The methods of this class will be to open the door, start the engine, pick up speed, etc.
Instance
Imagine that cars designed according to your drawings are now ready. Each of them matches the drawing, all systems work together exactly as designed, but each car is unique. They all have a body and engine number, but all numbers are different, the cars differ in color and interior trim. These cars are instances of the class.
Instance (object) is a separate representative of a class with a specific state and behavior completely defined by the class. This is what has been created based on your drawing, that is, according to a description from the class.
In simple terms, an object has specific property values and methods that work with these properties based on the rules specified in the class. In this example, a class is an abstract car in the drawing, and an object is the car behind your door.
Interface
When you use a coffee machine or drive a car, there is a set of controls to interact with.
Interface is a set of class properties and methods available for use when working with instances.
Essentially, an interface describes a class, clearly defining all possible actions with it. A good example of an interface is a car dashboard, which enables you to call such methods as speeding up, braking, turning, changing gears, turning on headlights, etc.
When describing a class interface, it is very important to strike a balance between flexibility and simplicity. A class with a simple interface will be easy to use, but there will be tasks that cannot be addressed through it.
If your interface is flexible, most likely it will consist of rather complex methods with many parameters. It will be able to do quite a lot, but its use will entail great difficulties and the risk of making a mistake by confusing something.