Applets Assignment

See this link for Assignment Policies, Submission Instructions, and Grading Guidelines.

Instructions

1.     Problem: Write a Java applet. On jGRASP, you need to compile your applet by pressing the green plus sign button. You need to run (execute) your applet by pressing the red apple button.

2.     Your applet should be an original & creative drawing that uses at least 5 shapes & 1 text message. The drawing should be something recognizable, such as a face, car, animal, etc. It should not be an abstract drawing. Also, you should use at least one oval, one rectangle, and one line.

3.     The name of your Applet file should be in the format: LastNameFirstNameX.java. This should also be the name of your class that you use in your program.

4.     Write an HTML page using a text editor such as jGRASP, textpad, or notepad: The HTML page should display your name (Last Name, First Name), assignment, and date.  Then the HTML page should display your applet. The name of your HTML page can be anything you like, but it has to end with .html. 

5.     Sign up for a UH UNIX account: If you don't have a UNIX account, you can apply for an account at the ITS help desk on the ground floor of Keller Hall, or apply online at www.hawaii.edu/help/accounts.

6.     Set up your personal homepage on UH UNIX: This is a one-time process that you should do in order to set up your personal homepage at UH.  If you already have your webpage setup, then you do not have to do this. The URL (Uniform Resource Locator) of your page will be in the form: http://www2.hawaii.edu/~username. For example: Jane Doe with UH Username jdoe would create a homepage at www2.hawaii.edu/~jdoe.(Note: The default file that gets loaded when somebody browses your Web page is'index.html' and exists in a subdirectory called 'public_html' in your home account.)

7.     The Personal Homepage Management Utility: The Personal Homepage Management Utility is a menu-driven, web-based method you can use for such things as creating a simple new homepage (index.html), making your default homepage (index.html) Web accessible, and disabling Web access to your homepage. Log in with your UH Username and password and follow the on-screen instructions: Open the Personal Homepage Management Utility (in a new window) (to continue, click here, log in, and click 'Create Home Page')

8.     Install SSH on your computer: SSH stands for Secure SHell. It is a way to transfer encrypted files over the Internet. You can download SSH (and other software) from the UH ITS software page. SSH has copy and paste, but it works a little differently from usual windows. You can select something with your mouse and then copy (but not cut) the selected text. Then when you paste, the text is inserted where the cursor is, not where the mouse pointer or selection is.  You can also make multiple windows quickly and easily.

9.     Mac software: Two programs for transferring files are Fugu and Captain FTP. For Fugu, fill in the following fields: “Connect to” is “uhunix2.its.hawaii.edu”. “User name” is the name that appears before the @ on your UH UNIX e-mail address (For example, if your UH email address is 'suzuki@hawaii.edu', your user name would be 'suzuki'.) Your password is the same as your e-mail password. For CaptainFTP, click “Remote” & select “Quick connect”. A window should appear. “Hostname or address” is “uhunix2.its.hawaii.edu”. “User” is the name that appears before the @ on your UH UNIX e-mail address (For example, if your UH email address is 'suzuki@hawaii.edu', your user name would be 'suzuki'.)  Do not check “passive mode” or “use proxy (firewall) server”. “File name encoding” is “Default (ISO 8815-1)”. “Protocol” is “SFTP”. Your password is the same as your e-mail password.

10.  Logon to UH UNIX: SSH has two windows – a "File Transfer Window" and a “Terminal Window".  The File Transfer Window is useful for transferring files between a computer and your UH UNIX account.  It is also useful for manipulating the files and folders on your UH UNIX account. (The Terminal Window is a command line interface. It is also useful for manipulating the files and folders on your UH UNIX account, but you have to use certain command words.) Click on the File Transfer Window. A "Connect to Remote Host" window should appear.  "Host Name" is “uhunix2.its.hawaii.edu”, "User Name" is the name that appears before the @ on your UH UNIX e-mail address (For example, if your UH email address is 'suzuki@hawaii.edu', your user name would be 'suzuki'.)  Port Number is 22, and Authentication Method is “Password".  Then press the "Connect" button. An” Enter Password" should appear.  Type in your password (Your password is the same as your e-mail password.), press the OK button, and then you should be logged on to UH UNIX.

11.  Post your HTML page & Appleton your web page: On the File Transfer Window, double-click on the public_html folder. On your computer, find the folder where your HTML page (MyPage.html) and applet class file (MyApplet.class) are stored. Drag the two files on your computer to your public_html folder. Note that you do not put your MyApplet.java file on your web page.

12.  Permissions: Directory public_html and all other directories within public_html should have permissions set to 755. Your .class file and .html file (and any other web pages that will be visible on the Web) should have permissions set to 644. (For SSH, right click on the file. For Fugu, click the file & then click the “i” or “info” button, or right click on file & then click “Get info”. For Captain FTP, right click on file & then click “Get info…” & then click “permissions”.)

13.  Viewing your Applet on the Internet: Use a browser to locate your HML page & view your applet on the Internet. The URL (Uniform Resource Locator) of your page will be in the form: http://www2.hawaii.edu/~username/MyPage.html    

14.  Ctrl-Refresh: After you make changes to your Applet code, press the control key on your keyboard and the refresh button on your browser in order to reload the Applet code into your browser. This does not work on all browsers, so you may have to clear the browser's history, and reopen a new browser in order to see the new Applet.

15.  Assignment submission e-mail: In the top comments section of your program, include the link to the HTML page that displays your applet. Also attach your applet source code (LastNameFirstNameX.java). Do not attach your class file (LastNameFirstNameX.class).

 

 

 

© 2007 William Albritton