Instantiating with Bread Dough
“Do you use the same dough every time you make bread?”
“I use the same recipe”
That was the brief discussion at dinner tonight. I couldn’t resist teaching my young family about the object oriented programming concept of object instantiation. The analogy goes like this:
The recipe is the object. The dough is the instance. Arguably the oven would be the factory method and the bread would be the instance.
So, no, you wouldn’t use the same dough each time to make bread. Dough would be an instance of the BreadRecipe object.
© 2012, Kelly Orr. All rights reserved. Contact author for republishing permission.
Categories: Life, Software Development
