COMP-202 - Introduction to Computing 1 (Winter, 2004)

Welcome
News
Syllabus
Calendar
Assignments
Office hours
Hints
Links
Resources

News

  • May 6: The final grades have been posted on WebCT and Minerva. If you want to see your final exam, come to my office (MC 202).   
  • April 30: Solutions to the final exam will not be posted for now. Nonetheless, anyone interested in looking at the solutions can come to my office (MC 202) starting from next wednesday (May 7th). Please do not come this week as I'll be very busy grading.   
  • April 28: The final exam will take place tomorrow (Tuesday, April 29th) at 9:00am in Burnside Hall and Otto Maass. Room and seating arrangements will be posted in the lobby of the appropriate building, so arrive early. Do not forget to bring your student ID card. The exam is closed-book. No notebooks, textbooks or any other kind of notes are allowed. No calculators, laptops, cell phones or hand-held computers are allowed. Only language translation dictionaries are allowed. Good luck.   
  • April 25: I (Ernesto) will be giving the tutorial scheduled for Monday, April 28th at 14:00, at MC 103.   
  • April 25: Due to the ongoing TA strike, all of the remaining tutorials have been cancelled until further notice. It is likely that a tutorial will be held by me (Ernesto) on the 28th. Please check the website for further updates.   
  • April 17: Due to a mix-up, one of the tutorials that was supposed to be held today wasn't held. Instead it will take place next tuesday. We apologize for the inconvenience. The revised schedule for the remaining tutorials is as follows:
    Name Tutorial date Tutorial time Room
    Christian Roy Tuesday, April 22th 11:00 - 12:00 MC 103
    Tiantian Jiang Wednesday, April 23th 11:00 - 12:00 MC 103
    Jie Xiong Friday, April 25th 10:00 - 11:00 MC 103
    Hao Zhang Friday, April 25th 11:00 - 12:00 MC 103
    Sherif Refaat Shaker Monday, April 28th 14:00 - 15:00 MC 103
      
  • April 17: Solutions for assignment 6 have been posted in the Assignments section.   
  • April 14: The revised schedule for the tutorials for the final are as follows:
    Name Tutorial date Tutorial time Room
    Yisheng Liu Monday, April 14th 11:00 - 12:00 MC 103
    Xuechun Lu Monday, April 14th 15:00 - 16:00 MC 103
    Xue-Chao Hu Tuesday, April 15th 14:00 - 15:00 MC 103
    Christian Roy Thursday, April 17th 11:00 - 12:00 MC 103
    Tiantian Jiang Wednesday, April 23th 11:00 - 12:00 MC 103
    Jie Xiong Friday, April 25th 10:00 - 11:00 MC 103
    Hao Zhang Friday, April 25th 11:00 - 12:00 MC 103
    Sherif Refaat Shaker Monday, April 28th 14:00 - 15:00 MC 103
      
  • April 10: The tutorials for the final will be held according to the following schedule:
    Name Tutorial date Tutorial time Room
    Yisheng Liu Monday, April 14th 11:00 - 12:00 MC 103
    Xuechun Lu Monday, April 14th 15:00 - 16:00 MC 103
    Xue-Chao Hu Tuesday, April 15th 14:00 - 15:00 MC 103
    Christian Roy Thursday, April 17th 11:00 - 12:00 MC 103
    Sherif Refaat Shaker Monday, April 28th 14:00 - 15:00 MC 103
    Tiantian Jiang TBA TBA TBA
    Hao Zhang TBA TBA TBA
      
  • April 9: Some suggestions on how to study for the final have been posted in the Hints section.   
  • April 3: Solutions assignment 5 have been posted in the Assignments section.   
  • March 31: Assignment 6 has been posted in the Assignments section.   
  • March 26: Some useful examples have been posted in the Resources section.   
  • March 20: Solutions for assignment 4 have been posted in the Assignments section.   
  • March 17: Assignment 5 has been posted in the Assignments section. It is due on March 31st at 23:55 on WebCT.   
  • March 13: Some answers to frequently asked questions about the assignment:

    • Q: Why do I get a ``File not found'' error?
      A: There are three possible reasons:

      • You don't have a maze.data file.
      • The file maze.data is actually named maze.data.txt. This could happen if you downloaded it using Internet Explorer under Windows, then selecting ``Save As...'' and choosing ``Plain text'' as the format. Internet Explorer automatically adds the ``.txt'' extension. This might also happen if you create the text file in JCreator itself. You should rename the file to get rid of the ``.txt''.
      • The file maze.data is not in the same directory (i.e. folder) as the Maze.class and Mouse.class files. Even if the files are in the same project in JCreator, that is no guarrantee that they are stored in the same folder. Make sure that they are in the same folder.
    • Q: Why do I get the following error?
                Exception in thread "main" java.lang.NullPointerException
                        at Maze.draw(Maze.java:93)
                        at Maze.main(Maze.java:143)
                
                
      A: This will happen for different reasons:

      • Your maze.data file has no mouse
      • The mouse has gone out of bounds.
      • The file maze.data is in the wrong format. If you download the file with Internet Explorer, and use the ``Save As..'' option, but do not specify the type of the file as ``Plain Text'', the file will be saved as an HTML document. The Maze program will not recognize this format. This will also happen if you use text editing tool that saves in specialized formats such as MS Word documents.
      
  • March 11: TA office hours change for this week only: Jie's office hours this week will be March 12th from 3:30pm to 6:30pm. Office hours for the rest of the TAs and instructors are the same.   
  • March 10: A small correction to assignment 4. In question 1, you are asked to write (amongst other things,) a method
    public int cheeses()
              
    This was a typo. The method should be called
    public int cheese()
              
    so that it works correctly with the Maze class.   
  • March 10: The deadline for assignment 4 has been extended until Monday March 17th at 23:55.   
  • March 3: Solutions to assignment 3 have been posted in the Assignments section.   
  • February 28: Assignment 4 has been posted under the Assignments section. It's due Friday March 14th at 23:55.
      
  • February 21: The midterm solutions, with very detailed explanations, have been posted in the Resources section.
      
  • February 20: The 3rd assignment's deadline has been extended until Thursday February 27th at 23:55.
      
  • February 17: Students in section 3 (Klaus's) please note that there was a mistake in the room for the midterm. The midterm will take place in McDonald 280 and not in 208, as was stated before.
      
  • February 17: Solutions to Assignment 2 have been posted in the Assignments section. Also, a reminder that you can find out who marked your assignment in that section as well, just before where the solutions are found.
      
  • February 17: A reminder: The midterm will to be held tomorrow (February 18th) from 18:00 to 20:00 at the following locations:
    Section # Location
    1 (Ernesto's) McConnell Engineering room 204
    2 (Yannick's) McConnell Engineering room 304
    3 (Klaus's) McDonald Engineering room 280

      
  • February 12: The updated rooms for the tutorials are:
    Name Tutorial date Tutorial time Room
    Xue-Chao Hu Friday February 14th 14:30 - 15:30 LEA 321
    Sherif Refaat Shaker Friday February 14th 16:00 - 17:00 MC 103
    Christian Roy Thursday February 13th 13:00 - 14:00 BURN 1B23
    Jie Xiong Wednesday February 12th 14:30 - 15:30 MC 103

      
  • February 11: Assignment 2 will be accepted without penalty until tomorrow at 23:55. There will be no submissions accepted after that. If you already submitted yours, but want to work further in it you can resubmit it. If you want to resubmit but the regular box is locked, submit it to the problem box.
      
  • February 11: The tutorials are to be held at
    Name Tutorial date Tutorial time Room
    Xue-Chao Hu Friday February 14th 14:30 - 15:30 LEA 321
    Tiantian Jiang Tuesday February 11th 11:00 - 12:00 MC 106N
    Yisheng Liu Wednesday February 12th 10:00 - 11:00 MC 106N
    Sherif Refaat Shaker Friday February 14th 16:00 - 17:00 MC 103
    Christian Roy Thursday February 13th 13:00 - 14:00 BURN 1B23
    Jie Xiong Wednesday February 12th 14:30 - 15:30 MC 103
    Hao Zhang Tuesday February 11th 13:30 - 14:30 MC 106N

      
  • February 10: Assignment 3 has been posted in the Assignments section. It is due on February 24th at 23:55 on WebCT.
      
  • February 7: Next week (February 10th to February 14th) there will be tutorials for preparation to the midterm. The preliminary schedule for the tutorials is as follows:
    Name Tutorial date Tutorial time
    Xue-Chao Hu Friday February 14th 14:30 - 15:30
    Tiantian Jiang Tuesday February 11th 11:00 - 12:00
    Yisheng Liu Wednesday February 12th 10:00 - 11:00
    Xuechun Lu Monday February 10th 13:00 - 14:00
    Sherif Refaat Shaker Friday February 14th 16:00 - 17:00
    Christian Roy Thursday February 13th 13:00 - 14:00
    Jie Xiong Wednesday February 12th 14:30 - 15:30
    Hao Zhang Tuesday February 11th 13:30 - 14:30

    Note: these times might change during the weekend, so please check again for a definite schedule.
      
  • February 7: The original version of the assignment asked at the end to ``jar'' all the files. Please ignore that comment, and submit the assignment just as you did with assignment 1.
      
  • February 5: Clarification for assignment 2: In question 2, you are allowed to use only the methods charAt, length, and toLowerCase from the String class, in addition of the usual constructs (assignment, conditionals and loops), and the System.out.println method as well as the Keyboard methods. However you are not allowed to use any other methods such as substring, matches or regionMatches.
      
  • February 2: You can get the Keyboard class from the Resources section. The link gives you instructions on how to install it. If you use the lab and it is not installed in your machine, you should install it yourself. There are basically two ways of doing this:
    Alternative 1
    Get the Keyboard.java file and add it to any project that uses it.
    Alternative 2
    Get the cs1.jar.zip file, decompress it (for example using WinZip) and copy the decompressed file cs1.jar to the \jre\lib\ext subdirectory of the JDK or J2SDK (for instance if the JDK is installed in C:\j2sdk_1.4.1 then the file cs1.jar should be copied to C:\j2sdk_1.4.1\jre\lib\ext). Then you must use import cs1.Keyboard; at the beginning of your programs that require it.

    The first alternative is probably the easiest if you use the lab.
      
  • January 31: Solutions to assignment 1 have been posted on the Assignments section.
      
  • January 30: A sample midterm and some suggestions on how to study for the midterm have been posted under the Hints section.
      
  • January 27: Assignment 2 has been posted on the assignments section. This is due Monday February 10th at 23:55 on WebCT.
      
  • January 24: The midterm will to be held on Tuesday February 18th from 18:00 to 20:00 at the following locations:
    Section # Location
    1 (Ernesto's) McConnell Engineering room 204
    2 (Yannick's) McConnell Engineering room 304
    3 (Klaus's) McDonald Engineering room 208

    If you have a conflict, please inform your instructor as soon as possible.
      
  • January 23: A link to the Keyboard class has been added in the Resources section.
      
  • January 16: A small correction should be made to question 4 of assignment 1. The two lines after /* calculate desired weight range */ should have / 10000 at the end:
                target_weight_low == Height_cm * Height_cm * target_BMI_low / 10000;
                target_weight_high == Height_cm * Height_cm * target_BMI_high / 10000;
          
              
      
  • January 14: Section 1 (Ernesto's) will move to McDonald Engineering room 279 (note that the building is McDonald, not McConnell,) starting on Wednesday January 15th.
      
  • January 13: Assignment 1 has been posted on the assignments section. This is due Monday January 27th at 23:55 on WebCT.
      
  • January 10: Section 3 (Klaus's section) will be moved to Burnside Hall 1B36, starting on Monday January 13.
      
  • January 8: The tutorials on WebCT and JCreator will be held at McConnell 106N, on the following dates and times:
    Name Tutorial date Tutorial time
    Xue-Chao Hu Friday January 17th 13:00 - 14:00
    Tiantian Jiang Thursday January 16th 13:00 - 14:00
    Yisheng Liu Wednesday January 15th 12:00 - 13:00
    Jie Xiong Wednesday January 15th 14:00 - 15:00
    Sherif Refaat Shaker Friday January 17th 14:00 - 15:00
    Christian Roy Tuesday January 14th 10:00 - 11:00
    Xuechun Lu Tuesday January 14th 15:00 - 16:00
    Hao Zhang Tuesday January 14th 11:00 - 12:00

      
  • January 7: Ernesto Posse's office hours have changed to Wednesdays from 2:30 pm to 4:30 pm.
      
  • January 6: Lectures begin.