Winter 2004
CS 31 (Shinnerl)
Practice Midterm
Leave this grid blank, please.
I
II
III
Total
Instructions:
(i)
Do not start yet! Keep the exam closed until instructed otherwise.
(ii) One two-sided sheet of self-prepared notes only is allowed; otherwise,
no books, notes, or calculating
devices
. You are
not
allowed to use your own scratch paper. The back pages of this exam may be used
as such. Should you need more paper during the exam, more is available at the front of the room.
(iii) Keep your photo-ID out on your desktop where the proctors can find it. They will come by during the
test to check it.
(iv) There is a
strict
time limit of
1 hour and 45 minutes
for this exam. Time warnings will occasionally
be posted on the board in front. When time is up, you must stop work
immediately
to avoid a 10%
penalty.
(v) This exam consists of three parts. There are 18 multiple-choice questions worth 2 points each in Part I, 5
short-answer questions worth 6 points each in Part II, and 4 short coding questions worth 10 points each in
Part III. The total number of points possible is 106, of which 6 points are extra credit. The questions are
not
necessarily in order of increasing difficulty! Answer the easier questions first. Save difficult questions
for last.
(vi) Should corrections or hints be deemed necessary, they will be written on the board in front.
(vii) Please provide the information requested below. Scores will be posted online at the
my.ucla
web site in
a couple of days.
Name (print)
E-mail address:
Student ID number:
Signature:
Discussion Section Number and Time:
TA’s Name:
This
preview
has intentionally blurred sections.
Sign up to view the full version.
Winter 2004
CS 31 (Shinnerl)
Practice Midterm
2
Part I: Multiple choice questions (2 points each)
Select the
single
best answer to each question. Write your answers in the following table.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Question
1.
What distinguishes the object-oriented paradigm from the procedural paradigm?
(a) The latter is user-centric. The former is programmer-centric.
(b) The latter is programmer-centric. The former is user-centric.
(c) The latter is data-centric. The former is method-centric.
(d) The latter is method-centric. The former is data-centric.
(e) The former is concrete; the latter is abstract.
Question
2.
What is the principle of
structured programming
?
Question

This is the end of the preview.
Sign up
to
access the rest of the document.
- Fall '08
- Smallberg
-
Click to edit the document details