Factory classes (was: Re: [Tutor] Java and Python (was: Iterators))

Sean 'Shaleh' Perry shalehperry@attbi.com
Tue, 3 Sep 2002 09:15:05 -0700


On Tuesday 03 September 2002 09:04, Erik Price wrote:
> On Tuesday, September 3, 2002, at 10:35  AM, alan.gauld@bt.com wrote:
> > Usiakly the way to deal with class explosions is to define a
> > function (or factory class) which takes the parameters in,
> > figures out which kind of class you really need and hands
> > you a pointer to it:
>
> What is a factory class?  I have seen this term before, but I'm not
> sure how it is different from any other class.  Don't all class
> definitions create instances for you (handing you a reference to the
> instance)?
>

A factory makes something other than itself.  A car factory is a place wh=
ere=20
cars are made, not more car factories.