CS 4773 Object Oriented Programming, Spring 1998
Assignment 1

Due Tuesday, January 20


Assignment 1 has 6 parts.


Part 1:
Make sure your account is set up for compiling and running Java applets using Java version 1.1. Most of the applets you create in this course will not run under Java 1.0x because of the change in the event model. From your account execute the commands which javac and which appletviewer. The results should be similar to the following:
pandora% which javac
/usr/local/java/jdk1.1.5/bin/javac
pandora% which appletviewer
/usr/local/java/jdk1.1.5/bin/appletviewer
If you get something different than this, make sure your path contains /usr/local/java/jdk1.1.5/bin and that this is before any other directory containing Java development tools.

Part 2:
Make a private directory for this assignment and copy the files /usr/local/courses/cs4773/spring98/assign1/* into this directory. Edit the .java file and change my name to yours. You can compile the program with
javac ShowD.java
and run it with
appletviewer ShowD.html
or you can use the makefile which you copied.

Make sure that you can run this program successfully. This program is loosely based on the program in Section 1.20 of the text. Run the program and input 0.01 and observe the result. Next try the input 0.011. Think about why you got the result that you did.

Part 3:
If you have not already done so, set up a web page on your account. Make a directory in you home directory called public_html. The permissions on this directory should be drwxr-xr-x. Your home directory must also have these permissions.

Create a world-readable file in this directory called cs4773.html. This will be your course web page. I will use it to run your programs. You can use the file with the same name in /usr/local/courses/cs4773/spring98 as a model. Just change the appropriate lines. There are two places where my name should be changed to yours and one place where my username should be changed to yours. You may add additional information to this file, but it should be uncluttered and load quickly (no graphics).

Part 4:
Make an alias in your .cshrc file for hotjava:
alias hotjava /usr/local/java/HotJava1.1/bin/hotjava
Try it our and make sure you can get hotjava browser to run. Unfortunately, the netscape we currently have on our system will not run Java 1.1 applets.

Part 5:
Create a subdirectory under public_html called cs4773_programs and a subdirectory under this called assign1. Each of these should be world read and execute. Copy your .class and .html files into this directory and make sure they are world readable. Do not put your .java file in this directory. Make sure that you can run your applet from the hotjava browser. You should already have a link to it from your course web page.

Have a friend try out your applet from a different account to make sure that you set your permissions correctly.

If you are having trouble getting it to work and you think it might be a problem with the browser, go to the Prototype Course Web Page and try Assignment 1 from there. Note that currently very few browsers support Java 1.1 without additional patches.

Part 6:
When everything is working correctly, send me email telling me this so that I can try it out. If it is not working before the due date, send me email by the due date describing your progress.

Also in your email describe the results of running your program with inputs 0.01 and 0.011 and explain why the results are what they are. Also tell me what courses you took at UTSA last fall.

All email to me must have a subject line. The subject line for the email described above should be CS 4773 Assignment 1. If you are not prompted for a subject line when you send mail, insert the following alias in yout .cshrc:
alias mail mailx