I still have issues reading UML diagrams.
Just looking at the Builder pattern
http://en.wikipedia.org/wiki/Builder_pattern
I don’t understand why the relationship between the Director and the Builder is an aggregate relationship?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The director sends a sequence of build commands to the builder. Therefore, the director has to know about the builder.
We need some kind of relationship going from the director to the builder. It could either be a
compositionrelationship or anaggregaterelationship.If it was a
compositionrelationship, the director would be responsible for creating and destroying the builder.But the point of this pattern is that the director doesn’t know or care what the builder is. The calling framework creates the builder and passes this dependency to the director. The builder exists independently of the director. That’s why it’s an
aggregaterelationship.