Comp 245                                               Cities BST                                                             50 points

Data Structures                                                                                            Due Friday November 9


Implement a city database using a binary search tree to store the database records. 

Lines of Latitude and Longitude

For the purposes of this assignment all latitude degrees will be in the northern hemisphere and all longitude degrees will be west of the Prime Meridian.


Latitude and Longitude, system of geometrical coordinates used in designating the location of places on the surface of the earth. Latitude, which gives the location of a place north or south of the equator, is expressed by angular measurements ranging from 0° at the equator to 90° at the poles. Longitude, the location of a place east or west of a north-south line called the prime meridian, is measured in angles ranging from 0° at the prime meridian to 180° at the International Date Line.  Each degree of latitude and longitude is divided into 60 minutes.  Each degree of latitude and longitude is divided into 60 minutes.


Each database record contains the following city information:

1)      Its name, a string of max length 100. (No two cities can be entered with the same name)

2)      Its coordinates, longitude and latitude. Use degrees only.

        Little Rock    34° N     92° W
        Dallas         32° N     96° W
        Nashville      36° N     86° W

        To find more go to       

3)      Its population.

4)      Its yearly average temperature.

The following operations should be available to the user:

1)                Insertion of new cities.  The BST should be organized by the city’s name (the name must be unique).

2)                Deletion of cities by name.

3)                Deletion of cities by coordinate.

4)                Search and display all information for a city by its name.

5)                Search and display all information for a city by its coordinates.

6)                Print all cities in alphabetical order.


What to Turn In:

Via Ease Submit:       City.h, City.cpp and Main.cpp

In Class:                     A printed copy of each of the files listed above.