Programming for Interactivity
Fall 2005
Professor: Bill Tomlinson
Tuesday and Wednesday 6:00-7:50pm
Also available at: http://www.ics.uci.edu/~wmt/courses/Prog4IntF05/Prog4IntF05Assignment1.html
Please write a graphical computer program in Java using a text editor and javac. You are encouraged (but not required) to use the following Java applet source code and web page, which has a low resolution grid and a number of useful methods already written for you.
http://www.ics.uci.edu/~wmt/courses/Prog4IntF05/Prog4IntF05Assignment1.zip
Specifically:
1)
Install the JDK (if necessary),
for example: JDK 5.0 Update 5 (for Windows).
With Mac OS, it comes pre-installed.
A suitable JDK is installed on all of the lab computers.
2)
Download and unzip the
zip file above to a directory of your choice.
3)
Open a Windows command
prompt (Start->Run->cmd) or Mac OS terminal
window in the unzipped directory.
4)
Run “javac BasicGraphicsSystem.java”. You may need to type the full path to javac, depending on your configuration – for example:
"C:\Program Files\Java\jdk1.5.0\bin\javac.exe" BasicGraphicsSystem.java
5)
Open index.html with a
web browser. The applet should appear
after a few moments.
6)
Open the Java console
to see debugging messages. How to open
the console is browser-specific. In Mozilla 1.5 (on lab computers), it’s Tools->Web
Development->Java Console. In Firefox 1.0.7, it requires installing an extension: https://addons.mozilla.org/extensions/moreinfo.php?application=firefox&id=141
In IE6.0, it’s Tools->Sun Java Console.
7)
Close index.html.
(This is important; otherwise the applet will reload the old code. There are different ways to force it to
reload in different browsers, but quitting the browser is the only way I’ve
found that is reliable across browsers.)
8)
Edit BasicGraphicsSystem.java using notepad, BBEdit, etc.
9)
Repeat instructions # 4
- 8 until the program does what you want.
If you use the BasicGraphicsSystem.java file, you should start by working with lines 41-49. It should not be necessary to add any code outside this method, although you are welcome to alter and add to the rest of the code as you see fit.
Please comment all code that you add so that it is clear what each section is doing.
Please email Bill (wmt@uci.edu) if you have any questions.
Please be prepared to demonstrate your graphics project in class on October 5. In addition, please email your source code (e.g., your modified BasicGraphicsSystem.java file) to Bill, along with a short description of any difficulties you encountered while completing the assignment, prior to class on October 5.