CISC 105 Project 1 FAQ

For each of the following questions, I'll give suggestions for "troubleshooting" the problem.

Notes from Sara:

You can look at your book for help in computing interest, but if the book confuses you, talk to me.

Debugging Help: Try small test cases to make sure your calculations are correct. Also add printfs--perhaps inside your loop--to identify where your calculations are going wrong.

COMMENTS! I am receiving a lot of code with little-to-no comments. Not only is the code hard for me to read and understand, it is probably difficult for you as well. You may want to review my example program and solution. I won't help unless I see that you clearly understand what you want the program to do. Describe in comments each step in your computations. Then, make sure that your code matches your description. If you can write down what you're doing, then you'll understand it better, and then you can write code to match your comments. After you have written a correct program, revisit the comments and determine which are still necessary to understanding the program.

Simplify! If you're having trouble, you may want to hardcode the values for payment, principal, etc to the example values and then try to compute the answer. Then, go through and add variables for those values. I'd rather you submitted a working program for 1 set of values than have a version that doesn't work for any values.

I am having trouble understanding the difference between a simple a loop and a for loop. We have to use a simple loop for the project. Could you help clarify this for me please?

The "simple" loop just means a "not-nested" loop. We haven't gone over nested loops yet. So, if you do a "simple" loop, you can either use a "while" or a "for" loop, whichever seems more natural.

How do I compile with the math library?

The command is cc -lm [filename]

Is the footnote on page 2 required?

No, it's just an aside for you to think about.

How exactly do you round off money? (to 10000.00 instead of 10000.00000)

You do not need to round. Just truncate the output to two decimal places.

Are we supposed to script our submission with input data not on the coversheet or do that on our own to make sure it works, then script the specific input data given to us?

Script with the given input data first... If you want to do additional testing to show me what works, mark it (with a pen or pencil on the script file) and test.

For the part on the coversheet about test data, what are we supposed to write in the "monthly" column for part 2?

You're not supposed to fill in anything except to check the "DONE" box. We'll check that you have the right results. (I was confused on that too!)

In the lab, where Professor Harvey says, "you will develop three functions using the same code", does that mean that we'll put all the different parts of the project in one file and use the switch statement with function calls?

Yes... Each of your programs will be in its own function that will be called from the switch statement.

For the project script file, do we only need to cat the menu part of the project? Since the menu has all 3 other programs embedded within it, cat-ing this file will display all the programs together.

No, cat, compile, and test all four programs separately.

Execute each of the first three programs with its required test data. Test the fourth program with at least one of the given test data sets for each menu option.

What should I submit to WebCT?

Submit all four .c files and the script file.