Rules for Exercises
Past experience with checking of exercises has made it clear that
one has to be very strict with enforcing certain minimal rules.
Points and Deadlines
Unless otherwise specified, the value for an exercise is 3 points.
These points will only be given when the exercise is shown before the
deadline. Up to one week after the deadline, 2 points will be given.
Up to two weeks after the deadline, 1 point will be given.
Exercises that are shown more than three weeks after the deadline,
will not receive any points.
Solutions for exercises must be shown on a Linux system, and
the student must be able to run them on a Linux system.
Programs must be compiled by the following command:
g++ -Wreturn-type -pedantic -pedantic-errors -Wundef [name.cpp] -o [name]
I will not even look at solutions that are in unacceptable lay out.
It is not difficult at all to format code, so the only possible reason
for bad code lay out must be student lazyness.
The lay out of code must be such, that for
each while,do,if,try block, for each class or struct definition, for
every namespace, for every function definition, it is clearly visible
where its scope ends.
Lots of problems with code lay out are caused by the usage
of Windows tools that try to format the code by themselves.
Don't use such tools. Use vi, edit, nano, or gedit.
Exercises must be compiled with make.
Reference must be const wherever possible.
Wherever possible, const_iterator must be used.
Each class in a Separate File
Each class must have a separate .h and a separate .cpp file.
Each .h file must have an include guard.
Showing Code in Class
The teacher has a right to show code, written by students, in
class for educational purposes. If he chooses to do so, he
will not tell who is the author of the code, unless the author
is proud of his code.