What Java data structure/design pattern best models this object, considering it would perform these methods?
Posted
by
zundarz
on Programmers
See other posts from Programmers
or by zundarz
Published on 2012-07-10T21:43:19Z
Indexed on
2012/07/11
3:22 UTC
Read the original article
Hit count: 171
java
Methods:
1. getDistance(CityA,CityB) // Returns distance between two cities
2. getCitiesInRadius(CityA,integer) // Returns cities within a given distance of another city
3. getCitiesBeyondRadius(CityA,integer) //Returns cities beyond a given distance of another city
4. getRemoteDestinations(integer) // Returns all city pairs greater than x distance of each other
5. getLocalDestinations(integer) //Returns all city pairs within x distance of each other
© Programmers or respective owner