Gang of Four (GOF) Design Patterns in ActionScript–Factory Method (1)
share
digg
by
Ntt.cc (4)
on
Ntt.cc (4)
1 month, 2 weeks
ago
permalink
In our last topic, we talk about the strategy pattern. And it helps us to encapsulate the change of algorithm. Today, we go on talking about the birds. We will consider how to generate the birds, eh, I mean the classes. Now, we have the classes of eagle and penguin. We can use them anywhere we want. Further more, we can write down the following code to decide which class should be initialized. public class ...