Fall02Midterm1SolutionAndCriteria

# Fall02Midterm1SolutionAndCriteria - CS 307, Fall 2002,...

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

Sheet1 Page 1 CS 307, Fall 2002, Midterm Solution and Criteria A word of explanation. If students ask what a particular acronym means here are some common ones: GCE: Gross Conceptual Error. The student was way off base and did not seem to really understand what the question require d AIOBE: Array Index Out of Bounds Expcetion. The code could result in an Array Index Out of Bounds Excpetion. Not always, b NPE: Null Pointer Exception. The code could result in a Null Pointer Exception. BOD: Benfit of the Doubt. We spotted them this one. ABA: Answer by accident. They have the right answer, but the wrong approach. This one does not show up much In general on coding questions if it really works (we could type it in, correct the minor syntax errors, and run it) the student sho u GACK: The code is very difficult to understand or follow. 1.Answers as shown or -2 A.3.5 (extra 0's on end okay, e.g. 3.50000) B.9 C.5 10 6 8 12 4 15 20 1 (all on one line okay) ( D.10 40 30 35 E.syntax error or compile error F.50 75 6 4 Scale Factor 5 (different capitilzation okay) G.false (ignore capitilzation differences, f -> -1, 0 -> -2) H.true ( ignore capitilzation differences, t -> -1, 1 -> -2) I.2 1 8 J.Runtime error or Null Pointer Exception K.Runtime error or Array Index Out of Bounds Exception (-2 -1 0 1 2 3 4 5 6 7 8 9 10 11 12 then runtime error okay too)

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

View Full Document
Sheet1 Page 2 L.25 16 9 4 1 M.5 N.list.length ^ 3 O.20 or compile error (temp not initialized) O 2. Model Solution public EncodeData[] compress(boolean[] data) { EncodeData[] result = new EncodeData[data.length] int numDataObjects = 0 byte runLength = 1
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 at Austin.

### Page1 / 12

Fall02Midterm1SolutionAndCriteria - CS 307, Fall 2002,...

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

View Full Document
Ask a homework question - tutors are online