Question: I need help with both of these methods / * * * finds all itineraries within a given price and within a given number of
I need help with both of these methods
finds all itineraries within a given price and within a given number of stops from source to destination airports
@param ag the AirlineGraph graph representing the airline system
@param source the String source airport code
@param destination the String destination airport code
@param budget the double maximum price in dollars
@param stops the int maximum number of stops
@return a possibly empty Set of paths with a total cost
less than or equal to the budget and at most the given number of stops. Each path is an ArrayList of
at most stops entries starting with source and ending with destination.
public Set allTripsAirlineGraph ag String source, String destination, double budget, int stops;
finds all nontrivial itineraries within a given price and within a given number of stops from an airport back to itself
@param ag the AirlineGraph graph representing the airline system
@param source the String source airport code
@param budget the double maximum price in dollars
@param stops the int maximum number of stops
@return a possibly empty Set of paths with a total cost
less than or equal to the budget and at most the given number of stops. Each path is an ArrayList of
at least and at most stops entries starting and ending with source.
public Set allRoundTripsAirlineGraph ag String source, double budget, int stops;
Test Failed! Loading routes from file Finding all trips within $ and stops from LTP to EFP Your solution: Expected solution: LTP $ RLY RLY $ EFPLTP $ ORH, ORH $ EFPLTP $ NRM NRM $ EFP Your solution is empty but expected solution is not.
Loading routes from file Finding all trips within $ and stops from LWR Your solution: LWR $ PVS PVS $ LWRLWR $ XUS, XUS $ LWRLWR $ XXS XXS $ LWRLWR $ KOI, KOI $ LWRLWR $ FKN FKN $ LWR Expected solution: LWR $ FEN, FEN $ PVS PVS $ LWRLWR $ PVS PVS $ LWRLWR $ FKN FKN $ XXS XXS $ LWRLWR $ XUS, XUS $ PVS PVS $ LWRLWR $ XUS, XUS $ FKN FKN $ LWRLWR $ FEN, FEN $ XXS XXS $ LWRLWR $ FKN FKN $ KOI, KOI $ LWRLWR $ PVS PVS $ XUS, XUS $ LWRLWR $ XXS XXS $ FKN FKN $ LWRLWR $ KOI, KOI $ PVS PVS $ LWRLWR $ FEN, FEN $ TUS, TUS $ LWRLWR $ FEN, FEN $ XUS, XUS $ LWRLWR $ XUS, XUS $ LWRLWR $ FKN FKN $ XUS, XUS $ LWRLWR $ XUS, XUS $ KOI, KOI $ LWRLWR $ XXS XXS $ TUS, TUS $ LWRLWR $ XXS XXS $ XUS, XUS $ LWRLWR $ XUS, XUS $ XXS XXS $ LWRLWR $ FKN FKN $ LWRLWR $ XUS, XUS $ TUS, TUS $ LWRLWR $ FKN FKN $ PVS PVS $ LWRLWR $ XXS XXS $ KOI, KOI $ LWRLWR $ PVS PVS $ KOI, KOI $ LWRLWR $ KOI, KOI $ XXS XXS $ LWRLWR $ PVS PVS $ TUS, TUS $ LWRLWR $ PVS PVS $ XXS XXS $ LWRLWR $ FEN, FEN $ FKN FKN $ LWRLWR $ KOI, KOI $ FKN FKN $ LWRLWR $ XXS XXS $ LWRLWR $ KOI, KOI $ TUS, TUS $ LWRLWR $ KOI, KOI $ LWRLWR $ FEN, FEN $ KOI, KOI $ LWR expected:LWR $ FEN, FEN $ PVS PVS $ LWRLWR $ PVS PVS $
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
