Subtleties with generics
Wed Feb 25 19:29:32 EST 2015
In class today someone asked a fairly tricky question
about implementing specific-purpose methods on generic types. The example given was, if we have an IList<Integer>
how could we implement a method sum()
that adds them all up? We didn’t have enough time in class today to answer that well, so
I’ve added a section in the Lecture 15
notes to address this question more fully. Note that this isn’t the final
on this question; we’ll see another approach tomorrow.
Wed Feb 18 10:37:52 EST 2015
One of the characteristics of the original Fishy game that you’re implementing is that fish come in different sizes.
If you’re drawing fish by using a FromFileImage object, you’ll be stuck at the exact image size of the source file.
Remember that realistic graphics aren’t the essence of the assignment, but behavior is: it will suffice to draw a fish as just an oval (for the body)
plus a triangle (for the tail), if you can make that scale to different sizes more easily.
Midterm exam dates
Sat Feb 14 10:13:27 EST 2015
The first midterm is scheduled for
Monday, Feb 23 at 6–9pm, in Snell Engineering rooms 108 (for Prof. Razzaq’s students) and 168 (for Prof. Lerner’s students).
Wed Feb 11 16:07:15 EST 2015
As of tomorrow, February 12th, Prof. Lerner’s 1:35 section of
Fundies 2 will be moving to Shillman Hall 105. This move is permanent for the rest of the semester.
Wed Feb 11 10:25:30 EST 2015
Homework 4 is extended until Friday night at 11:59pm. Another announcement will be made about homework 5.
Classes cancelled again tomorrow
Sun Feb 8 21:28:36 EST 2015
Due to another snowstorm, classes tomorrow are cancelled.
Tomorrow’s lecture was intended to be Lecture 10
, and it will likely help you with the homework. You are recommended to read it
yourself, in advance of when lectures resume. There will likely be an extension on the homework (again), but until we know
whether Tuesday’s labs are cancelled too or not, I won’t know how long the extension will be.
Honors students: we’ve only had one class per week the past few weeks, and next week will be no different, so these
snow days have been particularly difficult on our schedule. I will be looking into ways for us to make up at least some of
the missed classes, and will hopefully have some information by Thursday’s lecture.
Homework 4 will be posted late tonight
Thu Feb 5 17:25:13 EST 2015
I will be posting homework 4 late tonight;
it will be due on our regularly-scheduled Wednesday night deadline.
The honors supplement will not be ready tonight, and will be posted sometime tomorrow. (Honors students will have time in lab
on Monday to work on that problem, too.) WebCAT submissions for all homework 4 problems will be enabled over the weekend.
Mobiles problem is fixed
Wed Feb 4 17:49:32 EST 2015
The Mobiles problem is now corrected,
and valid data is now posted in Lab 3. Please revisit your submission to ensure you have the correct data!
Correction to Mobiles problem
Wed Feb 4 13:10:25 EST 2015
There is an error in the reference solution (and tests) of curWidth. The correct thing to implement
is the description in the problem statement. The mistake is in the complex example mobile, for which
a simple weight of size 45 does not have a width that works correctly as an integer.
I am updating the reference tests, and temporarily suspending submission of this problem until they are fixed.
Thu Jan 29 21:27:18 EST 2015
In lecture today, I said the
appropriate way to combine two strings was via the append method, namely string1.append(string2).
That is incorrect. The method is properly named concat. My apologies for any confusion.
Homework 2 extension
Wed Jan 28 14:17:37 EST 2015
Due to the two successive snow days, we’ve lost most of the office hours scheduled for this
week. Accordingly, we’re extending the due date for homework 2 until Friday night at 11:59pm.
So that the regular homework schedule isn’t too disrupted, homework 3 will go out on Friday
and be due next Thursday (i.e., one day later than usual), and homework 4 will go out next Thursday and
be due as usual on Wednesday night.
Homework 2 is posted
Thu Jan 20:02:15 EST 2015
Homework 2 and 2h have been posted
to the assignments page. WebCAT submissions will be enabled over the weekend.
Homework 1 Honors is up on WebCAT
Mon Jan 18 18:05:00 EST 2015
The honors problems for homework 1 have now been posted.
Homework 1 is up on WebCAT
Sun Jan 18 12:05:00 EST 2015
The three problems for homework 1 have been posted to WebCAT, and everyone who has
emailed us their CCS account information should now be able to log in. The honors
problems have not yet been posted, and will be made available by Monday evening.
If you have not yet emailed Deepen your CCS username, you will not be able to access WebCAT.
Do so as soon as possible. If you have emailed him your username, try to log in, and you still
cannot access the assignments, email Prof. Lerner.
Welcome to CS2510
Mon Jan 12 11:00 EST 2015
Please, check this page daily for any last-minute announcements
about the class, assignments, lectures, and other