Assignment 1, due Aug 25

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

Assignments are to be turned in on paper. On every assignment, write your name, course and section number at the top. Write your name as it appears in your university records! Use the section number for which you are registered! We will not do detective work to figure out who did what. Work must be legible. Homework is due on paper in discussion section, usually at the start except when the assignment indicates that time to work on the assignment will be provided in class. Exceptions will be made only by advance arrangement with your TA (excepting "acts of God" outside your control). Never push homework under someone's door!

  1. A test of your understanding of the prerequisites: Consider this recursive integer function. All operators here are integer operations. This is an informal mathematical definition; it is not coded in a programming language:

    if i < 2, f( i ) = i
    otherwise f( i ) = i + (i – 1) + f( i – 1 )

    A Question: Give the values of f(0) through f(9). (1.0 point)

  2. Background: In the introduction to the Eckel's textbook, he says what version of Java he uses.

    A question: What version is this? This is a scavenger hunt question to get you to look at the text.

  3. Background: If you do not have a CLAS Linux account, create one. The instructions are here:
    Follow the instructions there for "Create a CLAS Account". Note that this is easier from on campus, for example, in one of the Information Technology Centers, because if you are off campus, you will have to tunnel through the University's firewall using a VPN. (The link for how to set that up is there too, but it will take time, so don't let the VPN issue slow you down.)

    Use your account to sign in to using FastX. The following link takes you to FastX:
    FastX opens a remote Linux desktop. The MATE desktop has an icon at the top to let you open a command line shell interface in the a terminal window.

    When it is time to end your session, the exit shell command will close your terminal window. To close your FastX session and log out of Linux, click on the LogOut button in the System pull-down menu on your Linux desktop.

    For additional guidance, see:

    A question: Use a shell window on a CLAS Linux machine. Type the following command:
      [HawkID@serv16 ~]$ ~dwjones/object
    (Boldface in the above is the command you type, non-bold is the prompt from the system; type the requested text verbatim, do not change a thing.) Report the output you got. If you did not make it all the way to the point where you could do the above, report how far you got. (1 point)

    Time will be provided in the discussion section to help those who have trouble with this. The rest of time will be spent demonstrating the Java hello-world program on the CLAS Linux system.