About Question enthuware.ocpjp.v7.2.1170 : Is the Composite pattern on the exam?

All the posts and topics that contain only an error report will be moved here after the error is corrected. This is to ensure that when users view a question in ETS Viewer, the "Discuss" button will not indicate the presence of a discussion that adds no value to the question.

Moderators: Site Manager, fjwalraven

Post Reply
telston
Posts: 4
Joined: Wed May 21, 2014 8:44 am
Contact:

About Question enthuware.ocpjp.v7.2.1170 : Is the Composite pattern on the exam?

Post by telston » Fri May 30, 2014 11:46 am

Would you agree that the definition of composition is distinct from the definition of the composite pattern? The composite pattern has to do specifically with composing a tree structure from objects of a class that implements an interface that declares the tree's behavior. Each object in the tree is a leaf or contains one or more instances of the class of which it itself is an instance. Since the tree is created from instances of the same class, the class does provide the implementation of its owned components; it delegates behavior to other instances of its own class. So, the composite pattern implements a specific kind of composition. Unlike other implementations of composition, then, the composite pattern is not properly characterized as having "no control over how [the] functionality is implemented".

Given the definition of the composite pattern, as distinct from the definition of composition, would you agree that the third option would better be stated as, "One drawback of composition is that it is not possible to change or customize the aggregated functionality"?

References:
en.wikipedia.org/wiki/Composite_pattern
c2.com/cgi/wiki?CompositePattern
en.wikipedia.org/wiki/Object_composition

admin
Site Admin
Posts: 8558
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: About Question enthuware.ocpjp.v7.2.1170 : Is the Compos

Post by admin » Fri May 30, 2014 12:08 pm

You are right. Fixed.
thank you for your feedback!
Paul.
If you like our products and services, please help us by posting your review here.

telston
Posts: 4
Joined: Wed May 21, 2014 8:44 am
Contact:

Re: About Question enthuware.ocpjp.v7.2.1170 : Is the Compos

Post by telston » Fri May 30, 2014 12:14 pm

Thumbs up. Thank you, Paul.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests