Class exercise on Head First Design Patterns for simple factory with Singleton