For unlimited access to Study Guides, a Grade+ subscription is required.
First Name:Last Name:
Faculty of Science
COMP-202B - Introduction to Computing I (Winter 2009) - All Sections
Wednesday, April 29, 2009 Examiners: Mathieu Petitpas [Section 1]
9:00–12:00 Prof. Xue Liu [Section 2]
Ekwa J. Duala-Ekoko [Section 3]
•DO NOT TURN THIS PAGE UNTIL INSTRUCTED
•This is a closed book ﬁnal examination; notes, slides, textbooks, and other forms of documentation
are not allowed.
•Non-programmable calculators are allowed (though you should not need one).
•Computers, PDAs, cell phones, and other electronic devices are not allowed.
•Answer all questions on this examination paper and return it. If you need additional space, use
pages 21-22 or the booklets supplied and clearly indicate where each question is continued. In order
to receive full marks for a question, you must show all work.
•This ﬁnal examination has 24 pages including this cover page, and is printed on both sides of the
paper. Pages 23-24 contain information about useful classes and methods.
1 2 3 Subtotal
/10 /5 /5 /20
4 5 6 Subtotal
/10 /10 /10 /30
7 8 9 Subtotal
/15 /20 /15 /50
COMP-202B - Winter 2009 - Final Examination Page 2
Section 1 - Short Questions
1. In one or two sentences, explain the differences between the concepts in each of the following pairs.
BE BRIEF; overly long answers will be grounds for mark deductions.
(a) An if statement and a while statement
(b) Classes and objects
(c) Instance variables and class (or static) variables
COMP-202B - Winter 2009 - Final Examination Page 3
(d) An array and an ArrayList
(e) Checked exceptions and unchecked exceptions
2. The most common method students encounter in this course is the main() method; its header can
have slight variations but is usually the following:
public static void main(String args)
In one or two sentences, describe what each of the following elements of the header of the main()
method means. BE BRIEF; overly long answers will be grounds for mark deductions.