Describe the Factory Pattern and a time when you used it.
Anonymous
A programmer using the Factory pattern requests objects from a centralized Factory class instead of creating and initializing objects itself. This is useful for centralizing logic in some cases but is more often used for adding a layer of abstraction between the consumer of a class and the list of concrete classes that could fill the role. A project I worked on used the Factory pattern to deliver custom classes to consumer functions based on the customer number, so different customers could get different logic simply by changing the factory class instead of thousands of points across the code base.
Check out your Company Bowl for anonymous work chats.