The goal of this programming assignment is to give students experience performing numerical calculations and using input/output in C++. Your task is to write a program that will convert length/mass/time between the well known meter/kilogram/second SI system, and the obscure and outdated furlong/firkin/fortnight FFF system. See the Wikipedia page for the humorous history of the FFF system and the unit conversion factors. For this assignment, students can choose to convert values from FFF units to SI units, or the opposite from SI units to FFF units.
If you choose FFF to SI, your program should prompt the user to enter three values: a length in furlongs, a mass in firkins, and a time in fortnights. Then, your program should convert these values into meters, kilograms, and seconds respectively, and print out these values. Next, your program should calculate the FFF velocity (furlongs per fortnight) using the values above and convert this into the SI velocity (meters per second) and print out both velocities.
If you choose to convert SI units to FFF units, you will prompt the user to enter three SI values, and perform the calculations to output three corresponding FFF units. The velocity calculation will also be reversed. Your program should calculate the SI velocity (meters per second) and calculate and print the FFF velocity (furlongs per fortnight).
Finally, your program must output a wacky conversion of the FFF or SI values into different units. For example, you could print out the distance in kilofurlongs, or the mass in microfirkins, or time in nanofortnights, or the velocity in kilofurlongs per nanofortnight. Whatever you think is fun. In your program output you should explain what your wacky units are.
For this assignment, the first design task is to decide how to read input data from the user -- what order to read FFF or SI values, what prompts to use, what variables to use to store values. The next task is to decide on how to implement the conversion formulas from FFF to SI or from SI to FFF. The only tricky part is the wacky unit conversion. The final design task is to decide how to present the results to the user -- what the messages should say, where the values are displayed. Make sure you write comments in your code to explain your design decisions.
You can implement this program using either a bottom-up approach or a top-down approach. If you go for a bottom-up approach, start by creating basic methods and classes, and test theses methods using a simple main program that calls each method. When this is working, you can create the main program that uses these methods to solve the problem above.
If you go for a top-down approach, start by creating your main program that reads user input, and calls empty methods to pretend to solve the problem. Then add in the code for these methods one at a time. This way, you will get an idea of how the whole program will work before you dive into the details of implementing each method and class.
Regardless of which technique you choose to use, you should develop your code incrementally adding code, compiling, debugging, a little bit at a time. This way, you always have a program that "does something" even if it is not complete.
Test your program to check that it operates correctly for all of the requirements listed above. Also check for the error handling capabilities of the code. Try your program on 2-3 input values, and save your testing output in text files for inclusion in your project report.
When you have completed your C++ program, write a short report (less than one page long) describing what the objectives were, what you did, and the status of the program. Does it work properly for all test cases? Are there any known problems? Save this report in a separate text file to be submitted electronically.
In this class, we will be using electronic project submission to make sure that all students hand their programming projects and labs on time, and to perform automatic analysis of all programs that are submitted. When you have completed the tasks above go to the class web site to "upload" your documentation (a single pdf or txt file), and your C++ program (a single cpp or txt file). Do NOT upload an executable version of your program.
The dates on your electronic submission will be used to verify that you met the due date above. All late projects will receive reduced credit: