CSCE 2004 - Homework 1
Due Date - Sept 8, 2014 at 11:59 PM

1. Problem Statement:

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 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 and print 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 one 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.

2. Design:

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.

3. Implementation:

Since you are starting with a "blank piece of paper" to implement this project, it is very important to develop your code incrementally writing comments, 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.

4. Testing:

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 with several input values, and save your testing output in text files for inclusion in your project report.

5. Documentation:

When you have completed your C++ program, write a short report using the project report template 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 to be submitted electronically.

6. Project Submission:

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.

Rename your program and documentation files 123456789.hw1.cpp and 123456789.hw1.docx using your UAID number in place of 123456789, and go the Blackboard site for this class and submit these two files.

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:

You will receive partial credit for all programs that compile even if they do not meet all program requirements, so handing projects in on time is highly recommended.

7. Academic Honesty Statement:

  • Students are expected to submit their own work on all programming projects, unless group projects have been explicitly assigned.
  • Students are NOT allowed to distribute code to each other, or copy code from another individual or website.
  • Students ARE allowed to use any materials on the class website, or in the textbook, or ask the instructor and/or GTAs for assistance.
  • This course will be using highly effective program comparison software to calculate the similarity of all programs to each other, and to homework assignments from previous semesters. Please do not be tempted to plagiarize from another student.

    Violations of the policies above will be reported to the Provost's office and may result in a ZERO on the programming project, an F in the class, or suspension from the university, depending on the severity of the violation and any history of prior violations.