ConcreteStrategy(具体策略类):它实现了在抽象策略类中声明的算法,在运行时,具体策略类将覆盖在环境类中定义的抽象策略类对象,使用一种具体的算法实现某个...
基于82个网页-相关网页
策略3:每个具体类一个表(estates)。
客户机类可被编码为只需要抽象类型,而把实现策略和结果留给在运行时传递给它们的具体类实例。
Client classes can be coded to require only the abstract type, leaving the strategies and outcomes of implementation to the concrete class instances passed to them at run time.
我们的第三个,也是最后一个策略可能是三个策略当中最有想象力的:每个具体类一个表,抽象超类estate没有表。
Our third and last strategy is probably the most imaginative of all: having one table per concrete class and none for the Estate abstract superclass.
应用推荐