September 2011
Intermediate to advanced
434 pages
9h 32m
English
1. The common prefixes make, create, and get reflect which specific design pattern?The Factory Method pattern
2. Primitive operations, which are prefixed with do, are used by which pattern?The Template Method pattern
3. Separate the instantiation from its assembly to promote flexibility in Listing 9-1.
Listing 9-1. AbstractClass
public class AbstractClass extends Sprite
{
public function AbstractClass()
{
var someMovieClip : MovieClip = new ConcreteMovieClip();
someMovieClip.y = 25;
someMovieClip.x = 40;
someMovieClip.play();
addChild( someMovieClip );
}
}
Listing 9-2. AbstractClass
Listing 9-3. FactoryMethodClass.as
Read now
Unlock full access