COMP SCI 1MD3 Course Outline

Introduction to Programming



  • The final review questions are posted, see under Final.
  • A new version of ch11.ppt, with a couple of slides added to the end, is posted.
  • A program is posted after ch06.ppt to show how the Rational class is defined and used in the program.
  • You can pick up the midterm from my office ITB/246.
  • Lab tutorials
    12/01, Mo, 13:30, L02, BSB/244, Barak GALL
    12/01, Mo, 13:30, L03, JHE/233A, Yuhang ZHAO
    Items: Final review questions and assignments.
  • ===========================================================================


    Dr. Sanzheng Qiao
    ITB/246, ext. 27234,

    Office Hours

    Tuesdays 14:30-15:30
    You can always email me to set up an appointment. You are also welcome to drop by my office at other times and check if I am free.

    Course Assistance

    ALI, Mubarak (alim53)
    GALL, Barak (gallb)
    SHUKRI, Muhammed (shukrim)
    ZHAO, Yuhang (zhaoy36)
    BOKHARI, Asghar (bokhari), Drop-in Centre, ITB/101C, x27554
    NAKAMURA, John (nakamura), Drop-in Centre, ITB/101B, x27017


    Term I, 2008-2009
    C01 Tu, We, Fr, 12:30-13:20, ABB/102
    L01 Tu 13:30-14:20, BSB/244
    L02 Mo 13:30-14:20, BSB/244
    L03 Mo 13:30-14:20, JHE/233A

    Calendar Decription

    Introduction to disciplined programming: programming environments; debugging; imperative programming constructs; values and types; libraries; file input-output. Computer Science concepts are illustrated.
    Prerequisites: Credits or registration in one of ARTS&SCI 1D06, MATH 1A03, 1M03, 1N03, 1X03.
    Antirequisite: ISCI 1A24

    Course Objectives

    By the end of this course students will be able to

    develop simple well-structured programs;

    learn basic techniques in disciplined programming;

    understand some fundamentals of computer science.


    A brief view of computer hardware: CPU and memory;

    Algorithms and programming process;

    Programming disciplines;

    Programming idioms and patterns;

    Primitive data types;

    Constants and variables;

    Operators and operands;


    Assignment statements;

    Control statements and problem solving;

    Methods and mechanisms for hiding complexity;

    Designing for change;

    Mechanics of the method-calling process: parameter passing;

    Decomposition: designing from top down;

    Objects and classes;

    Characters and strings;


    File input-output.

    Evaluation Scheme

    four programming assignments, 32%
    midterm examination (one-hour, closed book), 20%
    final examination (two-hour, closed book), 48%
    Deferred examination may be oral.


    Eric S. Roberts. The Art & Science of Java. Addison Wesley, 2008.
    ISBN-13: 978-0-321-48612-7
    ISBN-10: 0-321-48612-9


    Only the McMaster Standard calculator will be permitted in tests and examinations. This is available at the McMaster Bookstore.

    Academic Dishonesty

    You are expected to exhibit honesty and use ethical behaviour in all aspects of the learning process. Academic credentials you earn are rooted in principles of honesty and academic integrity.

    Acamedic dishonesty is to knowingly act or fail to act in a way that results or could result in unearned academic credit or advantage. This behaviour can result in serious consequences, e.g. the grade of zero on an assignment, loss of credit with a notation on the transcript (notation reads: "Grade of F assigned for academic dishonesty"), and/or suspension or expulsion from the university.

    It is your responsibility to understand what constitutes academic dishonesty. For information on the various types academic dishoesty please refer to the Academic Integrity Policy, located at

    The following illustrates only three forms of academic dishonesty:

    Plagiarism, e.g. the submission if work that is not one's own ir for which other credits has been obtained.
    Improper collaboration in group work.
    Copying or using unauthorized aids in tests and examinations.

    In case of discrepancy between the online and handout version of the course outline, the handout version shall be taken as correct.

    Faculty Notices

    "The Faculty of Engineering is concerned with ensuring an environment that is free of all discrimination. If there is a problem, individuals are reminded that they should contact the Department Chair, the Sexual Harrassment Officer or the Human Rights Consultant, as the problem occurs."

    Reading Material

    Addison-Wesley web site


  • Week 1: Introduction (ch00.ppt, ch01.ppt)
  • Week 2: Programming by Example (ch02.ppt)
  • Week 3: Programming by Example (cont.)
  • Week 4: Expressions (ch03.ppt v09-17)
  • Week 5: Expressions (cont.)
  • Week 6: Statements (ch04.ppt v09-27, ch04a.ppt v10-01)
  • Week 7: Statements (cont.),
  • Week 8: Methods (ch05.ppt) v10-07
  • Week 9: Methods (cont.)
  • Week 10: Objects and Classes (ch06.ppt) v10-26,
  • Week 11: Objects and Memory (ch07.ppt) v11-09
  • Week 12: Characters and Strings (ch08.ppt) v11-06
  • Week 13: Arrays; file input-output (ch11.ppt) v11-17, (ch12.ppt) v11-09,
  • Midterm, Oct. 17, Friday, 12:30-13:20, T28.

    Midterm Review
    Midterm Solution

    Final, Dec. 12, Friday, 16:00-18:00, IWC 2 (7).

    Final exam office hours: Dec. 11, Thursday, 14:00-16:00, ITB246.
    Final Review


  • Assignment mechanics (pdf), v09-16
  • Assignment 1 (pdf), due 9/23, Tuesday, 23:59.
    Group A-D: Mubarak ALI (alim53)
    Group E-K: Barak GALL (gallb)
    Group L-Q: Muhammed SHUKRI (shukrim)
    Group R-Z: Yuhang ZHAO (zhaoy36)
    Sample solution:,,,
  • Assignment 2 (pdf), due 10/14, Tuesday, 23:59.
    Group A-D: Yuhang ZHAO (zhaoy36)
    Group E-K: Mubarak ALI (alim53)
    Group L-Q: Barak GALL (gallb)
    Group R-Z: Muhammed SHUKRI (shukrim)
    Sample solution:,,,
  • Assignment 3 (pdf), due 11/4, Tuesday, 23:59.
    Group A-D: Muhammed SHUKRI (shukrim)
    Group E-K: Yuhang ZHAO (zhaoy36)
    Group L-Q: Mubarak ALI (alim53)
    Group R-Z: Barak GALL (gallb)
    Sample solution:,,,,
  • Assignment 4 (pdf), due 11/25, Tuesday, 23:59.,
    Group A-D: Brak GALL (gallb)
    Group E-K: Muhammed SHUKRI (shukrim)
    Group L-Q: Yuhang ZHAO (zhaoy36)
    Group R-Z: Mubarak ALI (alim53)
    Sample solution:,,, Add2Integersjava,,

  • Back to S. Qiao's home page