CSCI A201/A597

Lecture Notes 1

Spring 2000


Welcome and introduction to the course. Resources and overall structure of A201. Goals, actions, instructions, languages, and programs. The Java development loop: think, edit, compile, and run.

We started by introducing ourselves, our coordinates are listed on the main page of the course. Requirements for this class were listed:

The grading scheme was described, the number and nature of assignments and exams, and quizzes. The web site was described and presented as one of the important resources for keeping everybody synchronized in a class of this size (moderately large).

An e-mail distribution list will also be set up shortly. It will be used by the instructors to dispatch information on a weekly basis (on the average).

Cheating was discussed and we said you should not do it. If it seems like you cheated and you submitted work that is not yours we'll take one of two approaches as follows:

So you're encouraged to think and discuss in groups, but please turn in original, individual work. This will help you on the four exams.

Homework and in-lab assignments will be turned in on floppies, at the end of the lab when they're due. Homework assignments differ from in-labs in that the homework assignments are

Then we said that a program is a And we had you program me in English to retrieve a book on the stage (podium).

I was able to understand only English (no Russian or Japanese).

My set of actions were only:

We saw that we could write programs for such a robot.

Moreover we were able to define "turn right" as a sequence of three left turns, thus building a higher abstraction. (Not really a right turn, but the sequence of turning left three times does lead to the same final state as a turn right).

To program computers in this class we'll use the following language: Java.

Java as a language describes the primitive actions that we can rely on to build bigger, more complex programs.

The process of developing a computer program in Java involves the following steps:

  1. think about the problem and find a solution
  2. convince yourselves (prove) that the solution is correct
  3. code the solution in Java and write the Java code in a file
  4. compile the Java code in bytecode (machine level code)
  5. run the bytecode (using the Java interpreter)
We then developed a first program and described its components.

The file created (with notepad) was Hello.java:

public class Hello {
  public static void main(String[] args) {
    System.out.println("Hello, and welcome to A201!"); 
  } 
}
Once we have this file we compile it using javac.

This in turn creates Hello.class.

We then run java Hello to produce the desired output.

The process is somewhat different if the compiler reports errors.

We said chapter 0 is a good reading assignment at this point, and a syllabus will be posted in a few days, detailing the topics to be covered, and tested, and a timeline for that.


Last updated: January 13, 2000 by Adrian German