Hello, i am a little confused about this: In one test if found the assertion, that: "departments are navigable through college". But in another example they say: student is navigable through the School class is WRONG??
I'd thought, that this navigable thing has only a meaning in combination with this UML-Arrow (can be traversed in one direction: example: Book ---> pages): A book knows about its pages, but a page doesn't know what book it's in...). So Book is navigable though pages?? Has the composition-relation an effect on the navigation?
[ June 25, 2008: Message edited by: Sybyll Jones ] [ June 28, 2008: Message edited by: Sybyll Jones ]
I would however like to explain whatever I know about navigation. In UML you are right when A---->---B U can say that B is navigable through A. In Java Code Navigability usually means that set or get methods for the instance variable of class B are defined in A. If there are no methods accesing or mutating an object of class B in A you will see this in UML A-----B
The line shown here is a solid line...(Dont mistake with interfaces)
Yes, don't forget that navigability manifests through setters and getters (accessors and mutators) simply "has a" eg A book has pages merley denotes an association (UML: Solid line with/without multiplicity indicators). If the Book class then has methods akin to getPage, setPage etc then one may say pages are navigable through book. (Although a page and books represents a composition association as if one were to destroy the book class, all the pages would also be destroyed)
Hope this helps
be a well encapsulated person, don't expose your privates, unless you public void getWife()!
subject: "department is navigable through college"?