public City FindCentralCity()
        {
            double totLat = 0, totLong = 0;

            // work out average latitude and longitude.
            // This will be the center of the cities
            for (int i = 0; i < cities.Length; i++)
            {
                totLat  += cities[i].Latitude;
                totLong += cities[i].Longitude;
            }
            totLat  /= cities.Length;
            totLong /= cities.Length;

            // create a new city located at center
            City central = new City("", totLat, totLong);

            // find city closest to center
            City   closest = cities[0];
            double tempDist, minDist = central.Distance(closest);

            for (int i = 1; i < cities.Length; i++)
            {
                tempDist = central.Distance(cities[i]);
                if (tempDist < minDist)
                {
                    closest = cities[i];
                    minDist = tempDist;
                }
            }

            return(closest);
        }
        public City FindCentralCity()
        {
            double totLat = 0, totLong = 0;

            // work out average latitude and longitude.
            // This will be the center of the cities
            for (int i = 0; i < cities.Length; i++)
            {
                totLat += cities[i].Latitude;
                totLong += cities[i].Longitude;
            }
            totLat /= cities.Length;
            totLong /= cities.Length;

            // create a new city located at center
            City central = new City("", totLat, totLong);

            // find city closest to center
            City closest = cities[0];
            double tempDist, minDist = central.Distance(closest);

            for (int i = 1; i < cities.Length; i++)
            {
                tempDist = central.Distance(cities[i]);
                if (tempDist < minDist)
                {
                    closest = cities[i];
                    minDist = tempDist;
                }
            }

            return closest;
        }