CSC 148H -- Winter 2003 Course Homepage

Welcome to CSC148H! This is the course home page for the winter 2003 term. The course consists of 2 lecture hours a week plus 8 closed labs. Every week, except for weeks 1, 4, 7, 10, 13, you must go to your closed lab. There are assignments (due roughly every two weeks), a midterm test, and a final exam.

The lecture slides are available on the "Lecture Slides" page. There are also handouts related to course material on the "Course Handbook" page.


Please read the announcements below at least twice a week. You should also read the announcements page associated with the current assignment, including at least once within 48 hours of the due date of the assignment.

The first letter(s) of the date indicates the day of the week, and is one of Su M T W R F Sa.

Date Title Announcement
M 26 May More UTM Office Hours

For those of you who weren't able to come see me next week, I'll be at UTM in the afternoons on Monday 9th and Tuesday 10th, if you want to come by to pick up your projects, pick up your marked A5, vent about the course, whatever you fancy.

M 26 May UTM Office Hours (cont'd)

Just to supplement the announcement of my office hours this week, come by in the afternoon if you want to catch me, since I'm usually busy with other duties in the morning.

W 21 May UTM Office Hours

I'll be coming into UTM on Monday, Tuesday and Wednesday of next week. I'm sure that all of you have missed me terribly, or at least you've missed your A5 handins and your projects. There will be an abundance of both next week, so come on in and claim your stuff, or just come in and say hi. After next week I'll probably come in to make myself available for another few days, and then I'll have to figure out where old CSC148 stuff usually goes after the term is over.

W 21 May Project test cases

The project test cases are up.

W 21 May Project update

Important: read this whole message. All but a few projects are in. You can come to pick them up at my office (SE4041). Please do not email me about your mark until you have picked up your project.

The marks for the assignment were low. Here is what a TA wrote:

              "I keep looking at the rubric and the marking scheme, and asking
              myself why the students are doing so badly, but I can't find
              anything that is unfair. Each column on the rubric in itself
              contains an idea that is trivial."

Here is the rubric. You will find a copy of it in your project.

We gave a letter grade on the project. Normally, the university uses this table to do the grade conversion:

            grade   min     max     value
            -----   ---     ---     -----
            A+      90      100     95
            A       85      90      87.5
            A-      80      85      82.5
            B+      77      80      78.5
            B       73      77      75
            B-      70      73      71.5
            C+      67      70      68.5
            C       63      67      65
            C-      60      63      61.5
            D+      57      60      58.5
            D       53      57      55
            D-      50      53      51.5
            F       0       50      17.5

We have decided to use the max column instead of the value column. For example, an A+ is worth 100, not 95, and an F is worth 50, not 17.5.

After adjustments, the average for the projects was 65%.

F 2 May Exam and solutions

We don't normally do this, but we've typed up some exam solutions and posted them on the Tests page.

F 25 Apr Assignment Remarks

"When will the remarks be ready?"... "When will the remarks be ready??"... "When will the remarks be ready???"...

For all those who are wondering, most of the remarks are finally ready. Check to see what changes took place. I know that A1 and A2 have been remarked (except in a few exceptional cases), and I believe that A3 is remarked as well. In any case, they'll all be done soon.


F 25 Apr A5 solutions!

Thanks to Gary, here are the a5 solutions.

R 24 Apr Mead Notebook

So somebody left their CSC108 and CSC148 notes in the lecture hall after the last Friday class. With the final exam coming up, you'd think that somebody would have asked me about it by now. Oh well.

Anyway, if it's yours, come and get it from me. I'm here today (Thursday) and will be back next Tuesday as well.

T 22 Apr 2003 exam

We have provided the front page and last three pages of this year's exam on the Tests page.

M 21 Apr Office Days

I'll be at UTM on Tuesday 22nd, Thursday 24th, and most likely Tuesday, Wednesday and Thursday of next week.

F 18 Apr Catching up

Question: I feel like I'm really behind. What can I do to catch up?

Answer: First, make a list of the topics that you are having trouble with. Then: look in Big Java (and Program Live). Study the appropriate sections, and do all the exercises you can find. Just look in the indices for the topics in your list.

More: get all the old exams and midterms, and look for questions on the topics. Do the problems, and come ask us questions in office hours!

There are also some online exercises that you can work through: Exercises #1 and Exercises #2.

T 15 Apr A4 test cases

Here are the JUnit test cases for A4:,,, and

M 14 Apr Office Hours

I'll be conducting office hours on Tuesday and Thursday this week, for those of you who want to come by. I'll be around in the afternoon for sure, and maybe in the late morning, if I get my act together in time.

M 14 Apr Last fall's exam

I just posted a link to fall 2002's exam on the Tests page, along with a link to the University's webpage of old exams.

W 9 Apr Make-up Labs Anybody who missed their lab on Friday because of the weather can come in and do your lab this Friday instead.
Su 6 Apr A5 Extension Because of bad weather conditions, A5 is extended until Wednesday, with the same lateness penalties as described earlier for the assignment. Please attend the lecture on Monday, since that will give you more examples of O(..) and a chance to ask Michelle Craig questions that might help for the assignment.
Sa 5 Apr Makeup Lecture (IMPORTANT!!) There will be a makeup lecture during Monday's usual lecture time (2pm-3pm), for the material that was missed during the school closure on Friday.

I'm sorry for the last-minute notice, but there's very little choice at this point. No extra lecture times are allowed for this course, and lectures after the course is over are explicitly forbidden. And since the final has already been sent in, we can't just let a topic drop.

So Monday's lecture will cover examples of O(..), and how to find runtime formulas from a segment of code. I still have to teach downtown on Monday, so Michelle Craig has been kind enough to teach the lecture for me.

Please spread the word. Remember that contact information I asked you to get at the beginning of the term? Call people, let them know. I have no email list, so I'm trusting you all to make sure your classmates don't miss any lectures.

F 4 Apr A5 Submission For those who haven't assumed as much already, follow the same directions for submitting your A5 as for submitting your A2 and your project. Also, the deadlines will be the same as with the project. Hand in by noon, anything later will be penalized appropriately, blah blah blah. See last week's project announcement for more specific details, if you've forgotten.
F 4 Apr Winter Wonderland In case you didn't see the UTM web page, or just wanted a confirmation, classes have been cancelled at UTM today. Happy April everybody. What that means for our classes is uncertain, because I still have 3 lectures worth of material to go through, and only 2 official lectures to get through it. There might be extra lectures scheduled for next week, there might not. I will keep you updated with the latest news, as soon as I get it.

I'll still be in today, if you still want to visit or ask me questions today. Call before you come, to make sure that I'm there.

In the meantime, why not go on the web and read up a little on big-oh notation between 2 and 3 today, so that you're all ready for class on Wednesday? I think that would be a faboo idea :)

Mo 31 Mar Why did we have to print the project?

Question: Why did we have to print the project? It's HUGE!

Answer: Four years ago, every assignment in 108 and 148 was submitted on paper. Three years ago, we switched to electronic submission, and had a TA print everything for every assignment. That was always a full day of work, and sometimes two full days: handling printer failures, fixing bad files, and so on. Paying a TA to babysit a printer is a waste of your money.

This year, almost every assignment (on St. George and UTM) was submitted electronically and marked electronically. Over the summer, a student and I wrote a program to allow the TAs to mark electronically. (That's different form automarking: automarking is entirely automatic, and TA electronic marking has the TA insert marking comments into the code and discuss style, design, and so on.)

So we've saved tons of trees this year. But we also believe that it's important to see on paper (and organize) some of the work you've produced, which is one of the reasons why we had you print the project.

Here's a financial reason: when marking a dozen classes, it REALLY helps to be able to lay them out on paper on your desk so that you can see a lot of information at once and quickly jump back and forth. Marking the project electronically would, quite literally, double the marking time. And we don't get enough money from the university to hire more TAs to do that marking.

And last: I think it's amazing how much code you produce during a term. You don't really get the feeling for it until you hold the paper in your hand and leaf through it.

Su 30 Mar Corrected A4 automark There were some mistakes with the way that Dr. Java takes care of certain Iterator cases. Here's the description of the problem:

Many of you will see "Compile Failed" in the top bit 
of the A4 automarking, and you'll also see this error 
in the A4 test case results details:

   java.lang.Exception: java.lang.NoClassDefFoundError: HTMLIterator

It turns out (and we're surprised too) that if you 
implement Iterator like this:

  public class HTMLIterator implements Iterator {

    public String next() {     <-- Return type String
    // other methods omitted

Then it will compile fine in DrJava. But the correct 
signature for next is this:

    public Object next()

The first one *shouldn't* compile; this is a DrJava bug."

The assignments with this problem have been remarked, and revised automark files are now available. If you had this problem, check to see your revised marking at the general submission page.
Su 30 Mar A4 style marking Okay, so there have been a lot of complaints about the style marks for A4. Here is the official explanation from the automarking TAs:

To help you with your programming style, we have run 
CheckStyle on your A4 code. Here is the URL:

CheckStyle is, as you might guess, a style-checking program.

So that you don't worry: we are going to ignore most 
results for the A4 marking. We will only be paying 
particular attention to the 80-character-line rule, 
the 40-line-method rule, and the Javadoc-every-member 
rule. Violating the first will be worth about a 3% 
deduction (only applied once). If you grossly violate 
the 40-line limit we'll apply about a 1% deduction. If 
you miss several Javadoc method comments that will be 
worth another 3% or so.

The rest of the lines below are just for feedback. For 
example, whitespace issues are flagged:


should be written as this:

  (String) s

Notice the space after the cast. A resulting CheckStyle 
line might be 'cast' is not followed by whitespace.

That says that the problem was on line 63 of, 
character 31.

It may seem picky, but professional programmers follow 
these guidelines, and your code will almost always look 
a LOT better if you follow them, too.

You may notice CheckStyle complaining about your brace 
placement. If you are used to placing braces on lines by 
themselves (for example, it is the standard for UTM students), 
feel free to ignore those particular warnings.

CheckStyle is configurable. We have run it using Sun 
Microsystems' recommended style, which is described in 
these documents:

   the Java Language Specification at

   the Sun Code Conventions at

   the Javadoc guidelines at

   the JDK Api documentation

To repeat, the only ones we are using on A4 are the line length, method length, and Javadoc issues. I hope that helps to reassure some people.
Su 30 Mar Project Submission For those of you who didn't come to class on Friday, I announced that the paper submissions for the project don't have to be in by 9am sharp, but definitely have to be in before noon. So if you hand in your paper component by 11:59am, then that's considered to be on time. 12:01 will get the late penalty shown below.

The electronic submission still needs to be done by 9am.

R 27 Mar How to hand in the project

Please put the printouts in an envelope, and attach a cover page. Assignments that have been stapled to the envelope will not be marked: attach the cover page, and THEN put the printouts in. You may need an envelope larger than 8.5" x 11", there are a lot of pages!

Assignments that do not have a cover page will not be marked.

Drop the envelope in the 148 drop box in the computer lab in room SE2045. We'll clear the drop boxes at these times:

              9am Monday (9am sharp please, not 9:10)
              noon Monday (considered 3 hours late)
              4pm Monday (considered 7 hours late)
              9am Tuesday (considered 24 hours late)
              noon Tuesday (considered 27 hours late)
              5pm Tuesday (considered 32 hours late)
M 17 Mar Partner Signup Sorry about the mixup, but the partner signup is now ready, with more explicit instructions as to what it's looking for. You can either sign up with your name and ID, or just your ID. As long as each partner is listed on a separate line, then it's fine.

Happy St. Patrick's Day, by the way :)

R 13 Mar At last! A runnable A2 tester

Here is the test case program, Geoff has written instructions for how to set up and run test cases.

Here are the A2 test cases again. There are 3 files for each test case: an HTML file, the list of tags in that file, and the list of link tags in that file. You can download Stuffit Expander if your computer doesn't have a program to unzip and untar that file.

R 13 Mar Program Signup A general announcement about applying for a program for next year. The process used to be done through paper in the past, but is now being conducted for the first time on ROSI. If you are applying to a particular program (like computer science!), then the signup process will be available starting in April. Just FYI.
W 12 Mar Project and Partner Signup The project description is on the Assignments page, so take a look. Also, the project strongly suggests that you work in pairs. Sign up with a partner on the general submissions page.

To sign up a partner, submit a plain-text file called partners.txt containing the two login names, one per line. If you want to work on your own, (did I mention that this isn't a good idea?) submit the file with just your login name.

Here are sample contents:

If you submit a non-ASCII file, the submission will not work. Open up partners.txt in DrJava to be sure there aren't any strange characters in the file.

The final deadline for signing up with a partner will be Friday, March 20th at noon.

F 7 Mar A2 test cases, revisited Here are the A2 test cases. There are 3 files for each test case: an HTML file, the list of tags in that file, and the list of link tags in that file. You can download Stuffit Expander if your computer doesn't have a program to unzip and untar that file.
M 3 Mar Office Hours for Week 8 My apologies, but I won't be having office hours this week, due to the fact that I must conduct a midterm downtown on Wednesday night, And must mark another midterm Friday night. Office hours will continue next week as before.
M 3 Mar A2 test cases Here are the A2 test cases. There are 3 files for each test case: an HTML file, the list of tags in that file, and the list of link tags in that file.
Sa 1 Mar A4 hints Please see the A4 Announcements page for hints and tips, we've posted an example to help you understand what we want.
F 28 Feb Pre-lab for week 8 There is a pre-lab for week 8. It's just reading, but it will help you get the most out of the lab.
R 27 Feb A4 A4 is posted.
F 21 Feb 40 line rule The 40 line rule is something that's being enforced strictly for all methods except for the main method, which can go a little over 40 lines if absolutely unavoidable. This is because the formatting style taught in 108 at UTM is different from the style taught downtown, in that it involved more space usage.

If you're looking for a way to reduce line usage, consider the following. Instead of:

if (blah)
String s = br.readLine();


if (blah) {

R 20 Feb Closed Lab Week 6 Because of a communication mishap, some people had a lab session last week, and some people didn't. If you missed doing your lab exercises last week, please attend the labs this week, and we will be conducting the lab on exceptions (which should hopefully be very familiar material by now). Sorry for the confusion.
W 19 Feb Two newsgroup announcements
  • If you want to test posting to a newsgroup, please don't test with ut.cdf.csc148h. Instead, test with the CDF test newsgroup.
  • We have removed the link to send email to the newsgroup. The sysadmins have changed the way the newsgroup is accessed, and the email link should no longer be necessary. (And only worked from computers on the downtown campus.)
W 19 Feb Software bugs cost big bucks The need for thinking before coding: a recent study by the U.S. National Institute for Standards and Technology found that software glitches cost the American economy $59.5 billion annually. The study suggests that better testing during software development could reduce that cost by a third, or $22.2 billion per year. According to the study, 80 percent of the cost of developing software goes into discovering and fixing bugs. Because of this, there is an increasing interest in development tools and techniques to both reduce the cost of software development and foster the creation of more robust, reliable code.
T 18 Feb Remark Requests Enough people have asked me these questions to warrant an announcement on the subject. The purpose of the remark requests are as follows:
  • to return marks that were lost because of wording errors in the assignment that caused confusion
  • to adjust marks for people who misinterpreted the assignment description in a small, subtle way that lost many marks (i.e. prompts to the screen, extra spaces in the HTML output).
They are NOT to be used for the following:
  • to get back marks due to programming error (Note: interpretation error != implementation error)
  • to fix things that there wasn't time to fix before the due date
  • to fix silly mistakes.
In other words, take a long, hard look at your assignment and the automark. If you think that the mistakes that lost you marks were yours, then put down that automark form and walk away. If you think that the fault is ours, then fill it out. Make sure you begin by understanding why you lost marks, so that you'll know which category your assignment belongs in.
T 18 Feb Running A1/A3 test cases

In A1, several of you created many BufferedReader objects for the keyboard, which can cause unexpected crashes. (If you passed many of the test cases then you didn't have this problem.) If you did have this problem, then to test whether you fixed it right then download the A1 test cases, start up a command prompt, and run your program like this:

              java A3Driver < 1.dat

That tells Java to take input from file 1.dat rather than from the keyboard, and it will crash if you have more than one BufferedReader for You should try it for several of the test cases, of course.

T 18 Feb File format The HTML input file format is the same as it was in A1.
T 18 Feb Santa's coming to town I'll be at UTM on Thursday to mark your midterms. If you'd like to make an appointment to ask me a quick question, send me an email and I'll let you know where to find me.
T 18 Feb Newsgroup

Many of you seem to be finding the newsgroup useful. That's great! (See the Contact Info page for how to use it.) If you want to use it, please do the following:

  • Turn off MIME and HTML in your newsreader.
  • Include your full name in your posts. We won't answer anonymous posts.
  • Provide a good Subject (such as "A3: what to store in Nodes?"). This helps other students with the same question find the answer.
  • Search through the Subjects to see if your question has already been answered. (If 800+ student use the newsgroup without doing this, the newsgroup rapidly becomes unusable, and we'll stop answering questions.)
  • Collect several questions together into a single post. Don't post them individually, that REALLY clutters the newsgroup.
W 12 Feb Makeup midterm time For those of you who were absent for today's midterm because of Eid, a makeup time and place has been scheduled. The makeup midterm will be held in NE129, that's the NORTH building, room 129, from 11:30 to 12:30 on Friday, Feb 14th. Happy Valentine's Day!
If there are any problems with this time, let me know. However, since this arranging a second midterm is difficult, this time and place will most likely not change, and might only be adjusted slightly.
T 11 Feb Midterm content clarification In case anybody is unclear about this, when I say that the midterm is more theory-based than coding-based, this does not mean that there will not be coding on the midterm. The midterm will still be made up of programming questions, but these questions will test the general concepts from the lectures, instead of just straight programming skill. When in doubt, refer to past midterms as a guide to what questions you can expect.
M 10 Feb Week 6 closed lab, pre-lab "exercise" The week 6 closed lab may help you understand exceptions better, so we've posted it early. There is also a pre-lab exercise: bring a printout of the Exceptions section of the lecture slides to your lab.
M 10 Feb Exception Tutorial Good news: I'm no longer sick, at least not debilitatingly so.
Bad news: My explanation of exceptions last week wasn't as strong as it should have been, especially about RuntimeExceptions.
Good news: There's an exception tutorial on the Java page at Sun's website that explains exceptions and might fill in any gaps that you have from Friday. Take 15 minutes from your busy day and check out the site.
M 10 Feb A3 Due Date There was an error in the due date for Assignment 3. The modified due date is Monday, February 24th, at 9am. Sorry for the mix-up.
T 4 Feb Job discussion on newsgroup ut.cdf.general There's a fun, informative discussion about getting a job in the ut.cdf.general newsgroup. Look for the Subject "Looking for Work".
T 4 Feb A1 failed test cases

It looks like roughly 1 out of every 6 or 7 A1 programs printed prompts, misunderstood what "0-based" meant, or did something other simple mistake that caused almost every test case to fail. That's actually good: that means that 85% of you followed the instructions!

If you did make a small mistake like that, and you figure out exactly how to fix it, we'll be happy to give most of the marks back: please fill out a Remark Request form and give it to your instructor. Be sure to tell us exactly what needs to change --line numbers are helpful-- in order to get your code to work. (Just so you know, it may take several weeks to process them; remarks always take time.)

T 4 Feb Midterm next Wednesday The midterm will happen next week in lecture; the course info sheet was a bit ambiguous.
T 4 Feb A3 posted The Assignment 3 handout is now posted.
F 31 Jan A1 test cases posted We have now posted the A1 test cases that we are using to automark your program.
F 24 Jan A2 part I paper hand-in

Please hand in your envelope containing A2 part I into the CSC148 drop box at SE 2045.

As you know, the due time is 9am Monday. However, we will not collect the A2 part I's from the drop box until 1pm, so as long as you hand in your part I before Monday at 1pm, it will not be considered as late.

We will also collect them at various intervals on Monday and Tuesday after the Monday 1pm deadline. If you submit it late, you will be penalized based on which interval you fall into. Do me a favour though. Submit it on time.

Part II still has the regular 9am deadline.

R 30 Jan Pre-lab exercise for week 5 posted The pre-lab exercise for week 5 has been posted on the Weekly Labs page. Please remember that pre-lab exercises are required: if you do not bring the exercise solution to your lab, you will not be allowed to participate in the lab and you will receive a zero for lab week 5.
R 30 Jan Drop Boxes For Assignment 2, the drop box can be found at SE2045.
R 23 Jan A2 posted The Assignment 2 handout is now posted.
T 22 Jan No lab in week 4 The labs are only in weeks 2, 3, 5, 6, 8, 9, 11, and 12. There are no labs in weeks 1, 4, 7, 10, and 13.
M 21 Jan Java Practice

Question: I didn't do all that well in CSC108/107, and I still have trouble with object-oriented programming. What can I do to make sure I'm better prepared for CSC148?

Answer: Work on these old assignments to get back into practice with object-oriented concepts. (If it's loops an arrays that bug you, try later assignments.)

Tu 21 Jan Extension The submit command had a few problems for the half hour after the 9am submission time. The people who tried to submit then have not been penalized for attempting to submit it later. The problem has also been fixed, and will not happen again.
Mo 20 Jan DrJava debugger Here are some preliminary instructions for how to run the DrJava debugger. We'll be updating this as we get feedback, so please email Paul if you have suggestions.
F 17 Jan Submitting Assignments For those who don't know, you can submit your code for Assignment #1 here, or go to the general assignment page here.
Please Note: When it says to submit "classes" in the instructions, it means your .java files.
F 17 Jan Interfaces and Abstract Classes Here is the interface handout that I promised, which also discusses abstract classes and the difference between the two. In Postscript and Powerpoint format.
F 17 Jan CSC108 vs CSC148 A few have asked whether you can take 148 even if you have failed 108. The short answer: yes you can, the CS Department won't drop you from the course. The longer answer: Is that a good idea? Only do this if you think you failed 108 because of a silly mistake, and that you understand the 108 material.
F 9 Jan Monday's class There are no TAs available to tutor Monday's lecture session, so it is a free period for your own personal CSC148 studies. Please Note: It will probably be used for the midterm or other unscheduled class-related sessions, so don't schedule anything for that time that can't be changed later.
R 8 Jan Lab next week Here is a brief introduction to DOS. If you are not familiar with DOS, please read it before your lab next week.
R 8 Jan Pairs? All the assignments (A1-A5) are to be done alone. For the project, partners are optional.
R 8 Jan A1 due date Just to make sure: the due date is 9am Monday 20 January. There was a typo on the Assignments page, which is now fixed.
R 8 Jan Lectures/tutorials/labs There is some confusion about this term's schedule. Here it is: you have two lectures a week and two lab hours a week. The empty slot on Monday might still be filled with something, but we have not decided what yet.
W 07 Jan A1 posted The Assignment 1 handout is now posted.
R 29 Dec Read announcements Read the announcements: Read this announcements page at least twice a week.

Administrative Information

Other Web Resources at UofT

Send email to CSC148H.

Last modified: Mon Dec 30 21:05:51 EST 2002
Valid HTML 4.01!