Machine Problem 1, due Feb 8

Part of the homework for CS:2820, Fall 2015
by Douglas W. Jones
THE UNIVERSITY OF IOWA Department of Computer Science

Step 1: Log onto the CLAS linux server

Step 2: Get a copy of mp1.java by executing the following shell command:

   [HawkID@serv15 ~]$ cp /space/dwjones/mp1.java mp1.java

(Explanation: The cp shell command means copy. It takes two arguments, the source and destination file names. In this case, the source file name is long because you're copying from a different user's directory, while the destination file name is short, mp1.java in whatever is the current directory at the time you make the copy.)

Step 3: Edit your copy of mp1.java so it claims you as an author. The official Javadoc web pages say that "multiple @author tags should be listed in chronological order, with the creator listed at the top."

In general, it is unethical to delete the record that someone was an author of a file or to claim authorship without acknowledging others you know to be authors. Equally, if you edit a file, you are entitled to claim authorship of the changes you made. In the case of this class, you are required to claim authorship in order to earn credit for your work, and you are required to use the Javadoc comment format in order to claim that credit.

Also edit the @version tag to indicate the date at which you made your contribution

Finally, edit the call to System.out.println() so that it lists just your name instead of Douglas W. Jones.

Those are the only changes you should make to the code! Half the point of this exercise is to show that you can make changes to a Java file without breaking it or making unnecessary changes.

Step 4: Compile your Java program with this command:

   [HawkID@serv15 ~]$ javac mp1.java

If you made no errors, there will be no error messages. If you made errors, the error messages always indicate the source file name and the line number, as well as a shippet of text. It may be faster to go back to step 2 than to try repairing any damage you made.

Step 5: Run the program with this command:

   [HawkID@serv15 ~]$ java mp1

If it runs correctly, it should read, decrypt and print a file named /space/dwjones/mp1data, producing a quotation from a famous Oxford mathematician. You are welcome to make your own copy of this file using the cp command in order to see what the input to mp1 looks like.

Step 6: Submit your program. Make sure it is in a file called mp1.java in the current directory. Then, follow the following dialogue with the Linux shell (what you type is given in boldface, please use the section number in which you are registered):

   [HawkID@serv16]$ submit mp1.java
   Course (22C:016 would be c_016): CS2820
   Possible submit directories for /group/submit/CS2820 are:

   0A01/mp1
   0A02/mp1
   0A03/mp1

   Choice:   0A01/mp1
   mp1.java
   * File/directory mp1.java has been 
   *  copied to /group/submit/CS2820/0A01/mp1/mp1.java.HawkID.
   [HawkID@serv16]$ 

The final output ("File ... copied to ...") is your confirmation that the file was successfully submitted. If you do not get this output, you have not successfully submitted your work. If you get this output, your work has been submitted.

If you make multiple submissions, only the last successful one will be counted. The date of your final submission must be before midnight on the due date.

Note that the submit program doesn't know what section you are in. Please give your section (0A01, 0A02 or 0A03). You must know what section you are enrolled in!