Abstract Factory Pattern Code Review
Use the Abstract Factory Pattern
Code Review
- Abstract Factory Pattern Code Review: Define the Pattern Interface and Handler Objects
- Abstract Factory Pattern Code Review: Define the Product Interfaces and Handler Objects
- Abstract Factory Pattern Code Review: Define the Client Object
- Abstract Factory Pattern Code Review: Use the Abstract Factory Pattern
Code Walkthrough
The Program class creates an instance of the Client class (object), which invokes methods in the different types of factory classes (objects).
class Program
{
static void Main(string[] args)
{
Client client = null;
FactoryGucci gucci = new FactoryGucci(); client = new Client(gucci); client.ClientMain(); client = null;
Console.WriteLine();
FactoryPoochy poochy = new FactoryPoochy(); client = new Client(poochy); client.ClientMain(); client = null;
Console.ReadLine(); } }
FactoryGucci gucci = new FactoryGucci(); client = new Client(gucci); client.ClientMain(); client = null;
Console.WriteLine();
FactoryPoochy poochy = new FactoryPoochy(); client = new Client(poochy); client.ClientMain(); client = null;
Console.ReadLine(); } }
Printer Friendly Version
Add to Favourites
DotNet Kicks
Digg
del.icio.us
Live Favourites
ma.gnolia
reddit
Slashdot
Technorati
Yahoo!