In cade's class diagram dependency is shown between Order and lineItem which would most likely be implemented as CMP-CMR relationship with Order EB having the below public abstract Collection getLineItems()
e.g returning LineItem collection object from some method which is a dependency trait rather than an association trait(exihibited by presence of instance variable).Am I missing something?
With my understanding one example of association would be a SFSB if that is keeping some instance variables e.g userData which is used across multiple method invocations .
In cade's class diagram dependency is shown between Order and lineItem which....
Are you sure about it? I'm looking at this diagram on page #169 (not sure about the book's version) and it shows a solid line between Order and LineItem, which denotes an association. Since there are no arrows on the sides it is a bidirectional association.
William Butler Yeats: All life is a preparation for something that probably will never happen. Unless you make it happen.
It should have been association. I understand that there is ownership relationship between order and line item and thats why relationship is association but my doubt comes when we implement or code this relationship.
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop