Machine Problem 1, due Feb 6

Part of the homework for CS:2820, Spring 2017
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 your current directory at the time you make the copy.)

Step 3: Edit your copy of mp1.java so it claims you as an author. Your @author tags should give your name, formatted as it is on your University ID card, followed by your section number (A1, A2, B3, or B4).

The official Javadoc web pages say that "multiple @author tags should be listed in chronological order, with the creator listed at the top."

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. Deletion of authorship claims will be considered to be academic misconduct. Equally, if you edit a file, you are entitled to claim authorship of the changes you made. In the case of this class, a properly formed Javadoc @author tag at the head of the file is required for you to claim credit for your work.

Step 4: Edit the @version tag to indicate the date at which you made your changes.

Step 5: Finally, edit the call to System.out.println() so that it outputs your name and section instead of no args!.

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 6: 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 7: Run the program with this command:

   [HawkID@serv15 ~]$ java mp1

And then run the program with this command:

   [HawkID@serv15 ~]$ java mp1 some more text

Step 6: To submit your work, it must be in a file named mp1.java in the current directory, and you must know your section number. In the following, what you type is shown in bold face. Begin at the linux command-line prompt:

   [HawkID@serv15 ~]$ submit mp1.java

The system will respond by prompting you (badly) for the course number:

   Course (22C:016 would be c_016): CS2820

The system will respond by listing the places you can submit. Pick the one that corresponds to your section and the machine problem number:

   Possible submit directories for /group/submit/CS2820 are:

   mp1/0A01
   mp1/0A02
   mp1/0B03
   mp1/0B04

   Choice:   mp1/0A01

The system will respond with a confirmation that your submission has been accepted (unless you made a mistake), and then it will return to the command-line prompt:

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

The confirmation message saying that the file has been copied tells you that the submission was successful. You may resubmit as many times as you want; each time you resubmit, your previous submission of that file will be deleted. The completed dialogue on your screen will look like this when you are done:

   [HawkID@serv15 ~]$ submit mp1.java
   Course (22C:016 would be c_016): CS2820
   Possible submit directories for /group/submit/CS2820 are:
   
   mp1/0A01
   mp1/0A02
   mp1/0B03
   mp1/0B04

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