|
C M S C 1 1 4 C o m p u t e r S c i e n c e I S p r i n g 2 0 0 4 |
The primary input and output files can be found in the posting account in the project #0 directory. In particular several items to note are that the primary input file:
4*B + 4*A + 4*D + 4*B = 4*3 + 4*4 + 4*1 + 4*3 = 12 + 16 + 4 + 12 = 44and the credit sum is 16 - which results in 44/16 = 2.75
An example program demonstrating how to do this has now been posted
in the class posting account (in the project #0 directory) - the
program file is named
floatExample.cpp
and can be compiled on the class cluster.
When you come to see someone in office hours for help on your project,
you should always bring a current printout of your code and if
possible a printout of the compiler error messages (if there are any) and
if it compiles a printout of the programs output (and the input used to
generate that output). If you want to get the output of the compilers
error messages you will need to redirect error output as follows:
Having the requested information above will assist the instructional staff
in being better able to assist you and others who are waiting to be
assisted. Please also understand that the office hour room is a shared
resource with other classes and we ask that you be respectful of the
room and others using the room.
Another VERY IMPORTANT thing to do prior to going to office hours is
attempt to "debug" your code as much as possible when you have a problem
and that way when you see the TA you can point to the line (or lines) of
code causing the problem (it should typically only be one line) and
explain to them what the problem is and hopefully they will be able to
figure out the problem (and a solution) and explain it to you so that
you can determine how to fix it. When "debugging" code you can either
attempt to use a debugger (details of which will be posted with later
projects) or just use good old fashion debug cout (or cerr) statements:
Unfortunately we can not do this and you will have to start over
from the beginning. The system staff does keep backups in the case
of catastrophic loss, however it is not possible for us to obtain
individual recovery of recently created/deleted files.
A FAQ is a list of Frequently Asked Questions
and in particular the FAQ's for projects in this class will have
questions listed in reverse chronological order (meaning the most
recent question will appear at the top of the FAQ list and the
first question asked/answered will appear at the bottom of the
list).
Note that the FAQ's that are posted are usually ones that the
instructional staff have created in anticipation of potential
questions and ones that have been encountered frequently by the
instructional staff while assisting students in office hours.
Per the policies outlined on the syllabus you should see one of
the instructional staff during office hours regarding all questions
on projects - this includes project #0. Note that any email
inquiries concerning projects may go unanswered.
Also you should always read the corresponding FAQ prior to asking a
question on a project and you should generally ask no questions the
first day that a project is posted - rather you should thoroughly
read over the project description and think about it for a while.
Project #0 is due by 8AM on Friday, February 6th, 2004. Note:
any project may be turned in late up to 2 days as specified on the
class syllabus. For details regarding the late policy and any
penalties associated with submitting late projects please see the
class syllabus.
% cxx proj0.cpp >& my.comp.errors
and then the text file "my.comp.errors" will contain your compiler errors
(note: if you changed your Unix shell the above may not work).
cout << "GOT THIS FAR" << endl; // very important to use endl;
someFunctionCall();
cout << "DIDN'T GET THIS FAR" << endl; // and cout is recommended over cerr
and if you see the first line get printed but not the second one, then
the problem may lie somewhere in the function call. It is a straight
forward concept, however in prior semesters we have seen a number of
students come to office hours without doing any debugging on their own
(either with a debugger or with cout's).
|
See the class syllabus for policies concerning email Last Modified: Sun Feb 1 11:10:24 EST 2004 |
|
|
|
|
|