C++ exam rules
Examination Rules and Procedures
- IMPORTANT: comment your code a lot. If you do something
wrong but you meant something right, I can only understand it from
your comments.
- IMPORTANT: indent your code correctly, please.
- IMPORTANT: make sure your name and surname appear on all
submitted code (for example, in the initial comments to each
program file).
- In order to pass the exam you have to answer two questions
perfectly; if you only answer two questions, they cannot be
both of the same type (i.e. task writing, specification writing,
debugging). Further answers raise your marks (in a possibly
nonlinear way - I haven't decided yet).
- You have 2 hours to complete your exam paper.
- Answers to the questions are to be set as comments in the
code, either at the beginning (if they apply to the whole code) or at
relevant points in the code; prepend your comment with the proper
contextual setting, e.g. /* ANSWER TO QUESTION 1: This piece of
code answers question 1 because I say so*/.
- Paperless exam - instructions. Perform the following steps
to start/finish the exam. Be sure you understand them and know what
you're doing.
- Open a terminal window.
- Create a directory called your_login-exam (for example, if
your login is "terence" you would create a directory called
"terence-exam" under your home directory). Use the command
mkdir to create a directory with a specified name.
- Without entering your newly created directory (yet), perform the
command chmod 700 directory_name, where directory_name
is the name of your newly created directory. This will prevent other
people to look at your exam code.
- I will routinely check that you are
not putting any code outside of this directory during the
exam. Likewise, you cannot use someone else's login/pwd to gain access
to his/her protected exam directory, for I will also routinely check if
there are people logged in on any computer in the rooms with
connections coming from a different computer. If you get caught doing
that, start running and take your relatives with you. I'll hunt you
(and them) down to antarctica.
- Enter the newly created and protected directory using the
cd command.
- Start working.
- When you finish your exam, go up one directory level by typing
cd .. Check that you can see your examination directory (type
ls).
- Run the command: tar zcvf directory_name.tar.gz
directory_name/ replacing directory_name with the name of
your examination directory.
- Run the command pwd to see the current working directory.
- Send me your recently produced .tar.gz file by e-mail (from your
personal e-mail account) at both addresses lliberti@hotmail.com and leoliberti@yahoo.com, using the
current working directory (output of pwd command) as the e-mail
subject.
- Should email fail, I have set up an emergency procedure: transfer
your .tar.gz file to sil.polytechnique.fr (you can use
the command scp directory_name.tar.gz sil.polytechnique.fr:
it may ask you for your password on sil; don't forget the colon at the end
of the computer name), then ssh to sil (use the command ssh
sil.polytechnique.fr, again it may ask you
your password), then transfer your file again from sil to my
computer sonic.me.ic.ac.uk using the command scp
directory_name.tar.gz exam@sonic.me.ic.ac.uk - it will ask you for
a password which I'll give you in case the email transferring
procedure does not work.
- Be sure you sent your email within the 5 minutes following the end
of the examination.
- Don't leave the exam room until you receive my e-mail acknowledgement
that I have received your exam file. If you haven't received it within 5
minutes, come speak to me immediately to obtain the password for the
emergency transfer procedure described above.
- You may use any pre-existing material you may deem useful, such as
books, class notes, exercise books, internet tutorials, API
descriptions and so on.
- You may not copy any material conceived, written or communicated
during the time of the exam, with the obvious exception of
material produced from the teacher himself. A direct consequence is
that you can't contact your best C++ buddy who sits at home waiting
from your SMS/call/email in order to help you. Likewise, you cannot
copy from your mates in class. Any person caught at that will receive
a marking of 0/20 on the exam paper, as well as having to run away to
antarctica and beyond to avoid my wrath.
- Warning: if you get stuck on an exercise, don't waste too much
time, change to another!
- Warning: it is not easy to answer an exercise perfectly. In
fact, it's very unlikely that I won't find some negative comment in
any given exercise. In order for an exercise to be perfect you also
have to deal with boring things like catching exceptions, error
conditions, having enough arguments on the command line, providing a
minimum of help, checking if a file exists or not and having a
procedure for any error event, checking that numerical arguments are
within acceptable bounds, having a neat Makefile, and so on. I
therefore advise you to do at least 3 exercises to be sure to get a
pass mark.
- Warning: a program may not be perfect, or even correct,
even if it works on a few examples.
- Warning: are you stuck because your code doesn't
compile/run? Discuss the compilation errors, provide a detailed
description of your debugging session. You may still get credits.
- Warning: are you stuck on a technical implementation point
(i.e. you need a complex function and don't have time to write it)?
Isolate the problem in a separate function or method, give the
declaration, say what it should do in very precise terms, and do not
provide the function definition. If I think that your problem was a
technical one and not a conceptual one, you may still get credits.
- Warning: use all of your time, don't leave early.
- Warning: in order to answer the questions, you will need to
write code; this may include creating header or implementation files,
as well as Makefiles. Be sure you don't waste time on idiotic little
things like the UNIX commands for copying or modifying a file. Knowing
how to use these is a pre-condition to attending the C++ course.
- Warning: although you can NOT cut-and-paste from PDF files,
you may cut-and-paste from most HTML files.
You may now proceed to the exam.
May the source be with you.