Hai All!
thanx for the valuable expalnations. i had this doubt regarding this question posted in ibm mock exam for OOAD
Question

no diagrams needed for this question)
In design #1, the Catalog object has a getProducts() method, which returns a collection object, such as a Dictionary or array, containing all the Products the company sells. In design #2, the Catalog object has a getProductNumbered(anIdentifier) method, which returns the Product with the specified unique identifier. Considering the objects returned, which of the following BEST characterizes the two designs?
a) Both designs maintain the objects' encapsulation and reduce coupling by accessing state data via methods only and not directly.
b) Both designs break the objects' encapsulation, adding brittle coupling.
c) Design #1 breaks the encapsulation of the Catalog, adding brittle coupling. Design #2 maintains the encapsulation of the Catalog, making future design changes easier.
i feel choice 'a' is right
i am not sure how the design 1 adds brittle coupling.
can anyone throw more light on this plz
thanx
vasan