(Solved): A program is needed which will propose the route to take flights to get …

A program is needed which will propose the route to take flights to get from some origin place tosome destination place, when not all cities have direct connections to all other cities – and sovarious flights will need to be taken.Using the two provided files, you need to write a recursive method named determineRoute, whichwill be provided with the following parameters:• From – indicates which city to fly from• To – indicates which city you wish to get to• flightRoute – an arrayList which contains, in order, the current proposed route from theoriginal starting place, towards the final arrival place. Initially, when the first call to themethod is made, this list is empty, because you haven’t checked any flight routes yet.The purpose of the method, is to determine a viable route to get to the destination, by use of trialand error / backtracking recursion.You may like to draw for yourself a picture of the connections, so you can “see” how the cities arelinked.Because of the way the routes have been designed, it is possible that your program could makechoices that takes it on a journey that would be a vain circle. Therefore, if the current proposedroute reaches more than 7 flights and still is not reaching the destination, you should deem thatroute to be a wrong/worthless choice (and therefore, give up on it).You will need to consider:• What are the base / stopping cases• Which cases are successful, hopeful and failures.You can only use iteration to iterate through each possible outbound route for a chosen city, but youmust use recursive calls to test routes from each chosen city.The program should be able to determine routes between the following cities:• Johannesburg to Melbourne• Melbourne to Johannesburg• Johannesburg to Paris• Melbourne to Beijing• Really, any two cities, unless they are too far away.

Solution:

Solution:

We have the solution to this question. However, to avoid posible plagiarism, let us provide a fully custom and original solution. Please talk to any of our homework helpers via the chat icons at the bottom of your screen.

Psst!!! Let us do your homework for you!

Do you need expert help with your homework? Are you busy and would like an extra hand with your essays, homework and assignments? Try us today for the best grades in class!

Send us a message!