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

Filed under:
|

I am new to Design Pattern and I have a scenario here... and not sure as how to implement the pattern ...

  1. We have multiple vendors Philips, Onida...
  2. 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

Related posts about design

Related posts about design-patterns