|
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]](http://www.ccs.neu.edu/home/riccardo/pics/livemark.png)
Tue, 24 Nov 2009: A comment about homework 5: Matt asks if it isn't a bit redundant to
check for adjacency in both
the Orbit.execute() method, and in the Ship.orbit()
method. At some
level, yes: presumably, if we check for adjacency in Orbit.execute(),
then we don't need to check in Ship.orbit() as well, since we know
we're adjacent to an orbitable artifact anyways.
My thinking here is that the Ship.orbit() method could also be invoked
from a variant of an AutonomousEnemy, one that attempted to orbit
artifacts, and depending on how one might end up implementing such an
AutonomousEnemy checking that something is orbitable in Ship.orbit()
might make sense. But mileages may vary here.
Bottom line: I don't really care where you check that something is
orbitable, as long as (1) no ship can ever orbit something that is not
orbitable, whether player controlled or not, and (2) the player is
notified nicely when they're the one trying to do just that.
Sat, 21 Nov 2009: Homework 5 is out, a day later than I wanted it to go out. So I
simplified it a bit. There is a lot of code for you to understand for
this homework 5, so I would suggest you read both the write-up and the
code pretty soon. Due December 1st.
Fri, 20 Nov 2009: Lecture notes for this morning's lecture on the Observer design pattern
are up.
Wed, 18 Nov 2009: I'm running a bit behind finishing homework 5. It will not be done
until probably tomorrow night (Thursday) or Friday. Therefore, it
will be due on December 1, so you still will have a week and a half to
do it.
Tue, 17 Nov 2009: Lecture notes for this morning's lecture on adapters are up, as is the
code I showed in class.
Sun, 15 Nov 2009: Last Friday's lecture notes on mutations are now up.
Tue, 10 Nov 2009: This morning's lecture notes on multiple inheritance and extending
ADTs is now up.
Tue, 10 Nov 2009: Small correction to the writeup of homework 4. Nothing major, just the
sample output for question 3 was wrong, didn't match the specs I was
asking you to implement. (That output was generated from a previous
version of my sample code.)
Mon, 09 Nov 2009: Lecture notes for last Friday's lecture on inheritance and delegation
are up.
Mon, 09 Nov 2009: Catching up on lecture notes. First off, notes for lecture 14 on laziness
(and streams) are up. I've also added an addendum to the
notes for lecture 13 on subtyping, talking about equality and overloading,
and generally revisiting equality in Java. You should look at it
before finishing up homework 4.
Wed, 04 Nov 2009: Homework 4 is out, due Friday November 13. See the support files in
the homeworks section of the website.
Tue, 03 Nov 2009: Sorry for not being able to finish the example of sieving to obtain
the stream of prime numbers during class time, but I did manage to
finish five minutes after the lecture. The code is
available here.
Thu, 29 Oct 2009: Graded homework 2s are slowly trickling in. I'm entering the grades on
Blackboard as I receive them. If you have a grade for hw2 on
Blackboard, then your graded homework will be available this afternoon
in a box outside my door, from 14h00 on.
Wed, 28 Oct 2009: In case you didn't notice, or missed class on Tuesday: we have a
midterm this coming Friday, in class. Closed-books exam, but I'll let
you bring in a single double-sided 8.5x11 crib sheet. Covers
everything we've seen up to and including Tuesday's lecture.
Wed, 28 Oct 2009: Lecture notes for Tuesday's lecture on information loss, casting, and
dynamic dispatch are available.
Fri, 23 Oct 2009: Lecture notes for this morning's lecture on map and reduce design
patterns are available. I've also added the promised link to the the
use of map and reduce at Google.
Fri, 23 Oct 2009: Lecture notes for Tuesday's lecture on polymorphism (aka generics) are
available. At a whopping 18 pages, that was one dense lecture. I've
also made available a fairly clear tutorial on polymorphism by Bracha,
responsible for the addition of polymorphism to Java. Lecture notes
for this morning should be coming up shortly; I'm revising them now.
Wed, 21 Oct 2009: Some of you asked for reference files for Artifact.java
and Map.java to do homework 3 without relying on their
(possibly buggy, I guess) implementation of those ADTs from homework
2. I've linked to such reference files in the homeworks
section.
Sat, 17 Oct 2009: Lecture notes from last Friday on subclassing from multiple classes
and interfaces are now available.
Sat, 17 Oct 2009: Slight update to homework 3, so please get the last version.
Fri, 16 Oct 2009: Lecture notes on functional iterators have been posted. And I just
noticed that I forgot the lecture notes from last Friday, on
interfaces. I'll remedy that over the weekend.
Fri, 16 Oct 2009: Homework 3 is out, due Tuesday October 27th.
Tue, 13 Oct 2009: Some of you probably already noticed, but there is at least one bug in
the spec of homework 2. First off, the spec for the Map operation
toString() on merge(m1,m2) is wrong. It should read:
merge(m1,m2).toString() = m1.toString() + m2.toString(). That
is, kill the space. (Think about why that is... hint: has to do with
empty maps.) Also, in the tester for Map, the number of errors
reported is wrong -- if you want to correct it, change Line 22 to
read: totalErrors += testRandomArtifact(totalInstances);
Tue, 13 Oct 2009: Extension granted for homework 2, until Wednesday (Oct 14) at 22h00.
Tue, 13 Oct 2009: Submission instructions for homework 2 are the same as last time: go
to the
submission web site and put in your files. Please make sure
that you send us your .java files, and not your .class files. Get
in touch with our
TA Jed if there are any
problems.
Tue, 13 Oct 2009: Woke up sick. I'm canceling this morning's lecture. Reminder: homework
2 due tonight. I should be back online later this afternoon, if you
have any questions.
Fri, 09 Oct 2009: Took longer than expected, but here
is the tester for the Map ADT. I changed the default placeholder
for testing merged maps to be a map with a single artifact of size
1000 by 1000. (If you're curious to see what I spent an hour
trying to figure out yesterday, replace that size by the original 10
by 10 that I talked in the homework, and try to figure out why the
tester slows down to a crawl. Go on, I dare you.)
Wed, 07 Oct 2009: Here we go, first typo/error in the writeup for homework 2. Question
3, the size() operation is supposed to return the size of the map. The
specification for how this operation behaves for the artifact()
creator is nonsensical. It should be artifact(h,w,a).size() =
Coord.create(h,w). Write-up has been updated.
Tue, 06 Oct 2009: I overlooked the obvious this morning when I answered Spencer's
question about the "nested subclasses" version of the implementation
of the List ADT as derived from the recipe. He asked "Did I have
to make the EmptyList and ConsList classes static?"
The proper answer was, of course, that they have to be static because
they are invoked (via their constructors) from the methods
empty() and cons() in the abstract class
List. Those two methods are static, so by the rule I gave you
that "static methods can only refer to static things in a class", the
two subclasses must be static. Thanks to the student that pointed out
this answer to me at the end of class. (I forgot your name, I'm sorry
about that. Can you drop me a quick email to remind me?)
Tue, 06 Oct 2009: Lecture notes for this morning's lecture have been posted below. I've
also added a link to a tutorial on Java packages. Once I find a nice
link on inner classes, I will add it in as well.
Mon, 05 Oct 2009: Lecture notes for Friday's lectures have been posted below.
Sat, 03 Oct 2009: Homework 2 is out. You can do questions 1 and 2 right now. Questions 3
and 4 will need to wait until Tuesday's lecture. I provided a correct
implementation of Coord.java in case you do not trust yours from
homework 1, and there is the skeleton of a tester for
Artifact.
Sat, 03 Oct 2009: I'm running a bit behind with finishing up homework 2. I hope to get
it done by later tonight. Stay tuned.
Thu, 01 Oct 2009: Our TA's office hours have been ascertained: Tuesday 15h00-17h00 in
308 WVH. Ask for Jed.
Wed, 30 Sep 2009: Lecture notes for yesterday's lecture have been posted below.
Tue, 29 Sep 2009: Down to the wire, but the submission system seems up and running. By
now, you should all have received an email from our TA Jed Davis with your
token to set your password on the submission server. (The email was
sent to your husky.neu.edu account, so check there.) Follow the
instructions in the email to set your password so you can submit your
homework. Feel free to email our TA Jed if you have any
questions about the submission process. Note that the submission
server will send you a confirmation email after submission, and that
you can submit your homework multiple times if you decide to make
changes. We shall only look at the last version you submitted when
grading.
Mon, 28 Sep 2009: I completely forgot to update this website with office hours, sorry
about that. They're Thursdays, 16h00-18h00. My office is 328 WVH.
Mon, 28 Sep 2009: I corrected a typo in the RSS feed for the course announcement that
made the feed point to the wrong address for the course web
page. Unfortunately, depending on your RSS reader, this may reset the
"read" markers of the posts, meaning that you may get the old posts
showing up as new posts. Sorry about that.
Fri, 25 Sep 2009: Lecture notes for this morning's lecture have been posted below.
Fri, 25 Sep 2009: I've uploaded the testing program for homework 1 -- see below. Holler
if there are any problems. Next up, lecture notes from this morning.
Fri, 25 Sep 2009: I've updated homework 1 to take care of something that came up in
class this morning. We're now allowing zero coordinates when invoking
Coord.create(). The tester I talked about this morning will
be uploaded tonight. Watch this space.
Tue, 22 Sep 2009: Lecture notes for this morning's lecture have been posted
below. Generally, if you find a mistake in the notes, please let me
know, unless it's an obvious typo.
Tue, 22 Sep 2009: Lecture notes for last Friday's lecture have been posted below. One
down, one to go.
Tue, 22 Sep 2009: Homework
1 is out, due next Tuesday, September 29th. Towards the end of
the week, we will have a tester ready for you to test your code, and
information about how to submit your code. Lecture notes for the
last two lectures I still have to finish polishing, expect them
later tonight.
Wed, 16 Sep 2009: Lecture notes for the first two lectures are up. A bit rough around
the edges, but you should recognize the gist of what was discussed in
class. Also, I am toying with the idea of having my office hours
Thursdays 16h00-18h00. Let me know if you have issues with
that. (Irrespectively of whether or not that time is the actual time I
will decide on, tomorrow I will be in my office and available at that
time, if you have any questions about the course.)
Mon, 07 Sep 2009: Setting up the RSS feed for the course. You should see an RSS link up
in your browser.
Course Information
Time and Location: Tuesday/Friday 9h50-11h30
108 West Village H
(#23H)
Instructor: Riccardo Pucella,
328 West Village H (#23H)
Office hours: Thursday 16h00-18h00 in 328 WVH
Teaching Assistants:
- Jed Davis (Office hours: Tuesday 15h00-17h00 in 308 WVH)
- Jonathan Hoag
Course Web Site: http://www.ccs.neu.edu/home/riccardo/cs3500
Prerequisites: CS 2510
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.
Homeworks
Online Resources
|