The main components of this assignment are threefold - string processing, reading from files, and dictionaries.
Your assignment is to build a unit conversion program that reads all its conversion factors from a file and then alows a user to enter the units to convert from, the units to convert to, and the quantity. An example interaction follows:
Hello! I am a unit conversion program. I can convert many units to many other units. What would you like to convert from? I support the following units: feet miles meters yards inches What would you like to convert from? inches What would you like to convert to? meters How much would you like to convert? 74.5 74.5 inches in meters is 1.89230000193
The units file I would like you to read is conversion_table (you should download the file and read it locally. Dynamically updating it from the website would be extra credit...). Note that only half of the possible conversions are specified in the file, but the other half can be figured out. In the example above, note that we have the conversion factor from inches to meters in the supplied table, but asked the program to calculate meters to inches.
Good luck, and don't hesitate to contact me with questions. If you post comments below, I will be able to respond to you and then everyone else can read the answer and hopefully become less confused over time.
Ask me if there are any questions, and remember that elegance counts! peter@cs.uoregon.edu, or simply commenting below will all reach me immediately. Also recommended is coming in to office hours if you have any questions.
Turn your project in using the following form:
Questions? Answers!