How to apply Abstract Factory Pattern ???
Posted
by Amit
on Stack Overflow
See other posts from Stack Overflow
or by Amit
Published on 2010-05-31T13:21:42Z
Indexed on
2010/05/31
13:22 UTC
Read the original article
Hit count: 242
design
|design-patterns
I am new to Design Pattern and I have a scenario here... and not sure as how to implement the pattern ...
- We have multiple vendors Philips, Onida...
- Each vendor (philips, onida...) may have different type of product i.e. Plasma or Normal TV
I want specific product of each vendor using Abstract Factory Pattern...
Thanks in advance for any help...
My implementation so far... public enum TvType { Samsung = 0,LG = 1,Philips = 2, Sony = 3 }
public enum Product
{
Plasma = 0,NormalTV = 1
}
concrete class of each vendor.... that returns each product and also the interface that contains ProductInfo i.e. if Vendor is ... then it must have this product....
© Stack Overflow or respective owner