CSU 370   Fall 2008
Object-Oriented Design


 

Overview

Official summary: The course presents the theory and practice of object-oriented programming. The course enhances students understanding of the concepts of object, class, message, method, inheritance, and genericity. The course covers a basic model for objects; the principles of types and polymorphism in object-oriented programming languages; different forms of abstraction; and theory and practice of reuse. The course also introduces students to some object-oriented design patterns that practitioners have found useful.

 

Announcements   [RSS]

Thu, 18 Dec 2008: I forgot to mention: Homework 6 grades are also up. Very roughly speaking, a low-ish grade on it is correlated with (1) lack of documentation in your submitted extension (you had to give me a readme.txt file explaining what you were doing!), and (2) code that did not compile (you know who you are...) I will post to this website over the coming week a summary of what people implemented as extensions. Some of them were quite interesting. If you're curious about what people implemented last year, you can check them out.

Thu, 18 Dec 2008: Final exam grades and final grades have been uploaded to Blackboard. Average for the course is B+, which is actually quite high. Note that, as promised, I lessened the weight of homework 3 by nearly 50%, so that a low grade on it had less of an impact on your overall grade. And to lessen the impact of potentially weak midterms, to compute your final letter grade I looked at the max of a weighting of 50/25/25 (H/M/F) and 53/19/28 (H/M/F). Have a pleasant Christmas break, everybody.

Mon, 15 Dec 2008: I should be in my office later this afternoon, from 15h00 on. I may be there before, but it's somewhat unlikely. Feel free to send me email if you have questions.

Fri, 12 Dec 2008: I have enabled the course on Blackboard, and have put the grades for the midterm and the first four homeworks on it. (The grades for homework 5 will be added shortly.) That's the official information I have, so please to make sure it agrees with the information you have. Oh, and take the "running weighted total" bit with a huge grain of salt. It's the raw weighted total, not counting the futzing about that I mentioned I would do about the midterm, and about homework 3.

Fri, 12 Dec 2008: Graded homeworks 5 are now available for viewing. Also, the TAs have told me that we will hold special office hours in the days leading up to the final. Vlad will be available today (Friday), 15h00 to 17h00. Jeff will be available 11h00 to 13h00 on Monday. As for me, I will be around all day on Monday, although I'll be in and out of the office. If you want to see me, either drop by but be ready to wait if I happen to step out, or send me email and we can agree on a meeting time.

Thu, 11 Dec 2008: Tuesday's lecture on odds and ends is up. It includes the review of topics to be covered by the final.

Thu, 11 Dec 2008: NU course evaluations are being done online this semester. You should already have received info on this, but if not, here is the info I have.

Wed, 10 Dec 2008: Sorry folks, but after talking to the TA about the details of the submission process, we are going to ask you to send in a zip file for Exercise 4 of Homework 6. Thanks.

Wed, 10 Dec 2008: The submission site for Homework 6 will be ready this afternoon. For exercises 0-3, you will submit the files that are requested on the homework. For question 4, your extension, here is what I want you to do. First, create a file Readme.txt in the directory with the source code for the adventure, in which you detail (1) who's on your team, (2) what you have implemented, (3) which files you have modified and how, (4) how your extensions work, how we play with them, (5) possibily even some sample outputs. Anything that will help us find and assess your extension. If you don't tell us what you have done, we will not see it, we will not go looking for it, and therefore you will not get a grade for it. Second, create a zip file containing all of the source code of your game, including of course your modifications, and submit that. We will take your submitted source code, compile it, and run it. So send in everything. Feel free to email me for clarifications. Note that only one person per team need submit the homework. Also, remember that I will accept homework submissions until Sunday 22h00, but no later.

Tue, 09 Dec 2008: I will have to cancel my office hours today. To compensate, I will hold two hours of office hours tomorrow (wednesday) afternoon, 16h00-18h00.

Fri, 05 Dec 2008: This morning's lecture on the Observer design pattern is up. Note that I've added the web reader observer that I mentioned as an off-the-cuff example to the input loop example. The full source code of the input loop example is available.

Thu, 04 Dec 2008: First off, I urge you to look at the lecture notes for Tuesday (Dec 2), because I give more examples of the Visitor design pattern than I covered in class. In particular, I give a visitor pattern for binary trees. Also, I posted a couple of supplementary lectures, covering material that is more advanced and goes beyond what we've seen in class. You are not responsible for this, it is just provided if you want to go further. Topics covered include subtyping for aggregate structures and a generalization of the Visitor design pattern.

Wed, 03 Dec 2008: Lecture notes for Tuesday are below. Please remember to send me an email with your team composition for Homework 6. Homework is due officially on the last day of classes, but I will accept it without penalties until Sunday, Dec 14th, at 22h00.

Fri, 28 Nov 2008: As promised, I've started a page listing some ideas to tickle your imagination for homework 6.

Fri, 28 Nov 2008: Graded homeworks 4 are now available for viewing.

Wed, 26 Nov 2008: Here is the info that the registrar's office gives for our final: 12/16/2008 1:00 PM CS U370 OBJ-OR DSGN 106G WV R.PUCELLA. In English, December 16th (Tuesday) at 13h00 in 106 West Village G.

Wed, 26 Nov 2008: The support files for homework 6 are now available as a zip file adventure.zip.

Tue, 25 Nov 2008: Homework 6 is out. Formally due December 10th, although I will accept submissions until December 13th without penalty. I am still finishing to prepare the support files for the homework; they should be up later today. I just wanted you to get the writeup before the break in case you want to print it out. Note that it is fairly long.

Sat, 22 Nov 2008: First off, lecture notes from this morning are up. Second, here is the promised file containing some sample behaviors for homework 5.

Fri, 21 Nov 2008: I will be posting a version of the behaviors that I used in my demo on Tuesday sometimes tomorrow. I need to clean up the code some.

Wed, 19 Nov 2008: Yesterday's lecture posted.

Wed, 19 Nov 2008: Bunch of folks pointed out, correctly, that I forgot to include Stream.java in the list of support files for homework 5. I've just corrected that oversight.

Tue, 18 Nov 2008: Homework 5 is out, due next Tuesday, 22h00, as usual. You have only a week, but then again, it's a short homework. Support files are below. I will post some sample pictures and some sample behaviors by tomorrow, a cleaned up version of what I demoed in class. (Note that I did not proofread carefully, so I may need to post corrections in the coming 12 hours; I'll announce when I do.)

Sat, 15 Nov 2008: After due considerations, homework 5 will in fact come out on Tuesday. So you can take it easy for the next few days, 370-wise.

Sat, 15 Nov 2008: Lecture 16 is online. Homework 5, which was due out yesterday, will in fact go out later tonight, after I get back home from my trip out West. So check this web site when you wake up Sunday morning.

Wed, 12 Nov 2008: The TAs tell me that graded homework 3 will be available from the usual place sometimes today. They said noon, but factoring in random delays, you should check early afternoon.

Tue, 11 Nov 2008: The ACM Talk on Wednesday (tomorrow, 11h45, 108 West Village H) features Dino Oliva, on his experience about navigating the software development process at Bloomberg (a finance shop in NYC). I know Dino very well, and he comes from a background of programming language research. It should be a fun talk, so I recommend you drop by.

Mon, 10 Nov 2008: Just to remind you that there is no lecture tomorrow, for Veterans' Day. See you all Friday.

Mon, 10 Nov 2008: I am granting an extension on Homework 4 until Wednesday (Nov 12) at 22h00.

Sun, 09 Nov 2008: Friday's lecture on multiple inheritance is up. I have not yet typed up the drill exercises on functional iterators that I talked about in class, though, I apologize. If you missed it, I asked you to implement functional iterators for the Grid ADT we saw on homework 2, and functional iterators for the binary trees ADT that we saw on the midterm.

Tue, 04 Nov 2008: This morning's lecture is up.

Mon, 03 Nov 2008: I am trying out an RSS feed for announcements. If all goes well, you should see an RSS link up in your browser.

Nov 3: Small mistake in the write-up for Homework 4: the specification for {overlay(m1,m2).current() should be MFrame.merge(m1.current(),m2.current()) instead of MFrame.merge(m1,m2). The PDF has been updated. Thanks David for spotting this.

Nov 2: Friday's lecture on laziness is up.

Oct 31: Happy Halloween. Homework 4 is out, due November 11th. Support files below.

Oct 30: Just got an email from the Provost office regarding election day next week: We are all agreed that voting is a paramount civic duty, and the Northeastern community is engaged in this election. Nevertheless, it is not appropriate to cancel classes for this purpose. Please advise your students that early and late polling hours will accommodate them. So lecture as usual. And go vote.

Oct 27: Reminder: the midterm tomorrow is closed books/notes, but you are allowed to bring a two-sided 8.5x11 sheet with notes.

Oct 27: Graded homework 2 are now available. Get in touch with Vlad if there are any problems.

Oct 24: Part of the lecture notes from this morning about the topics to review for the midterm are available below. (I'll have the full lecture notes up by tomorrow morning.) Update: full lecture is now up.

Oct 23: I'm happy to announce an extension on homework 3, if you need one. I will accept submission without penalties until Sunday night, 22h00. By early tomorrow morning, I will post on the FB discussion group some of the questions I got by email, and their corresponding answers. Some of you have not joined the group yet.

Oct 21: Lecture 11 posted below. Sorry, I though I had posted it last week, but it must have skipped my mind. What else? Ah yes:

  • here is the conference paper that I used as a basis for homework 3. Please have a look, it's actually pretty readable for a research paper.
  • Here is a Java class Escher.java implementing a method Escher.draw() that draws the square limit diagram in the paper, the final diagram that I showed in class. it also contains definitions for all the pictures in the Escher part of the paper above. Make sure you have the canvas initialized when you invoke Escher.draw().

Oct 21: No class this morning; I am feeling rather ill. Your job will be to do some reading, which I will post later today. For now, catch up on your lecture notes reading. I will be posting last Friday's notes sometimes today, along with the paper by Henderson upon which your homework is based. This Friday, dynamic dispatch, and review for the midterm.

Oct 16: Homework 3 is now complete. Let it rip.

Oct 16: Added support files for Homework 3 below, including CanvasWindow for actually displaying stuff.

Oct 15: Homework 3 is out, at least the first question. Have a look, and start now. The second question will involve iterators, and will come out on Friday. I will post sample implementations of Point, Line, and Grid so that you are not penalized when developing if you did not get those completely right in previous homeworks. I will also make some sample pictures available for you to play with. Except those tomorrow. (I need to draw them...)

Oct 11: Nested classes and interfaces lecture is up. When I talked about nested classes, I talked about packages as a unit in Java. I have added a reading from the Java tutorials about it below. Read it, you will be responsible for it.

Oct 9: Subclassing lecture is up.

Oct 8: As I said in class, you can view your graded homeworks online, by just heading over to the homework submission page. Get in touch with Vlad if there are any problems.

Oct 5: Last week's lectures are up.

Oct 3: The rest of homework 2 has been posted. Part of the questions involve the testers for Line and Grid, which you can find below in the Homeworks section. Submission instructions will be similar to those for the first homework. Links to come.

Oct 1: Bunch of you spotted this error on the (partial) homework 2: The specification for length() should really take the square root of the sum of the square of the differences. What I wrote is non-sensical, of course. I'll correct it on the complete homework, which should be out by tomorrow.

Oct 1: Our TA Jeff tells me that I got his office number wrong below. It's really 460 WVH. It's been corrected.

Sep 30: Homework 2 is partially out. The first question at least. The rest should be up by tomorrow. You can get started....

Sep 29: We need a discussion group. I dislike BlackBoard. So I set one up on Facebook. I trust you all have Facebook accounts. It's NU CSU 370 Fall 2008 Pucella. Please join. I'll check requests for membership against official registration listings. If you are not registered in my section, or are not registered at all in the course, but still want to join, drop me an email explaining your situation.

Sep 28: Notes for Friday's lecture are up.

Sep 26: Daniel was kind enough to point out to me that my notes for lecture 4 talk about instanceOf for the implementation of equals, but that's of course wrong. It should be instanceof - note the different capitalization. Sigh. I've corrected the notes for lecture 4.

Sep 26: Question from this morning lecture: How do I add the PointTester.java file to my "project" in Eclipse. Some answers can be found here - look at response #7 that uses "Import", might be the nicest one.

Sep 25: The tester for points is now available. It provides a class PointTester with a main method that can be run against your Point class to test it. By default, it generates one hundred points and tests all the specifications except for equality. We will see later how to test for equality.

Sep 24: Lecture notes for last Tuesday are up. It includes an implementation of the equals method for drawings, which explains how to check an object being a Drawing - you can follow that template for your homework. I am running slow on getting the tester out for the homework, partly because I'm fighting with a bug in the tester :) New ETA is tomorrow noon.

Sep 23: First off, please make sure that you send our TA, Vlad Slavici, an email at vslav@ccs.neu.edu with the following information: (1) your name, (2) your preferred email address, and (3) the last 4 digits of your NU ID. This will let him set up the submission server, and he will send you an email with your password to access the server. More precise instructions for submission in the days to come. Also, I completely forgot to give you an implementation of the equals method for Drawing, and in particular how to actually check that an object is a Drawing. I will add the relevant bits to the lecture notes for lecture 4, so have a look when they're out, hopefully by tomorrow noon.

Sep 19: Homework 1 is out. A short one. Due in a week. Start early.

Sep 17: Lecture notes for the first two lectures are up. The first homework should be going out on Friday, a short one week homework.

Sep 16: My office hours have been nailed down, finally: Tuesdays, 15h00-17h00. If those times do not work for you and need to see me, feel free to send me an email and we'll try to agree on a convenient time for you.

 

Course Information

Time and Location: Tuesday/Friday 9h50-11h30

Instructor: Riccardo Pucella, 328 West Village H (#23H)

Office hours: Tuesdays 15h00-17h00

Teaching Assistants:

  • Vlad Slavici
    Office Hours: Thursdays 16h00-18h00 (370 WVH)
  • Jeffrey Satterley
    Office Hours: Wednesdays 15h00-17h00 (460 WVH)

Course Web Site: http://www.ccs.neu.edu/home/riccardo/csu370

Prerequisites: CSU 213

Textbooks: The textbook for the course is:

  • P. Sestoft, Java Precisely, 2nd edition, MIT Pess, 2005.

You may also find the following book useful, although it is not required:

  • Cay Hostermann, Object-Oriented Design and Patterns, 2nd edition, John Wiley and Sons, 2006

Grading: Grading will be based on weekly homeworks (50%), a midterm (25%), and a final exam (25%).

There may also be one or more quizzes, which may count as either assignments or exams at the whim of the instructor.

While some program assignments may require students to work in teams, most assignments and all quizzes and exams are individual. Student work is subject to the Academic Honesty and Integrity Policy.

Security is an important aspect of software development. In this course, students are expected to protect the software they develop from plagiarism. The quality of this protection will be graded.

 

Schedule Outline and Lecture Notes

This schedule is subject to change without warning. Readings will be assigned to supplement lectures, and posted here.

Sep 14

Introduction

- Lecture notes

Sep 16

ADTs, algebraic specifications

- Lecture notes

Sep 19

ADT implementation in Java (1st pass)

- Lecture notes
- Homework 1 is out

Sep 23

Equality for ADTs; Programs

- Lecture notes

Sep 26

Software Testing

- Lecture notes
- Wikipedia's entry on Unit Testing
- Wikipedia's entry on Black Box Testing

Sep 30

Errors and exceptions

- Lecture notes
- Homework 2 out
- Java Tutorial on exceptions

Oct 3

Type systems

- Lecture notes
- Wikipedia's entry on BNF grammars

Oct 7

Code reuse: subclassing

- Lecture notes

Oct 10

Nested Classes and Interfaces

- Lecture notes
- Java online tutorial on packages

Oct 14

Design Pattern: Functional Iterators

- Lecture notes
- Homework 3 out

Oct 17

Functional Iterators II

- Lecture notes

Oct 21

Class cancelled

 

Oct 24

Downcasting; dynamic dispatch; midterm review

- Lecture notes

Oct 28

Midterm

 

Oct 31

Lazy structures and iteration

- Lecture notes
- Homework 4 out

Nov 4

Code Reuse: Inheritance

- Lecture notes
- Java tutorial on interfaces and inheritance. Note in particular how they conflate inheritance and subclassing

Nov 7

Multiple inheritance

- Lecture notes

Nov 11

Veterans' Day - No Classes

 

Nov 14

Generics

- Lecture notes
- Supplementary lecture notes on subtyping for generics
- Java tutorial on generics
- A more technical tutorial by the person responsible for getting generics into Java

Nov 18

Higher-order programming

- Lecture notes
- Homework 5 out

Nov 21

Mutation

- Lecture notes

Nov 25

Overview of Homework 6

- See homework 6 for lecture notes
- Homework 6 out

Nov 28

Thanksgiving Break - No Classes

 

Dec 2

Design Pattern: Adapters and Visitors

- Lecture notes
- Supplementary lecture notes on the Transformer design pattern

Dec 5

Design Pattern: Observers

- Lecture notes

Dec 9

Assertions, Review

- Lecture notes
- Programming with Assertions
- JUnit
- Java tutorial on reflection

 

Homeworks

Removed

 

Online Resources