San Jose State University
CS 185C/286 - Mobile Programming
Cay S. Horstmann
Spring 2013
Prerequisite Quiz
Please email to Cay.Horstmann@sjsu.edu
with Subject Prerequisite Quiz Lastname, Firstname
(where, of course, Lastname, Firstname
is your name, as it appears in the SJSU records), with answers to the following questions:
- Provide the following information:
- Where/when did you take a Java programming course?
- Where/when did you take a C programming course?
- Are you an undergraduate/graduate/open university student?
- What is your major?
- Do you have access to a Mac laptop? (It's ok if you don't—I want to find out how much iOS lab work we can do.)
- Provide a Java program that has a single command-line argument which is a URL, assumed to be to an XHTML file. Open the URL and print to standard output the values of any
src
attributes of img
elements in the file. For example, running java Prequiz http://horstmann.com/index.html
would produce the output
images/cay-rowing.gif
images/violet.jpg
images/zork1.gif
- Provide a C program
prequiz.c
that does the same, except that it reads from standard input, not a URL. For example,
gcc -o prequiz prequiz.c
curl http://horstmann.com/index.html | ./prequiz
would yield the same output.
- Generate an SSH key pair, as described in steps 1 - 3 of this article. Make a copy of the
id_rsa.pub
file to a file Lastname_Firstname.pub
and attach that file. Really make a copy—if you rename the file, you will live to regret it.
- Install the git command-line client and clone the repo at https://github.com/cayhorstmann/cinequest. If you are running Windows or Mac OS, first install VirtualBox and a Lubuntu virtual machine. Install git with
sudo apt-get install git
, and then run git clone https://github.com/cayhorstmann/cinequest
. Submit a screen capture gitclone.png
of the terminal after the clone operation.
- Attach a screen capture of your Piazza profile that shows your picture.