roads = new ArrayList<Road>();
for (int j=0; j< roads.size(); j++)
{
System.out.println("Road from " + roads.get(j).OriginS + " to " + roads.get(j).destS + " distance " + roads.get(j).distance + "km");
}
for the variable destS and OriginS theyv bin all declared as normal strings in another class, road. I am not sure if only this code will be sufficient for someone to assist me, i could have posted the full code to you but i am scared someone in my class might do a search on this and finds my code and then copy and paste it in his work. If you require me to send the code please do provide me with your email address rather which i can then use.
And actually this is not only the problem i have i need to calculate the shortest distance for 2 given cities in which case to display the routes possible and then highlight shortest path. I have no idea how i can start that one and i cannot use backtracking also.
Thanx,


Sign In
Create Account

Back to top









