Sp09m1Crit - CS307 Spring 2009 Midterm 1 Solution and...

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

View Full Document Right Arrow Icon
CS307 Spring 2009 Midterm 1 Solution and Grading Criteria. Grading acronyms ABA - Answer by Accident AIOBE - Array Index out of Bounds Exception may occur BOD - Benefit of the Doubt. Not certain code works, but, can't prove otherwise ECF - Error carried forward. Gacky or Gack - Code very hard to understand even though it works or solution is not elegant. (Generally no points off for this.) GCE - Gross Conceptual Error. Did not answer the question asked or showed fundamental misunderstanding NAP - No answer provided. No answer given on test NN - Not necessary. Code is unneeded. Generally no points off NPE - Null Pointer Exception may occur OBOE - Off by one error. Calculation is off by one. 1. Answer as shown or -2 unless question allows partial credit. No points off for differences in spacing and capitalization. If quotes included, okay. A. 20 5 B. false C. [3, 1] (comma differences and brace differences okay, just need 3 and 1 in that order.) D. exception. (All that requires is exception or runtime error or ArrayIndexOutOfBounds error. Just error is -2.) E. assertions (or assert statements) 1 point if statement / throw IllegalArgumentException 1 point (or words to that effect) F. 2 G - I. Can be other than valid / invalid. Some way of saying declaration is okay or not. Explanations NOT needed G. 1: invalid (GroundUnit does not implement Movable) 2: invalid (Can't instantiate (create) objects that are interfaces) H. 1: valid, 2: invalid (Object variables can't refer to types that are ancestors) I. 1: valid, 2: invalid (Same as G.1.) J. genI 20 K. MaxI 15 L. The code does not compile because the Tank class does not have a default constructor. (Or words to that effect. -1 allowed if answer is close.) M. 4
Background image of page 1

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

View Full DocumentRight Arrow Icon
N. TexII 25 O. The code does not compile because the declared type of the variable m5 is Movable so only methods from that type (interface) can be called. (Or words to that effect. -1 allowed if answer is close.) ------------------------------------------------------------------------------- 2. Comments: A simple problem of implementing a class with some interesting
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.

This note was uploaded on 11/30/2010 for the course CS 307 taught by Professor Scott during the Spring '08 term at University of Texas.

Page1 / 5

Sp09m1Crit - CS307 Spring 2009 Midterm 1 Solution and...

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