State and behavior

state

 * https://stackoverflow.com/questions/9967733/objects-with-state-and-behavior-in-oop fields or state can be thought of current conditions within an object. A banana's state would be its shape and colour and size Methods or behaviours can be thought of its acting. With the banana, whether it is ripe or dry can be the behaviour.

Translation into English: state is the metaphor for the key, value pairs of the hash table. When the hashmap of two separate object instances of the same class have the same key value pairs their state is the same.

Behavior are the procedures mapping the key, value pairs of this hash table. As the associated values change, one could metaphorically state that the "condition" of the clustered hash table and procedures changes, but only if you know what you mean by the metaphor. Or if you know your audience don't recognize the category mistake, you can waft in an out of metaphors, knowing nobody will challenge you because they are to afraid of looking stupid.

Bananas don't exist inside of computers(Noun), key value pairs though do exist inside of computers. In the real world whether a banana is ripe or dry is its attributes, bananas don't have an attitude problem, hence can't "behave". In python the hash map or dictionary's key, value pairs are metaphorically referred to as its attributes.

In this hash map one can store the attributes as numbers of bananas, vectors, flees, trees and rocks. What you can't do is map metaphorically from the real world to an ontological domain where metaphors are excluded. You can't program a computer by telling it metaphorically to "spread the behavior over many objects", in the real world butter is spread over bread, but Intel doesn't farm with cows.

javadev
http://javadevwannabe.blogspot.com/2012/02/state-behavior-and-identity.html

https://www.yegor256.com/2014/12/09/immutable-object-state-and-behavior.html

https://www.yegor256.com/webinars.html  get  rid of new

quara
https://www.quora.com/What-is-the-difference-between-object-oriented-analysis-and-object-oriented-design