NOTE: This is just a random thought of mine, and I don’t have any evidence or references to back it up. The idea just clicked with me while I was taking a shower.
As I read many books, I found that object-oriented programming (OOP) is defined in various ways. In my opinion, the fundamental ideai s to model data similarly to how we handle real-life objects.
More specifically, data should be treated as an object that has a state and actions. For example, consider a purse. A purse has a state, such as the amount of money it holds or the number of bills inside. It also supports actions, like withdrawing money.
In OOP, a class serves as a blueprint for defining such objects. A class can have attributes to represent its state and methods to define its actions, enabling us to create and manipulate objects in a structured way.
Hot cocoa 200 Chicken nugget 600 Sushi 600 Chips 400 Protein shake 200
Total 2000 kcal
MUST:
TODO: