Homework 7, Coordinate This
Short Description:
Write a program which allows a user to maintain a set of waypoints.
This assignment is worth 100 points.
Goals
When you finish this homework, you should:
- Strengthened your skills with c++ data structures.
- Demonstrated you ability to design, implement and employ classes.
Formal Description
A waypoint is a location, typically used for navigation. For the purposes of this assignment, a waypoint will consist of a name, a coordinate, and a description.
For this assignment, you should create waypoint and coordinate classes. Your classes should provide methods creating, modifying and interacting with the class. These methods should include the ability to compare instances
of the class.
To test your classes write the following program:
Read in a list of waypoints from the file specified as the first argument to the program. If no argument is given, read waypoints.wpt. This file will
have the following format:
- The name, a single word string
- Latitude, Longitude, two floating point numbers given in decimal degrees.
- The description, a multiword string.
You should store the waypoints in a list, as described in chapter 13.
Your program should then provide an interactive interface which will allow the user to perform the following tasks:
- Print all waypoints. This should be a readable report.
- Save the waypoints to a file, use a user supplied file name.
- Sort the waypoints by name.
- Sort the waypoints by coordinate.
- Find all of the waypoints within a given distance of a given waypoint.
- Add a waypoint to the list
- Delete a waypoint from the list.
Deriving the distance between two objects on the Earth is more complex that
this assignment requires, so A) Assume the points are close enough that the Earth is essentially flat and B) Just use the Euclidean distance between two points.
You should be able to print coordinates in three different formats:
- Decimal Degrees, angles between -180 and 180,
- Degrees and Minutes
- Degrees, Minutes and Seconds.
A handy conversion calculator is here You should allow the user to set the output format for coordinates in your main main menu.
Discussion
- You should follow the class documentation standards described in chapter 12. You program will be graded using these standards.
- You should have two class constructors for your coordinate class, one that sets the coordinates to 0,0 and another which allows the user to provide the default coordinates.
- You should do a preliminary design on this program.
- Your classes should be in separate specification and implementation files.
- You should create a sub-directory and perform all work for this project within this directory. This will make the creation of the tar file easier.
- If you need help, you should ask.
Required Files
You should submit the following in a tar file:
- All source code required to build all programs.
- A makefile which will build all programs as well as clean the directory
- A README describing
- Author identification information
- The project
- Problems encountered
- Any portions of the code which are not working.
- Any unique features of the code.
- Any other information you wish to share.
You should not submit
- Object files or executable.
- Core files.
- Source code files which are not related to the project.
Submission
Please create a tar file containing the files described above. Email this file to danbennett360@gmail.com by class time of the due date.