Assignment 12

The assignment text: pdf html

The neighboring states.

You can find this information on any map of the USA. However, for your convenience, that data is provided in this file of neighbors. It is up to you to figure out how to enter this information into your program. Brute force data definitions within the program provides the simplest and acceptable approach.

Distances.

Again, this information can be found on any map that includes the latitude and longitude lines.

Alternately, a number of online resources provide the formula for computing the land distances between two points on the earth, given their latitude and longitude.

Of course, both of these methods of computation require complicated computations and do not contribute to our understanding of the program design. So, the next possiility is to measure the distance as the distance between two points that we display when we represent the cities as dots in our graphics window.

Finally, if your program does not include a visual representation of the map, the following approximation will give you realistic distances between any two cities in the 48 US states:

• One degree of latitude for the latitude in the range from 50 to 30 represents the distance of approximately 68 miles.
• One degree of longitude in Michigan - at the latitude of about 50 - represents the distance of approximately 52 miles.
• One degree of longitude in Florida - at the latitude of about 32 - represents the distance of approximately 64 miles.
• Therefore, taking the average of the longitude distance betweent these two extremes, we can assume that one degree of longitude represents 58 miles regarless of the latitude of the two cities.

Due Date: Wednesday, April 18, 2007 at 8:00 pm.