Algorithms and Data Structures I Submitting Assignments We have developed an "assignment submission" tool to help with encrypting and submitting jar files. Essentially, you will write your stuff in a directory, jar the directory, copy the jar file to your submit directory and run our tool on the jar file. Note: all submissions are to be done on hobbes. Before we get to submissions, you should create a directory for this course under your home directory:
% cd
% mkdir cs133
(Don't type the percentage symbol - that's there merely to show the Unix prompt). Here's how to submit an assignment, using the first exercise as an example. Substitute your actual Unix username in place of username below. For the first exercise, create a directory under your cs133 directory called username1. Example: if your username is beavis, your directory will be named beavis1. Select an 8-digit encrypting key using ONLY alphabets and digits, for example qfgk9816. Email this to the TA (all TA's, if there are more than one) and DO NOT share this key with anyone. Now, let's assume you've written your code for the first exercise in cs133/username1. Go to your cs151 directory and type the following command:
% jar cvf username1.jar username1
This "jars" your username1 directory into a single jar file. You should see a username1.jar file in your cs151 directory. Next, encrypt:
% java -jar ~simha/submit/submit.jar -e qfgk9816 beavis1.jar beavis1.jar.crypt
Of course, you should use your crypt key above. Here, the -e option specifies encryption (as opposed to decryption with the -d option). Place the encrypted version in a subdirectory called /submit (a subdirectory off of your home directory).
% cp beavis1.jar.crypt ~/submit/.
Make the crypt file accessible:
% cd
% chmod a+rx submit
% cd submit
% chmod a+r beavis1.jar.crypt
At this point, the TA will be able to copy over your encrypted file, decrypt it, and un-jar it to test your code. Anyone else can copy over your crypt file, but should not be able to decrypt it. Important: You should follow the instructions closely, else we will not be able to access your file, for which you will lose points. Important: Use the same key for future submissions. Do NOT make other directories/files accessible. (Points may be taken off if this occurs). If specified, submit a printout (hardcopy) of your code before the due date either in my mailbox, in class, or slip it under my door. In your submissions, please include only your Java source files (not class files, since we will compile). You may include other files only if directed to do so in an assignment/exercise.