Fall09_M1_SuggestedSolutioAndGradingCrit

Fall09_M1_SuggestedSolutioAndGradingCrit - CS307 fall 2009...

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

View Full Document Right Arrow Icon
CS307 fall 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. [4, 4, -1] (comma differences and brace differences okay, just need 4, 4, and 1 in that order.) B. 5 C - E. Can be other than valid / invalid. Some way of saying declaration is okay or not. Explanations NOT needed. -1 each part C. 1. invalid 2. valid D. 1. invalid 2. valid E. 1. valid 2. valid F. 4 G. 0 H. 6 12 I. 7 J. 0 0 K. t4's declared type is TotalPoints. The TotalPoints class does not declare a method named win so the compiler does permit the statement t4.win(); (Or words to that effect. Possible -1 if close, but not completely correct.) L. No output due to a ClassCast exception. (Exception or runtime error acceptable as well. No credit for syntax error or just error.) M. The statement w7.wins *= 2; attempts to access a private instance variable outside the class.
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. false O. 0 [5, 3, 0] (comma differences and brace differences okay.)
Background image of page 2
2. This was an meant to be an easy question. The only real complexity was making checking the bounds on the other IntList. Some mistakes made on accessing other's native array of ints other[index] is wrong. other.container[index] is correct and okay since we are in the IntList class we
Background image of page 3

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

View Full DocumentRight Arrow Icon
Image of page 4
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 / 9

Fall09_M1_SuggestedSolutioAndGradingCrit - CS307 fall 2009...

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

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