Searching Routes Please Write Java Program Show Flight Routes Given Starting P1 Ending P2 Q37270243

Searching Routes

Please write a Java program to show the flight routes given thestarting P1 and ending P2 airports. If there is no flight routeavailable from P1 to P2, please say so to the user.

You must test at least the following five searching cases:

(1) P1 and P2 are T and X.   The answer is the routeTWYRX.       

(2) P1 and P2 are P and Q. The answer is NO route available.

(3) P1 and P2 are S and R.   The answer is the routeSTWYR.        

(4) P1 and P2 are Z and S. The answer is NO route available.

(5) P1 and P2 are Y and X.

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.