Topical Information

This project will help you show your mastery of vectors (esp. list management), classes, and libraries.

Program Information

Write a program to allow the user to calculate the distance between cities on a map.

Sounds pretty complicated, eh? Don't worry, we'll make a few simplifications here:

But in order to make the system useful, we'll have to add a few other features:

Hint: You should have at least 2 classes — possibly 3 (see the options below). One will be Pointfrom the examples. (And, yes, you must use it as is!) Another should be a City class like:

    class City
        Point location;
        string name;
        double distance(const City & other) const
            return location.distance(other.location);
        Point get_location(void) const
            return location;
    // other methods and constructors here

Don't forget to separate all the details of city handling from the details of list management.

Hint: Each class should be in its own library. Other libraries may also be used for collections of useful functions.

This assignment is (Level 5).


Total Level Possible

If you did all above options, this project could be worth as much as (Level 19).