0

Hi, I'm in my second year of computer science and we're currently learning about design patterns. As part of this we have been given an assignment to include the Abstract Factory design. I'm having trouble understanding exactly how it fits together so I was wondering if someone could explain, in the most basic terms they can, how it all works.

3
Contributors
5
Replies
6
Views
7 Years
Discussion Span
Last Post by Waddiwassi
0

YOu have a Factory, that makes objects of some specific type. Maybe you want to use a different Factory depending on some run-time consideration. If all your Factories extend an AbstractFactory class then you can create the appropriate Factory once at the beginning, then use it via the abstract superclasses's interface regardless of which actual Factory it is.

0

So am i just looking at having abstract classes linking down to a final concrete class or is there something more to how the different methods interact with each other?

0

Thank you far all the help. I'm somewhat more sure of what i'm doing now.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.