M/F 2:30-3:20   
in Philips 101

CS 1130: Transition to OO Programming

Spring 2015

In-Class Lecture Summaries

This page lists a summary of the activities of each week, in reverse chronological order. This is your go-to page for downloading in-class handouts and getting caught back up when you get behind. This page is updated dynamically all semester long, with new material added as we get there.

If you want to see what future lectures in this class will be, you should look at the syllabus page.


Week 5

Lab 4: Abstract Classes

[Instructions]

This lab introduces you to the useful software-engineering concepts of an "abstract class" and an "abstract method". The topic is covered in Section 4.7 of the class text and on lesson page 4-5 of the ProgramLive CD.


23 February (Monday): Exceptions

[Handout]      [Presentation]
Demos
Parsing.java
Throwing.java
OurException.java
Catching.java


This is the last lecture of the course. It is optional, but important if you plan to take CS 2110, or go on further we Java. We talk about Exceptions, which is how Java reports errors — and possibly recovers from them.

Reading: Chapter 10



Week 4

20 February (Friday): OO Design

[Handout]      [Presentation]
Demos
IOStreams.java
converter.zip


Today we move from just talking about GUI applications to applications in general. How we would design an application like JMan from scratch?

Reading: Sections 12.1 and 12.2



Lab 3: Using Vectors

[Instructions]

Class java.util.Vector provides the ability to maintain a growable/shrinkable list of objects, which can be of great utility in cases where you do not know ahead of time how many objects will be in the final list. The purpose of this lab is to gain some experience with class Vector and learn just how useful it can be.


16 February (Monday): GUI Applications

[Handout]      [Presentation]
Demos
guicode.zip
converter.zip


Today we talk about how to design GUI applications in Java. We have done most of this for you already in JMan, but you may find it useful. There is quite a bit here, so we may spill over into next lecture.

Reading: Sections 17.1 to 17.4



Week 3

13 February (Friday): Casting and Overriding

[Handout]      [Presentation]
Demos
Animal.java
Cat.java
Dog.java


Today we learn about the difference between real and apparent types. This is an import distinction when using inheritance in a statically typed language. It is not too difficult once you get used to it, but it requires some practice.

Reading: Section 4.2



Lab 2: Classes and Testing

[Instructions]

The purpose of this lab is to get you used to writing methods, and to introduce you to the basics of testing. Adopting a good testing habit will prove to be ' unbelievably useful, particularly for the first assignment.


9 February (Monday): Inheritance

[Handout]      [Presentation]
Demos
Point3d.java
SquareJFrame.java
Employee.java
Executive.java


Today we address the first truly new concept of object-oriented programming: inheritance. Inheritance is a powerful tool that allows us to build off complex programs built by others. It will be a major part of Assignment 3.

Reading: Section 1.6



Week 2

6 February (Friday): Strings, Wrappers, and Containers

[Handout]      [Presentation]
Demos
ReorderString.java
ArrayDemo.java


In this lecture, we start covering material necessary for the final assignment JMan. We introduce the concept of a container, which is an object that contains another object. Java has a lot of different containerst to chose from, and they all have their advantages and disadvantages.

Reading: Sections 2.5 and 5.1



Lab 1: Using the Java API

[Instructions]

The purpose of this lab is to get you comfortable with using the classes and objects that are already built into Java. This also means familiarizing yourself with the Java API.


2 February (Monday): Methods and Constructors

[Handout]      [Presentation]
Demos
Point3d.java
Worker.java
FolderName.java
StaticExample.java
Demo.java


In this lecture, we provide a model for evaluating methods; this concept will be extremely relevant for the second assignment. We also go into more detail about constructors and specifications

Reading: Sections 2.1 to 2.4, 2.7 and 3.5



Week 1

30 January (Friday): Classes

[Handout]      [Presentation]
Demos
Point3d.java
Worker.java


In this lecture, we go into more detail about Classes, which are the primary programmable unit in Java. We talk about the relationship with fields and methods, and relate this to what you might have learned about functions in another programming language.

Reading: Sections 1.4 and 1.5



Lab 0: Evaluating Expressions

[Instructions]

The purpose of this lab is two fold. First, it is designed to get you started with DrJava immediately. Second, gives you hands on experience with static types, which you might not be familiar with.


26 January (Monday): Types and Objects

[Handout]      [Presentation]
Demos
Point3d.java
Patient.java


In this class, we introduce the concept of an Object, which is what gives Object-Oriented programming its name. We present the manilla folder analogy, which is the running analogy for this course. We also introduce the notion of a Class and show how they relate to Objects.

Reading: Sections 1.1 to 1.4



Week 0

23 January (Friday): Introduction

[Handout]      [Presentation]

We provide an introduction to the course and get you ready for your first lab section on Wednesday. We also introduce the notion of types, which may be new to those of you who have never worked in a statically typed language before.