Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

"department is navigable through college"?

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?

Thanks
Syb.

[ June 25, 2008: Message edited by: Sybyll Jones ]
[ June 28, 2008: Message edited by: Sybyll Jones ]
 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I could not understand what your question is;

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)
 
Ranch Hand
Posts: 352
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Is that a spider in your hair? Here, threaten it with this tiny ad:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic