fall06Prelim1b - NAME _ Cornell Net id _ 1/5 CS100J Prelim...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
NAME ______________________________________ Cornell Net id __________ 1/5 CS100J Prelim 1 25 September 2006 This 90-minute exam has 6 questions (numbered 0. .5), worth a total of 100 points. Scan the whole test before starting. Budget your time wisely. Use the back of the pages if you need more space. You can tear the pages apart; we have a stapler at the front of the room. Question 0 (2 points): Write your name and NetID, legibly, at the top of each page. Question 1 (18 points): Answer the following questions concisely: (a) State the four kinds of variable and where each is declared. (b) State the difference between using == and function equals . (c) Describe how the conditional statement if (<condition>) <statement1> else <statement2> is executed. (d) Below each of the three expressions, write its value. If evaluation leads to an error, write ‘Bad’. “hi” + 4 + 1.5 1.5 + 4 + “hi” 4 + "2"/1 Q 0 /02 Q 1 /18 Q 2 /20 Q 3 /20 Q 4 /20 Q 5 /20 Total /100
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
NAME ______________________________________ Cornell Net id __________ 2/5 Question 2 (20 points). Below are two class definitions, for classes P and S. (a) Draw a manilla folder (or instance, or object) of class P; include the partition for Object.
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 5

fall06Prelim1b - NAME _ Cornell Net id _ 1/5 CS100J Prelim...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online