Folks I am doing my partII assignment and having a tough time trying to distinguish if a relationship is either a dependency or association. I know the definitions, any insights or rules of thumb that I can use from a practical perspective??? Eric
Eric, Association is stronger than dependency. Association can be further specified as extends, implements, aggregation relationships. From programming point of view, if you use class A as a paramater of a method or return type of a method in class B, then class B has dependency relationship with class A. Victor SCJP, SCWCD, SCEA
Eric, Don't think too deep. I mean don't think at very detailed level. If you want to think in detail, do it with the following perspectives: 1) does class A hold class B as member variable? 2) does class A extends class B 3) does class A implements interface C 4) does class A's methods depend on class B or does changes to class B reflect class A behavior?
I highly suggest you design your system not in very detail level.
Eric, No. Your design should be as less implementation dependent as possible. But for assignment, you can stick to J2EE implementation perspective. Yes. It varies from each person who designed the application??? Every design is unique for each architect.
A UML diagram is implemetatin dependent. UML Modeling is like speaking a language. It's a new language and different speakers do things different ways.
Peter Coad gave an example of aggregation as the relationship between an organization and its clerks; Jim Rumbaugh stated that a company is not an aggregation of its employees. When gurus can't agree what are we to do?