Programming is closely tied to problem of visualisation.
If you cannot visualise the problem in your head, you most certainly won't be able to solve it. Also if you aren't able to modularise the problem, it is going to be a huge mess.
In both of these cases what really helps is the ability to visualise the problem, and then solve in small chunks/modules.
For a beginner, it is much more easier to visualise problem as real world entities than on how something works.
Example: OOP
class Employee { // classname
private:
float salary; // Data members (variables)
string name;
int x, y; // Other Properties
public:
Employee(name, salary){
this.name = name;
this.salary = salary;
}
string getName(){ // Member functions
return this.name;
}
float getSalary(){
return this.salary;
}
void changeSalary(float newSalary){
this.salary = newSalary;
}
}
Usage:
employees = [
(new Employee("Foo", 10000.0)),
(new Employee("Bar", 12000.0))
]
for (... employees){ //loop
emp.changeSalary(emp.getSalary() + 2000)
}
The above example is much simple to understand, we know that there exists an employee whose salary can change, and we have a method to do so. Also, all the information about the employee are part of this object, and when required we can get these informations using some method (eg: getName())
Lets do this in functional programming way. Typically, we will have to store this information in some manner which isn't like an entity. I will do this using array of arrays.
employees = [
['Foo', 10000.0],
['Bar', 12000.0]
]
To change salary we need to have a method which changes salary of the employee and since there is no construct of an object, we will actually have to iterate over each element of an array.
changed_employees = change_salaries(employees)
Although, not a very good example, what ends up happening here is it is difficult to visualise change_salaries as entity vs what was in the case of OOP (Employee.changeSalary)
Please note, I am not saying that one paradigm is better or worse than the other, only that as a beginner learning an OOP language will push you in right direction much faster than functional or procedural.
There are other aspects to this debate, strengths and weaknesses of various paradigms, but you shouldn't worry about those, as a beginner.