Assignment #3 - Unit Converter

Due Monday Feb. 12 at 3:30 PM

Your assignment is to implement a program that converts to and from various units of length. It should display a menu of units that can be converted into other units. When the user selects one, it should display another menu of the units that unit can be converted into. (Although your output doesn't have to look exactly like the sample, your program should perform the same conversions.)

Sample Output

Welcome to the Unit Converter!

What unit would you like to convert?
1. Meters (m)
2. Miles (mi)
3. Kilometers (km)
4. Feet (ft)
Enter choice: 1

Enter length in meters: 1234

What unit would you like to convert meters to?
1. Miles (mi)
2. Kilometers (km)
3. Feet (ft)
Enter choice: 3

1234 meters = 1.234 kilometers

Would you like to do another conversion? (Y/N): N

Thank you for using the Unit Converter.

Conversion Factors

1 m = .001 km = 3.28 ft
1 mi = 1.61 km = 5280 ft

Requirements

A design document (10 pts) is required for this assignment. It can be a set of steps, a flow chart, pseuodocode, or whatever else you used to design your program, and it doesn't have to be formal (i.e., it should be the piece of paper you actually did your design on).

You must perform appropriate error-checking. (For example, the choice from the top menu must be between 1 and 4. Don't worry yet about what to do if the user enters something other than an integer, though.)

Remember to turn in your source code, sample outputs, and electronic copies.