Lecture 1

CS 051

  1. Teaches object-oriented programming in Java.

  2. Uses locally written library to make it easy to do interesting graphics early in course.

  3. Involves lots of fun programming projects, but teaches practical material necessary to solve problems in many areas.

Algorithms

Organizational Details

Classtime organization

On-line notes for this course

Because the lectures will involve developing examples, we will usually put running versions of those programs (and the code for them) in these online lecture notes. We'll try to get these online within 24 hours of the lecture.

Java intro outline:

  1. General form of class definition

  2. Graphics coordinate systems

  3. Contructors for graphics classes

Class Examples:

  1. Design a class to draw "Hello World" at (90,150), and a 50 by 30 filled rectangle at (100,100). When the mouse is pressed the program will also draw two nested ovals and a straight line. Click on MakeBox to show the example.