A memorandum for myself. Focused on understanding at the cost of accuracy.
a package of data and programs to process the data.
In object-oriented programming (OOP), almost everything is an object. A user interacts with each object to proceed the program.
An important thing is that data and methods to deal with those data are combined in one object. So the user can complete the process related to the data within the object.
You can also make multiple objects interact each other.
Here is a glass of water. The water in the glass is the data. With a glass, you can turn the glass to pour, you can shake the glass, you can swirl the glass or turn over it etc. You can use these methods to manipulate the water.
If you have other objects, you can use those method with water to make some effects on other objects.
For example, if there's another empty glass, you can do
on the empty glass.
Then, the empty glass will be filled with water. This will be the output of your program.