3 base files are provided for you:
A Makefile is also provided to compile the above three files into an executable contig. (You must preserve all the tab spaces to get the Makefile working properly. There is exactly one "tab" right before "g++" and "rm".)
Type make at the unix prompt. The executable is called contig.
The following are the commands accepted by "contig" from standard input:
For example, we have the following data stream: NEW(1), NEW(3), OVERLAP(3, 1), NEW(4), OVERLAP(4, 1), NEW(5), NEW(7), OVERLAP(8, 1). Then, we have contigs: {1, 3, 4}, {5}, and {7}.
If you are typing the input manually, press ctrl-d to quit the program. Otherwise, you can automate the testing by providing an input file. For example, you input file is called test1.txt, you should be able to do the following at the unix prompt:
contig < test1.txt
sample.input and sample.output are sample input and output files.
DO NOT change the content of Makefile and main.cc. You only need to provide the implementation in contig.cc and contig.h.
You will need to submit your code BOTH on paper and electronically.
ON PAPER:
Please submit contig.cc, contig.h, and test cases (input and output) you used. Note the following:
ELECTRONICALLY:
We are only expecting two files: contig.cc and contig.h. The marker must be able to compile these two files using the provided Makefile and main.cc.
Do NOT use TAB characters in your source files. Use only spaces to indent your code, because different programs display TAB characters in different ways, so you can never be sure how much space one TAB character corresponds to. For example, if you print a file on CDF, TAB characters get converted to 8 spaces by default.
Each line must be less than 80 characters long, including TABs and spaces. Beware of "soft returns" -- some word processors, like WordPad, wrap lines automatically. If you use such a program, make sure that you press the return key yourself. If your editor doesn't display the line width, you can always make a line of 80 characters and paste it in to check whether you've gone over.
If you resubmit a file, that is the only copy we will have. Your old submission will be overwritten, including the timestamp, which means that we will have no way of verifying that you submitted on time.
Submission instructions
On fissure, use the following command to submit your code:
submit -N a4 cscc78f contig.cc contig.h
You are allowed to re-submit your code electronically.
(The existing submitted files are overwritten.)
But make sure you add a -f flag, i.e.
submit -N a4 -f cscc78f contig.cc contig.h
For further information, type man submit.
To submit from home, you will have to learn how to use FTP to transfer your files to your fissure account, and then log in to fissure remotely to run the "submit" command. You can find more information on this process by clicking on "Working at Home" from the CDF homepage. Note that it is NOT possible to submit files directly into the submission directory by FTP. You must first transfer the files to your user account, and then run the submit command from your account.