You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Encapsulation is accomplished when each object maintains a private state, inside a class.
Other objects can not access this state directly, instead, they can only invoke a list of public functions.
The object manages its own state via these functions and no other class can alter it unless explicitly allowed.
In order to communicate with the object, you will need to utilize the methods provided.</br>
Abstraction
Abstraction is an extension of encapsulation.
It is the process of selecting data from a larger pool to show only the relevant details to the object.
Inheritance
Inheritance is the ability of one object to acquire some/all properties of another object.
Polymorphism
Polymorphism gives us a way to use a class exactly like its parent so there is no confusion with mixing types.
This being said, each child sub-class keeps its own functions/methods as they are.