[Index of weekly notes, Previous week, Next week, All Notes]

ILS 614 (Winter 96/Weymouth)

Week 1: Introduction

In this class meeting I will cover the following topics:

Summary of Readings:

Assignment: Next assignment, the HelloWorld application, is due: at the start of class on Thursday, January 18, 1996.


Notes

The background on this class

This class is an experiment: an introduction to Java based on the concepts of object oriented programming. It is being taught for the first time this semester as a special class to evaluate, in part, whether this topic is a useful topic for the SILS(+) course catalog.

During the semester we will explore some of the basic concepts in Object Oriented Programming with lots of examples and lots of practice in programming java.

Your goal for this class (if I may be so bold) is to learn to do be able to program interactive application and browser interfaces using Java. You will also want to learn the basics of object oriented design and programming. These two goals go hand in hand. You can not program will in Java without understanding object oriented design and programming.

I have laid out a plan for the class, but will undoubtedly have to modify it over time. The later we get in the semester, the more accurate (and irrelevant) this plan will become.

I make only the following assumptions about your background knowledge:

A few things that will be helpful (and that you will have to pick up on your own, during this week, if you do not know by now):

How to get an A+: What's required.

Your grade will be determined using the following distribution: short assignments (10%), two programming assignments (15% each for 30%), project (20%), mid-term (15%), and final (25%). To make things easy, 100 points will be distributed over these assignments by percentage.

We will start out with a series of short weekly assignments for the first four weeks. These will be evaluated, on a three level system: Satisfactory, Excellent, Redo. No short assignment with an evaluation of "Redo" will be excepted: I expect everyone to get at least a satisfactory evaluation on these assignments as they will be used to introduce and evaluate basic skills. All "satisfactory" evaluations will give you 9 points for the set. At least one "excellent," with the remainder being satisfactory will give you 10 points for the set. You get an excellent for doing something extra. Two (2) points off for each missed short assignment. The first of these assignments is given below.

A word about late assignments. Please don't! It is inconvenient for me and detrimental to your learning. I will not take off points for late assignments. I assume that you are making every reasonable attempt to get things done on time. If you know, in advance, about a problem with your schedule, please let me know as soon as possible.

People: Who are we and Who am I

Some background on me.

Interesting things about you-all:

A brief Introduction to Object Oriented Programming

The tutorial on Java, which I have copied to the SILS server for this class, has an excellent description of what object oriented programming is all about. It is required reading. That is: after reading this, you should be able to answer these questions:

  1. What is an object?
  2. What is encapsulation and why is it desirable?
  3. What is are messages?
  4. What is a class and why is this abstraction useful?
  5. What is meant by inheritance and why are these relations useful?

The first assignment: The hello world application.

You can not run the program in this assignment until you have a CAEN account. You have to enable your account to use the CAEN labs. This is done through a www page (see below).

Your first assignment for this class, which is due next week, is to type in and run a java application example called HelloWorldApp. You will have to do this on a SUN workstation, running Solaris (see below). The step by step instructions are given in the Java tutorial, but you will need to set things up correctly before those instructions will work as described.

When (not if) this process goes wrong. E-mail me for help, immediately, or ask for help. You are entitled. Every question is a good question, every failure an opportunity to learn.

As evidence that you have accomplished this task, e-mail me the result of running your copy of the application. As illustrated in class, type the command "mail weymouth@umich.edu. Enter "assignment1" as the subject and hit return. This mailer is now expecting you to type text. Holding down the leftmost mouse button, sweep over the portion of your terminal window with the command and output (it will get high-lighted). Hit the middle mouse button (the text should be copied to the mail message) and terminate the input to the mail message by typing a period on a line by itself.

After completing this assignment, or while doing it, read the detailed description of what is going on in the java tutorial. This is required reading.

A bunch of practical stuff

As of this "printing," java only runs on Sun(Solrais), WindowsNT and Windows95, if you have access to a windows machine and can get to the www from it, you can download Netscape2.0b4j and Java. Otherwise, plan on using the joint CAEN/ITD lab in the library. This lab is in room 4059 in the undergraduate library.

getting access to the joint CAEN/ITD lab

In generally, you will have to do all the assignments for this class on the SUN nodes in the joint CAEN/ITD lab in the library. Before you will be able to do that, you have to have your account enables through the www page at http://www.engin.umich.edu/forms/Joint_Lab_Access.html.

The first two programming assignments (those without graphics, having only text output) can be run remotely: Log into to SILS server and telnet to CAEN SUN machine. If you are interested in this option, come to my office hours and I will show you how to get from SILS to a CAEN node.

getting logged on in the CAEN/ITD lab

When you sit at a node in the CAEN lab you will be presented with a login window. Check the box that indicates that you are working on classwork, and enter you username and password. If this does not work, your account is not correctly enabled.

Once you are logged in you will get a terminal window. There are two ways to get a new terminal window: you can type the command xterm& in any exsisting terminal window, or if you postion the curser over background area of the screen and press middle mouse button you will get a menu - select new shell on that menu and you will get a new terminal window.

You can move a window by draging its top bar with the left mouse down. Pushing the middle mouse button with the cursor in top bar gives you a menu of window options. Try things out.

setting up your environment to run java

In order to be able to follow the directions for the first assignment you will have to set up several alias commands (commands that are "shorthand" for other commands. To do this, type the following three lines in the terminal window:
alias java /usr/contrib/java/java/bin/java
alias javac /usr/contrib/java/java/bin/javac
alias ns /usr/contrib/java/netscape2.0/netscape

You will have to do this every time, in each terminal window that you want to run java from. The command java runs the java "machine" (to run java applications); the command javac runs the java "compiler" (to make a java class or classes from your java code); and the commend ns runs a java-compatable version of netscape (so that you can view java applets from netscape). Try things out.

additional shell commands

Some shell commands that you might find useful:

There is an ITS document on basic UNIX commands that is very complete and a number of additional documents that might be helpful, together with a search page.

additional information on editors

On the ITD document list there are documents on the editors pico, and vi.

how and where to get help

Elizabeth Shaw (with e-mail at Elizabeth.Shaw@umich.edu) conducted a tutorial on unix for members of the class on Saturday, January 13. at 3:00pm in the DIAD. Thank you Liz! Notes for that tutorial are available at http://www.sils.umich.edu/~ejshaw/jantutorial.html. Also see her tutorial on using Unix http://www.sils.umich.edu/~ejshaw/Unixintro.html.

A good general reference is the SILS Introduction Handbook. For help with CAEN accounts and machines call the CAEN hotline 763-5041. For ITD related problems, the ITD hotline is 764-HELP (764-4357). E-mail me.

Some Final Words about programming

When something does not work, explain what you are doing to someone else, step by step, while you show them. This will usually uncover the problem. I call it "the other pair of eyes" method. It is essential that you explain it so that the other person can understand it. Most often the other person does not need to say anything. Generally, you will see the problem before you finish the explanation. Don't feel shy about using your fellow classmates as the other pair of eyes.

A Word of caution: programming is a deceptively hard activity in following sense. It will take you much longer to do every assignment than you think. Almost all of the things that will get in your way and slow you down are dumb and stupid things (I call them flies and flat tires). By "flies," I mean things like: "Oh, I put a comma there where should have put a semi-colon," which is usually preceded by saying to someone "I've read this program over ten times and there is no problem with it, but it still won't run; let me show you what it's supposed to do..." While, by "flat tires," I mean things like: "What they changed the lab hours?" or "I couldn't dial in last night." In general, try to have your programming assignments done a couple of days early. Ideally you will start working on them on Friday and have them mostly done by Monday evening. Each assignment will take 4-8 hours of time outside class per week. Most of this time will be spent in the lab debugging code. Start early, test often.


The url of this page is: http://www.sils.umich.edu/~weymouth/java/class/lectureNotes/lectureNotes01.html
Last modified on January 12, 1996.
Report spelling errors, corrections, suggestions, and additions to Terry E Weymouth.
weymouth@umich.edu