Skip to Content.
Sympa Menu

gang-of-4-patterns - [gang-of-4-patterns] Question on Abstract Factory

gang-of-4-patterns AT lists.cs.illinois.edu

Subject: Design Patterns discussion

List archive

[gang-of-4-patterns] Question on Abstract Factory


Chronological Thread 
  • From: "Sayan Mukherjee" <sayanmukherjee AT indiatimes.com>
  • To: <gang-of-4-patterns AT cs.uiuc.edu>
  • Subject: [gang-of-4-patterns] Question on Abstract Factory
  • Date: Fri, 29 Aug 2003 18:17:18 +0530
  • List-archive: <http://mail.cs.uiuc.edu/pipermail/gang-of-4-patterns/>
  • List-id: Design Patterns discussion <gang-of-4-patterns.cs.uiuc.edu>

Hi,

In the Design Patterns book by GoF, it says that
the reference to the AbstractProduct (or
ConcreteProduct) never occurs in the client code.
Clients will only call the CreateXXX() methods
from the concrete factory classes.

Then how will the client use the objects that the CreateXXX() methods
construct?

I am assuming the following relationships:

AbsractFactory (interface)
CreateProductA() (signature only)
CreateProductB() ( -do- )

ConcreteFactory1 (class) implements AbsractFactory
Implementations of the CreateXXX() methods
are here.
Supposed to create Product1A and Product1B
objects.

ConcreteFactory2 (class) implements AbsractFactory
Implementations of the CreateXXX() methods are
here.
Supposed to create Product2A and Product2B
objects.

Sayan Mukherjee
[Email:
sayanmukherjee AT indiatimes.com]




Get Your Private, Free E-mail from Indiatimes at http://email.indiatimes.com

Buy The Best In BOOKS at http://www.bestsellers.indiatimes.com

Bid for for Air Tickets @ Re.1 on Air Sahara Flights. Just log on to
http://airsahara.indiatimes.com and Bid Now !





Archive powered by MHonArc 2.6.16.

Top of Page