Cmpt 225
Simon Fraser University
School of Computing Science
Cmpt 225 - Assignment #4
Flight Search Tool
due date: Thursday, April 5 @ 23:59:59
Problem Statement
You are to build a flight search program for an airline. Your program must consist of
the following components:
- A route map class that implements a weighted graph.
The vertices
in the route map are labelled with city names, and the weights correspond to flight lengths.
It should be possible to generate a route map in two ways:
- by successively adding/removing vertices
and edges to an empty map
- automatically from a text file of flights with durations - the exact format of this file
is up to you.
- A flight entry tool that allows a user to construct a route map by prompting
the user to add/remove flights by giving 2 cities and a duration.
When the tool is closed, the current route map should be
saved in a file.
- A flight finder tool. This tool should prompt the user to enter a departure city
and a destination. Using the route map from the saved file, the tool should return
all trips between the given cities with the shortest possible total duration.
For testing, you must include a file IslandAirTest.java that uses your
tools to create the actual route map for Island Air.
A few queries will be tested on this data.
In addition to well-commented source code, you should include a text file readme.txt
that concisely specifies how to use the route map class, the flight entry tool,
the flight finder tool, as well as the name/format of the text files that you are
using to store route maps.
Submission
Assignment #4 is due April 5 @ 23:59:59.
You must electronically deliver this assignment via the Submission program.
More specifically, you must submit:
-
All your source files (Java or C++ code) clearly named. Only submit your
*.java files (for Java) OR h.* and *.cpp (and template) files as well as
your C++ makefile or .dsw files (for Visual C++). Do not submit your *.class
files (for Java) OR your executable file (for C++). Do not create Java
packages nor Jar files, instead, put all your source files in one directory,
namely the
src directory (see below).
-
All of your input files appropriately named.
When zipping your Assignment #4 directory, make sure you have the following
directory structure:
-
your top directory must be called assn4
-
it must contain a completed copy of the file cover_page.html
or cover_page.txt
-
it must also contain the following two subdirectories:
-
src -> which must contain all your source code.
-
doc -> which must contain your readme.txt file