PSU Logo
Department of
Computer Science

 

CS 420/520 Object-Oriented Programming

CRN 14210 (for CS 420) and 14211 (for CS 520)

There will be no class on Monday 28th September. The course will start on Wednesday 30th September. See the weekly schedule below for work to be done in lieu of the first class meeting.

Course Description

Course Overview

Textbooks

Policies

Weekly Schedule

Getting a Computer Account

Academic Integrity Policy

PSU Student Code of Conduct

Class Mailing List

Pharo website
download Pharo
Squeak: Downloads and information
goodies directory
Preventing the Spread of 'flu
flu.gov website for higher edu

 

Fall Quarter 2009

starting on Wednesday 30th September and ending with the final exam on Monday 7th December
Monday and Wednesday, 16:40–18:30 in Cramer Hall Room 71

Office Hours:
Tuesday 14:00–15:30
Wednesday 13:00–14:30,
or by appointment.

Instructor
Andrew Black
email: black
telephone: 503 725 2411 
Room: FAB 115-10

Grader

Max OrHai
email: Max.OrHai


Prerequisites

No familiarity with object-oriented programming is assumed; students who have expereince with Java or C++ should be prepared to unlearn some of what they think they know. Prior experience with Smalltalk is not required. The class assumes a working knowledge of discrete mathematics and machine organization — the fundamentals of instruction coding and data representation in the computer's memory. (Students who have completed PSU CS 310 and CS 340 will be well prepared)

Textbooks

Course Description

The objective of this course is to teach students to program well in an object-oriented style. The focus is more on object-oriented design and programming than on a particular language and its niceties. The course will use the Pharo dialect of the Smalltalk language because Smalltalk is very simple and allows the programmer to manipulate objects directly. Using Smalltalk permits the course to be focussed on concepts rather than on navigating the intricacies of a language definition. Samples of other languages, such as Ruby and Java, may be included.

Topics covered will include responsibility-driven design, test-driven development, refactoring, code reading, reuse, parameterization, inheritance and programming patterns.

Specific Learning Objectives

On completion of this course, students should be able to

  1. Design a group of collaborating objects to implement a given set of requirements;
  2. Assign the responsibilities for the actions implied by the requirements to the appropriate objects;
  3. Partition these responsibilities into appropriately named methods;
  4. Write definitions for the classes that can be used to generate these objects;
  5. Deduce the data necessary to implement the requirements, and partition that data among the objects
  6. Define appropriate instance variables to store these data;
  7. Create abstract superclasses in order to share common code,
  8. Arrange the concrete and abstract classes in an appropriate hierarchy,
  9. Write tests for methods
  10. Explore existing classes and methods using the Smalltalk programming environment;
  11. Read, write, edit, test, share and debug Smalltalk code using the development tools
  12. Create packages and change sets containing their programs and export them from the Smalltalk system.

Policies

Attendance

I recommend that you come to class, that you participate actively, and that you take notes. The act of taking notes (even if you never look at them again) is a powerful learning aid. I will generally make any visual aids, code samples, etc. that I used in class available on the web, but these are not a substitute for being in class and taking notes. If you do have to miss a class, say because of illness or work-related travel, you are responsible for getting notes and finding out what went on in class from another student.

What about the 'flu?

It is likely that there will be an epidemic of HNNI 'flu this fall or winter. To learn more, visit this government website. How does this affect this class? Students should note the folowing:

  1. There is a link in the margin on preveting the spread of 'flu. Read it!
  2. Students will not be penalized for absences caused by illness. You will be given a chance to make up missed assignments.
  3. I won't require a note from a phsician as evidence that you are sick.
  4. PSU-wide policy and information can be found at the Student Health and Counseling Website.
  5. Don't come to class if you are feeling sick. Stay home until you have been free of fever for 24 hours. If I see a student in class exhibiting the symptoms of the 'flu, I will require them to leave the classroom.
  6. All of the assignments will be posted on the class website. Homework can be tunred n electronically. I am willing to conduct "office hours" over the phone, on skype, and by using VNC screen-sharing.
  7. I might get sick too. I'll do my best to have a TA or another Professor cover for me if that happens.
  8. Leave as much space between yourselves as possible when sitting in the classroom. I won't be passing out papers that will need to be handed from one student to the next; print your own copies.

Reading Assignments

Reading listed in the syllabus for each week should be completed before coming to class. I may check on the completion of reading assignments by various means: oral or written quizzes in class, written summaries, discussion (web-based or in class), etc. Anything in a reading assignment is fair game for an exam question.

Programming Assignments

Print-outs of your assignment submissions are due at the start of class. On-line submissions are due before the start of class.

Regrading

I do sometimes make mistakes. If you believe that I have not graded your assignment according to the published grading scheme, please let me know in writing (email counts as writing!) within 1 week of the assignment being returned to you. Be specific as to why you think that my grading is inconsistent. I will then re-grade the whole assignment; the second grading will stand, whether it is higher or lower than the original grading.

Disabilities

If you are a student with a disability in need of academic accommodations, you should first register with the Disability Resource Center, and then notify the instructor to arrange for support services.

Makeup Exams

If you have a medical or a family emergency and must miss an exam, let me know, if at all possible before the exam, and I will work with you to find an alternative. Other reasons for absence such as scheduled travel are not emergencies and are not cause for a make-up.

Passing the Course

Every assignment in the course is connected to a learning objective. It is therefore important that you make an honest attempt to complete them all. A score of less than 30% on any assignment indicates that you have not met this condition, and is sufficient cause for failing the course. That means an F, at the discretion of the instructor.

Academic Integrity

Students are at university for two reasons: to learn stuff, and to gain a credential. Because the credential is important to many of our students, part of my role as a professor is to make sure that it has value. This means ensuring that the degree is awarded only to those students who have mastered the material in my course.

I have every sympathy for those who have difficulty with the material and seek the assistance of the instructor, the TA or their fellow students. I have no sympathy at all for those who decide that the fastest way to a degree is to cheat. I have been responsible for having cheating students dismissed from the university in the past, and I will not hesitate to seek to have cheaters dismissed in the future.

The most common form of academic dishonesty — cheating — is representing the work of others as your own. In all written material, it is expected that you will use others' work, but when you do so it must be in a way that makes it absolutely clear that someone else's work is being cited, and who is the original author. If you reproduce someone else's work in a way that makes it appear to be yours, you are guilty of plagiarism, in other words, of cheating.

Cheating on an assignment or exam will result in an automatic zero grade for that piece of work, and the initiation of disciplinary action at the University level.

Cheating and collaboration

I encourage collaboration on certain assignments; I will not tolerate cheating. Where is the line between these activities?

First, if an assignment is explicitly set up as a team assignment, you are of course allowed — indeed, required — to collaborate with the members of your team. In this case I will generally require only one completed piece of work to be turned in from the team as a whole.

For individual assignments, I encourage you to talk about the problem with your fellow students. During such discussion, you may even write something, perhaps the code of a critical method, as a group. If you do this, there is a danger that you might reproduce that group work as if it were your own. To guard against this danger, do the following: after the group session, destroy all the notes and code fragments that you may have brought away with you. Then go and do something else for an hour or two: go for a walk or a bike ride, play your favorite sport, go to the gym: do something to flush your short-term memory. Then sit down with a blank sheet of paper or a blank workspace and start work on your own solution. If you have a photographic memory or otherwise won't be able to forget what you have seen someone else write, then don't participate in collaborative problem-solving sessions.

If I see the same code or writing assignment from two or more students I will take this as evidence that these guidelines have been ignored, and will assign a grade of zero to all of the students involved.





Course Grading

Grade Distribution: 40% on homework assignments, 15% on the (take home) mid-term, 35% on the class project, and 10% on attendance and class participation. Your participation will be used to judge whether you are keeping up with the reading assignments.

Weekly Schedule

Course slides will be available as Adobe Acrobat files as the course proceeds, but probably not until the day of class.
If you look ahead, you will find slides or notes from the previous year's offering, which are certainly out of date. but may nevertheless be useful.


Weekly Schedule (subject to change, as the quarter progresses)

Date

Reading
(to be read
by this date)

Topic

Lecture material
(links will be activated as slides are available)

Homework Assignments (due at 16:30 on date)

1 Monday 28th Sept No class Read chapters 1 and 2 of Pharo By Example (here is an abbreviated download of just those chapters). Download Pharo and work through the process of creating the "Lights Out" game as described in Chapter 2.

Also, sign up for the class mailing list using mailman.

Wed. 30th Sept.

Chapters 1 and 2 of Pharo by Example (PBE)

Introduction to the Course, and Introduction to Objects

Fun with Smalltalk Syntax

2 Monday 5th Oct.

More on Smalltalk Syntax.

 

Assignment 1

Wed. 7th October

Read PBE Chapters 3–4, 11

 

Smalltalk is Real!

Good Smalltalk, Part I

3 Monday 12th October PBE Chapters 5–10 Collections, Blocks. Enumerating over collections.

Testing.

Code developed in class

(Assignment 1 due)

Assignment 2

Wed. 14th October
Code developed in class: Boxes and KWIC
4 Mon. 19th October

Completing the KWIC index problem.

Simple Smalltalk testing: with Patterns.

Testing slides (pdf)

Using TestResources

(Assignment 2 due)

Assignment 3

Wed. 21st October
Beck pages 19–75
Lessons from the Homework (pdf)
5 Mon. 26th Oct.
Guest lecture on Smalltalk Implementation

Dr. Harry Porter

Harry Porter's slides
Wed 28th October

Guest lecture on Smalltalk Implementation.

Dr. Harry Porter

Assignment 3 due on Friday 30th
6 Mon. 2nd November

Beck pp 1–78

Coding patterns for Methods

Best Practice Patterns I (slides)

Project Proposals assigned

Wed 4th Novermber



More Coding patterns for Methods

Best Practice Patterns II (slides)


7 Mon. 9th November
On Understanding Data Abstraction.

Types in OO Languages

Cook's Essay; Slides

Types slides

Project Proposals due today

Assignment 4

Wed. 11th November

Armistice Day: PSU Closed

no class!

8 Mon 16th November
Mark Guzdial's chapter on Morphic Project Process

Programming GUIs with Morphic

Slides

MorphicDemo-Dice is on SqueakSource

Assignment 5 set
Wed 18th November

Checks Pattern Language

Pratt's Null Object Pattern

Alpert extract on Observer

Iterator Pattern.

Observer pattern; Dependencies; model-view separation and the changed: update: protocol

Programming Patterns chart

Patterns Slides

9 Mon. 23rd November

How to make an Object: Patterns for Object Creation and initialization

UML Sequence diagrams

Slides (1_up)

Sequence diagrams web page

Assignment 5 due
Wed 25th November

Thanksgiving Eve: no live class!

Biddle & Tempero on Reuse Reuse: context & component. Patterns that aid in reuse. Delegation Reuse slides  
10 Mon. 30th November
Black: A use for inheritance Subtyping, conformity and Polymorphism Subtyping slides

Trampoline changeset

 
Wed 2nd December
Schärli, Black, Ducasse: Encapsulation paper Enhancing Reuse with the Core/Support split. Encapsulation Slides (4-up)
Core/Support Slides (1-up
Traits Slides (1-up)
Exam
Week
Mon. 7th December
17:30–19:20
Project Demonstrations Refactoring Metrics paper
Refactoring Case Study paper

Most recently modifed on Thursday 19 November 2009 at 14:16


Andrew P. Black