Assignment 1, due Jan 22

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

On every assignment, write your name legibly as it appears on your University ID card! Homework is due on paper at the start of lecture on the day indicated (usually Friday). Exceptions will be made only by advance arrangement (excepting "acts of God"). Late work must be turned in to the TA's mailbox (ask the CS receptionist in 14 MLH for help). 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) = f(i-1) - f(i-2)
    

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

  2. Background: If you do not have a CLAS Linux account, create one. The instructions are here:
      — http://www.divms.uiowa.edu/clas_linux/
    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 linux.cs.uiowa.edu using either an SSH client or FastX

    You can get to FastX with the following link:
      — http://fastx.divms.uiowa.edu
    Note that FastX just opens a remote Linux desktop. If you use the XFCE desktop, you can open a terminal window to get to the same command line interface that you use with an SSH session.

    To make an SSH connection directly from a Mac or Linux system, open a terminal window locally (terminal is an application, a system utility), then type this command
        ssh linux.cs.uiowa.edu -l HawkID
    with your HawkID substituted for HawkID in the command. Access from off-campus requires an additonal parameter. We will discuss this in class. It is almost as easy from a PC, where you must launch either the PuTTY or SecureCRT application and then fill in a form with the system name and HawkID.

    For additional guidance, see:
      — http://www.divms.uiowa.edu/clas_linux/help/start/remote.html

    A question: Use a shell window on the CS 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)

  3. Background: In the introduction to the textbook, a link is given for an on-line web page where you can get "the Java language and libraries from Sun Microsystems (a free download)". If you type that URL into your web browser, it is automatically changed to a different URL.

    A question: What is the URL for the web page you get to?