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.
Waddiwassi
0
Newbie Poster
Recommended Answers
Jump to PostYOu 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 …
Jump to PostAn abstract class with some concrete classes, yes. But these classes are all Factories.
All 5 Replies
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
Waddiwassi
0
Newbie Poster
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
padtes
30
Junior Poster in Training
Waddiwassi
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.