Fa05M1SolnAndCriteria - CS307 Midterm 1 2005 Suggested...

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

View Full Document Right Arrow Icon
Suggested Solutions and Grading Criteria Abbreviations definitions: OBOE - Off By One Error AIOBE - Array Index Out of Bounds Exception LE - Logic Error GCE - Gross Conceptual Error ATQ - Answer the Question BOD - Benefit of the Doubt Gack - works, but poor style or difficult to understand. (no points off) 1. Answer as stated or -2. Differences in spacing, capitalization, or extra "s okay. A. 4 8 B. 35 C. Knife D. 24 E. 3 4 5 1 3 4 F. 1 8 8 G. 1 8 1 H. Syntax error / Compile error (due to myLength being private. Do not need to state reason for full credit.) I. color: pink, length 2 J. color: orange, length 1 K. Syntax error / Compile error (due to trying to instantiate an object of an abstract class.Do not need to state reason for full credit.) L. color: Yellow, length 2 M. false (or f) -2 if answer 0 N. No, because object variables can refer to objects of their declared type or any descendant. All classes are descendents of Object so variables or type Object can refer to any object. (or words to that effect.) O. Yes. A null pointer exception could occur if the value copied into c is null. (or words to that effect.)
Background image of page 1

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

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 5

Fa05M1SolnAndCriteria - CS307 Midterm 1 2005 Suggested...

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

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