Design Patterns - Factory Method Pattern

2008年07月14日 19:09 • 查看 21 次 • 打印本文

First of all, the definition: “Define an interface for creating an object, but let the subclasses decide which class to instantiate. The Factory method lets a class defer instantiation to subclasses.“ Illustrated by adding a building to our game, which creates various GameUnits for each faction.

查看原文 »

评论

发表评论