Results 1 to 3 of 3
Thread: Design patterns
- 05-10-2007, 08:02 PM #1
Member
- Join Date
- May 2007
- Posts
- 41
- Rep Power
- 0
- 05-11-2007, 09:01 PM #2
Member
- Join Date
- May 2007
- Posts
- 4
- Rep Power
- 0
The factory pattern lets you create different kinds of objects. I may have a dinnerFactory that returns dinner objects. Depending on what i pass it, it may return a pizzaDinner, a steakDinner, or a hamburgerDinner object - all of which are sub-classes of the Dinner class.
- 05-12-2007, 06:21 AM #3
Senior Member
- Join Date
- Mar 2007
- Posts
- 134
- Rep Power
- 0
Let me add some thing more , There is one more pattern called abstractfactory which is an extention of this. Say in the above example we have fixed the factory as dinner factory but consider a situation in which it can be either dinner facotory or a supper factory In that case we use the abstract factory
Similar Threads
-
Design Calendar UI
By praveen.kb in forum AWT / SwingReplies: 0Last Post: 01-21-2008, 11:54 AM -
Patterns to application with swing and hibernate
By Peter in forum JDBCReplies: 2Last Post: 07-04-2007, 06:58 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks