Notice in the code example below that we have identified our factory with the class accessor sealed. This is done to keep other classes from inheriting from the factory, which prevents any abstractions. It also ensures that we are dealing with a single known instance of SuitFactory that works the same across any implementation.
Here we see the Boolean logical code we have refactored inside our factory class:
public sealed class SuitFactory
public Suit CreateSuit(SuitType suitType)
Sealed => keeps other classes from inheriting from this factory class
Share this highlighthttp://www.safaribooksonline.com/a/design-patterns/9759/