Hi all,
I'm having such a hard time grasping onto Factory. Can anyone help me or point me to a good source? I've been looking up on this online and it seems to be very confusing. Will anyone be able to clearify this for me?
Would anyone be able to supply a simply example and how to use it?
Both the provided wiki links provide some pretty concise sample code, albeit in Java and Python. The basic design principles are the same though, and it's only the specific language syntax that will vary, and there's not that much difference in the provide sample code between Java and C++).
If you're having trouble grasping those samples, it may be more a matter of not having a full grasp of the underlying OO concepts involved. Class interfaces, inheritance, polymorphism, base classes, abstract classes, concrete classes. If you don't have a solid grasp of OO in general, then trying to understand the design patterns that build upon OO is putting the cart before the horse.