Programming Assignment 7
1 Background:
Nearby is a (fictitious) company that develops software in
three closely related areas: personal navigation systems, en-route and
mobile commerce, and location-based services. You have been
contracted to develop a command-line application that can be used
to geocode street addresses (i.e., convert street addresses to
longitude/latitude coordinates).
2 Documents:
The following design documents have been written for this application:
3 Some Course Requirements:
In addition to the requirements in the SRS, you must:
-
Include a description of your rationale for choosing a particular
kind of collection in the comments for each class that uses
a collection.
-
Use type-safe collections.
4 Some Advice:
We have several important pieces of advice for you.
-
You must both design and implement the system. Make sure you first
identify the different components you will need and write textual
descriptions of those components. Next, you should create a UML
class diagram. You should only start typing after you have
completed your UML class diagram.
-
You will need to develop an algorithm for finding the
longitudes/latitudes of the two ends of a street segment containing
a particular address. Before you start typing, think about how you
would do this by hand and then formally describe the process you
used.
-
You should give a considerable amount of thought to the types of
collections you should use. Your grade will be based, to a large
extent, on the choices you make and your rationale for those
choices. Make sure you think about how your classes would be used
in a "real world" application.
-
You must not write your own sorting algorithm, you must use
the
Arrays.sort(java.lang.Object[])
method.
This means that the class of interest should implement the
Comparable
interface. Again, think
about this issue before you start typing.
-
The file
jmuarea.txt
is about 2.5Mb. It will be almost
impossible for you to debug your code using this file. So, you
should create much smaller files for debugging and initial testing.
One such file is
tiny.txt
(with four streets, two with
one segment each and two with multiple segments), however, you
should create your own for more extensive debugging/testing.
Your testing will need to be systematic. For example, for
tiny.txt
, you should start with the following tests:
You will need to use a calculator or spreadsheet
(like tiny.xls) to check your answers.
-
Test each method of each class individually.