清单2是假定的Currency类的骨架。
然而,它并不自动创建可以用来测试客户机的骨架程序代码类,也不创建样本应用程序。
However, it does not automatically create a skeleton code class that can be used to test the client, and it does not create a sample application.
Template Method 模式定义了基类算法的骨架,使用了抽象方法和覆盖将具体细节放到子类中。
The Template Method pattern defines the skeleton of an algorithm in a base class, using abstract methods and overriding to defer individual details to child classes.
应用推荐