O'Reilly logo
  • Yu Sasaki thinks this is interesting:

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)
Suit suit;


Cover of Design Patterns


Sealed => keeps other classes from inheriting from this factory class