Assignment 5 – AK/ITEC1620 3.0

Problem

You are planning to do some travelling after the semester, and you would like to know your available options.  A very low-cost carrier has made their flight schedule available on-line, but they have not provided an interface!  For this assignment, you must build an application that will access their FlightSchedule and determine how many options you have to fly between the two input cities (with at most one stop-over in between) and how much Money each of these options will cost.  (See linked APIs)

Required Classes (save the class files below to your working directory):

FlightSchedule.class
Money.class

Sample Program Run:

You should build your application to have similar prompts for input and similar output to the following.
Enter 'exit' to quit
from: here
to: there

There are no available fares with at most one stop between here and there

Enter 'exit' to quit
from: Vancouver
to: Montreal

Indirect flight from Vancouver to Montreal through Calgary costs 501 dollars and 25 cents
Indirect flight from Vancouver to Montreal through Toronto costs 621 dollars and 85 cents

Enter 'exit' to quit
from: Toronto
to: Toronto

Indirect flight from Toronto to Toronto through Vancouver costs 1026 dollars and 5 cents
Indirect flight from Toronto to Toronto through Edmonton costs 676 dollars and 55 cents
Indirect flight from Toronto to Toronto through Ottwawa costs 191 dollars and 0 cents
Indirect flight from Toronto to Toronto through Montreal costs 131 dollars and 20 cents

Enter 'exit' to quit
from: Calgary
to: Edmonton

Direct flight from Calgary to Edmonton costs 10 dollars and 10 cents
Indirect flight from Calgary to Edmonton through Vancouver costs 200 dollars and 75 cents

Enter 'exit' to quit
from: exit
Thank you for using the ITEC1620 fare guide

Program Template

public class FareGenerator
{
 public static void main (String[] args)
 {
 }
}

Grading

 Demonstrate the operation of your program to the TA.