Thinking….
Anything that can be named with a noun and has a “Value” is an object. Concepts like Fame, Beauty, or Power are objects because they contain data.
States
A State is the current condition of an object.
- Fan (Object): States are “Running” or “Static.”
- Human (Object): States are “Anger” (Ragg), “Happiness,” or “Sleep.”
The Passport Form Analogy
- The Class: A blank Passport Application Form (The Template).
- The Object: A form filled with “Rahim’s” data (The Reality).
Object vs. Instance
- Object: The general term for the entity created in memory.
- Instance: A term used to describe the relationship to a class. “Instance” implies “An object of a specific class.”
You Instantiate a class to create an Object.
An Instance lives in the Heap Memory. One Class (Blueprint) can produce infinite Instances (Objects).