|
C M S C 2 1 4 C o m p u t e r S c i e n c e II F a l l 2 0 0 4 |
Several other test inputs/outputs have now been provided and are in the posting account in the following directory:
~fjm14001/Projects/P0/OtherSamples/Also a file showing how you can print floats to a fixed number of decimal places is available in:
~fjm14001/Projects/P0/Misc/And finally the "checkMemory" program does not properly work as discussed in class today and more information about that is posted in the following file (in the posting account):
~fjm14001/MemoryTool/UPDATE.readme
No. Any program you write should not have memory leaks - meaning that if your program dynamically allocates any memory, it must also safely/correctly deallocate that dynamic memory. This was implicitly assumed in the project description however a few people thought that it would be ok if their program had a memory leak (or "didn't clean up after itself") and thus it was deemed necessary to explicitly state here that this was not permitted.
Based on this it is
very likely that you must write the code for the destructor for the
CourseList class as well as the the code for the copy constructor and
the operator=. You do not have to write these,
but note that it is very highly likely that you will have to write at
least one of those three functions (if not all of them) otherwise
your program will have a memory leak.
There are several ways to print files:
The one downside to the free printing is that in order to pick
up the printout(s) you must go to room 1299 of the AVW Williams
Building (which is open 24 hours a day and is in the outside
corner of AVW closest to the Engineering/Math Buildings).
One closing note - the csc-ps printer using the command above will
print double sided. It is possible to print single sided but to save
paper/money it is recommended to print double sided - if you really
want to print single sided ask the people how to do this when you
pick up your printouts from 1299 AVW.
Yes, the two header files were very minimally changed - in particular the
final line (#endif) was changed from (#endif CSLL_H) to (#endif) - this
was due to compiler warnings that were generated by the header files
with this extra "token" on the #endif lines. This was corrected by
approx. 2pm on the day the files were posted.
As for where should the comment with your name and other information
go, it should be placed at the top of every .cpp (source) file you create
and in no other file. Note that this is a policy for this course only
and in general you would probably also put identifying information of
your own inside the header (.h) files as well (but again that is not
the case in this class). You should delete the comment that already
appears at the top of the two provided .cpp files and insert your
own. You should not modify the .h files except as permitted by the
comments inside those files.
No. You do not have to write them all or use them. You must however
leave the prototypes in the header file. None of them will be
individually tested.
Hopefully it is obvious that not all of them are needed (for example
printForward or printBackward are not needed - and the same may be
true for other ones). Note however that some of them may be needed
(the ctor for example) and you should write those if they are
necessary for your code to work properly.
Your program will be compiled as specified on the project description
and tested that way only (by inputting a "transcript" and viewing its
output). Your source code will be checked to make sure it uses the
linked list appropriately.
Also you may have noticed that there is a member function
named cmsc214 - you should not remove this prototype and you
should not write this function. In the automated testing of your
program WE may write this function and use it to test/check various
aspects of your code (you should not worry about this at all as it
will be used very minimally, if at all, in this project).
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 11PM on Thursday, September 9th, 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.
As for how can you print the project description that is a little
harder - in particular the official project description is only
available via the class webpage and it is not in the posting account
and thus can't be printed from the posting account. HOWEVER per
request the project description webpage will be saved as a postscript
file (using a UNIX web browser) and will be (is) available in the
Posting account in a directory named PrintableFile in the
Project #0 directory - you can print this file to the csc-ps
printer using the command above. DO NOT PRINT THIS TO THE lpr
printer as it will not work correctly and will waste many pages of
paper.
qpr -q prl <filename>
or:
qpr -q csc-ps -x <filename>
where <filename> is the name of the file you want to print
for example qpr -q prl csll.h would print out the file
csll.h to the line printer (which is wide paper
with each page connected). If you print to the csc-ps "queue"
(printer) then it will be on "regular" paper.
% cxx main.cpp csll.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: Wed Sep 8 15:41:03 EDT 2004 |
|
|
|
|
|