4 ms·
OO property 1: You're in a house. An appliance is a physical object that does something. A fridge is an appliance that keeps things cold, a toaster is an appli
by speek 18y ago
OO property 1: You're in a house. An appliance is a physical object that does something.
A fridge is an appliance that keeps things cold, a toaster is an appliance that makes things warm, a blender is an appliance that blends things.
If you change the definition of an appliance to be "a thing in a kitchen that does stuff," all of the other things that I've used "appliance" to define will still continue to be what they are, but their "scope" will be different.
OO property 2: You've got a cookie cutter and dough. The Cookie Cutter is the constructor, it makes a object the shape of the cookie cutter insides. It looks like the shape of the cookie cutter, it smells like that shape, it _is_ that shape; but it's only really a copy of that. Which is why people have issues with "equals." Equals can refer either to having the same value, or actually being the same object.
There are other really nice analogies (is-a vs has-a and children vs people), but I hope that my analogies make sense to y'all!
EDIT: the above is 181 words, sorry :-(