• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

Timber Lee: Builder Answer

 
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Timber,
You had sent me a mail with a question on the builder pattern. Because of your privacy settings at the ranch, I am unable to respond to you privately. Further I also figured that this way, others will have an opportunity to participate as well.
The question was to do with an example for the Builder pattern. Builder is a creational GoF pattern. A while back I had posted a detailed description with fast-foods as an example. Please try to read through that. It will give you a clear example of the Builder pattern.
Here's another example. Let us assume that a diagram has to have two objects and some relationship between them.
Given this construct, you can create:
1. Class, Class, Association
2. Interface, Class, Implementation
3. Class, Class, Inheritance and so on.
The idea is that you can only have 2 objects and 1 relationship, but the objects and the relationship can be constructed dynamically Ala Carte.
HTH.
 
reply
    Bookmark Topic Watch Topic
  • New Topic