Java Coden: Assignment 3

update your CVS list with everyone's files
The recipe for this being:

cd ~
cvs co JavaCourse

If you haven't added your own directory in here yet, do so and then add it to CVS. The recipe:

cd ~/JavaCourse
mkdir yourid
cvs add yourid
cvs commit

When ever you add a new file or directory and you want to put it into the CVS repository, you need to issue the "cvs add filename" command, and then follow it with "cvs commit" command. Updating that file simply requires "cvs ci filename".

Build some code:
Build some code that deals with exceptions
  • create a java application called "Time" that takes two arguments:
    • a host name
    • a port number
  • using this information, open a TCP socket to that host name and that port and read back the data and display it
  • catch the errors using a try{}catch{} setup and quit the program gracefully
  • Test your program against hostname sp2n3.missouri.edu, port 13. This should return the current date and time.
  • Check in your code to CVS

Java Coden: Assignment 2

Check out the JavaCourse CVS tree
Some of the details on using CVS can be found at: http://web.missouri.edu/~heckj/courses/java/2.html

create your own directory (i.e. like heckj) under JavaCourse and check it in.

Build some code:
Create a linked list:
  • Create a linked list of Articles, using JavaCourse/heckj/Article.java
  • Once you've created your program, get it into your directory and check it in to CVS (before class).

Java Coden: Assignment 1

Isn't this how all computer classes start out? Yup, you guessed it... this is the Setup Assignment.

Get a copy of SSH
The box we're developing on doesn't have Telnet, and no - we're not going to turn it on. It also doesn't have an FTP server running on it. That means to connect to this box, you'll need to have an SSH client or figure out a sneaky trick to get around this. It's possible, but I'm not going to explain how. We'd all be better off if you find yourself an SSH client and install it on your desktop of choice.
If you develop straight on the box, you won't have to worry about FTPing files. That's also a pain, unless you really like vi, emacs, or pico. I'm all for developing in whatever environment you like (I prefer the Metrowerks IDE), but then you'll need to transfer the files. You can do this with SCP, or you can FTP the files using a text based FTP client on DOC, but you can't connect with FTP "to" this machine, as it's not running an FTP server.

Log in
Connect to "doc.missouri.edu" and make sure you can get into the box. This is one of our Linux boxes (our development box for IATS.missouri.edu to be specific), so use your SSO id and password. If you can't... well, then you're going to have trouble compiling programs here, and in general have troubles keeping up with the class.

Compile a java program
Here ya' go. The everyone's-favorite-to-make-sure-you-can-compile-program: HelloWorld.

public class HelloWorld {
  public static void main(String args[]) {
    System.out.println( "Hello World!" );
  }
}

Compile it. Run it. Feeling particularly brave? Modify it and try out a few things.

Research:
Figure out how to take a string variable and convert it to an integer. I.e. you start with:
String data;
int i;
data = new String("123");

and get "123" into the integer "i".
Hint: look around the JDK 1.1 API

Dust off those programming algorithms:
The next assignment is going to be creating a linked-list in Java.

Got questions?
Good. Bring'em to the next class session and we'll get them out on the table. If you have a question, probably someone else does too.
-joe