The Factory Pattern
摘要
Creating objects directly in a program may seem easy. However, as the program grows, this approach can make the code messy and hard to maintain. This chapter helps you understand the problem and explore possible solutions using factories.