Lab 3 - January 28

 

Note:  The login / password that you signed up for is for using the computers in the lab.  This user name / password is only for gaining access to the lab computers, and has nothing to do with logging into UH UNIX.  Also, be careful and make sure that you logout from the computers when you leave the lab or other persons may see your stuff or use your account to do "bad" things.

To receive credit for this lab assignment, you must be finished by Tuesday, January 28, at 10:00 p.m.  After this time you will not receive any credit.

 

Instructions:

1.  Login to UNIX (Secure Shell in Windows)
    - If you're at home, a good program to use to connect to UNIX is Putty (click here to download).  The putty program is executable and doesn't need to be installed.
    - Host name is:  uhunix2.its.hawaii.edu
    - Your user name is the first part of your UH e-mail address.  If your UH email address is 'frank@hawaii.edu', your user name would be 'frank'.  Your password is the same as your e-mail password.

2.  Open the Hello World program that you did for lab 2.  If you don't have what you submitted, refer back to lab 2 to recreate what you submitted.

3.  Modify the program to use some of the String methods discussed in class.  Take your pick of any four of the String methods and incorporate them any way into your program.  However, you may want to try all of them so you are familiar with them all, but what you turn in (for credit) needs to show that you are using a minimum of four of the methods.

For example, in your Java program, create a string:

    String s = "I love programming";

And then do at least four of the methods described in class.  For example, do make the above String upper case, you could do the following:

    String t = s.toUpperCase();

Where the result of making String s all upper case is stored into the String t.

To prove that you used a method, use print statements like the following:

    System.out.println("String before upper case:  " + s + ", String after upper case:  " + t);

   

*** Note, to use string methods, you will probably need to create an import statement at the top of your program that imports the String methods.  (import java.lang.String;)

For complete details on the Java API, see this link- here you can look up all the String methods, or any methods of any class you would like to use.

4.  Get into Pine (Getting Started with Pine, PDF)

5.  Attach the file to an e-mail (See pages 11-12 in Getting Started with Pine, PDF)

- control <J>, then control <T>allows you to browse and pick the file that you wish to attach

6.  Send the file to ics111-lab@hawaii.edu account.

7.  Check the webpage to make sure that the e-mail arrived.  Note that this will be sent to the ICS 111 lab address (ics111-lab@hawaii.edu).  This one is different from the ics111-homework@hawaii.edu.  There are two different ones so we can have homework assignments and lab assignments separate.

Here are the URLs:
http://www2.hawaii.edu/~tp_200/bmf/ics111-homework.html
http://www2.hawaii.edu/~tp_200/bmf/ics111-lab.html

11.  Once I (TA) get the e-mail in my account AND I can verify it on the web, you will receive your lab participation point.

 

* Some may argue that it is easier to do this from WebMail. If you e-mail your homework from webmail, it means that you're not positive that it runs / works properly in UNIX.  This could result in point deduction if your stuff doesn't work properly.