Final Exam Postmortem (Fall 2001)

Math 10 -- D. C. Smolarski, S.J.
Santa Clara University, Department of Mathematics and Computer Science

[Return to Math 10 Homepage]

Problem References

  1. Cf. Final Review, n. 2
  2. Final Review, n. 11
  3. Final Review, n. 1, Cf. Practice Prob. 2, n. 4.
  4. Final Review, n. 7
  5. Final Review, n. 6, Cf. Practice Prob. 6, n. 8 (converse)
  6. Cf. Practice Prob. 5, n. 4, Final Review, n. 5
  7. Final Review, n. 9, Practice Prob. 5, n. 1
  8. Cf. Practice Prob. 6, n. 1, 5
  9. Cf. Practice Prob. 6, n. 3

NOTES:

General:

Prob 1: Several people forgot to put in multiplication signs. A number of people put in a float before totdollars. Stylistically, it is preferable to keep declaration of variables separate from complicated assignments, lest variables go out of existence when you did not intend. Some divided by 100 rather than the float value, 100.0. Doing this would result in a final value of 0.00.

Prob 2: Some people confused the "function" of first and last and assigned them the values of the contents of the array rather than the subscripts 0 and arrlimit. Some people ignored the necessity of shifting last and first by one (i.e., of using middle-1 or middle+1).
Others used the values contained in the array elements rather than the subscripts.

Prob 3: Some people divided by 10 rather than by 10.0. Since an "average" is rarely an integer, one needs to divide by a float in order to get a float as an answer. Since the array itself is integer, sum can be a simple integer variable and initialized to 0 rather than 0.0.

Prob 5: This was basically a problem in seeing if people understood truth table logic and the use of nested if statements.

Prob 6: The last part was to create an "assignment" statement, i.e., one with an equals sign in it, which is the "equivalent" of the sequence of operations. The order of the variables should have been the same (except for the D at the end). The D should have been on the LEFT side of the equals sign (the only legal way to write an assignment statement in C++).

Prob 7: A number of people dropped the person. part of the variable person.units. Other included extraneous if clauses or forgot the "if" and tacked on a condition on the "else." Depending on the order, and whether an = appeared with a < or > sign, it could happen that code could set person.tuition twice, once if person.units were less than 12 and a second time if it were less than 20. Thus, "else" clauses were necessary (or large conditions in the "if"). A few people neglected the intermediate values (between 12 and 20) and a few actually put in the "$" which would give an error.

Prob 8: Some people did not use the mod operator, %, correctly. Also, a few people had cout statements which was not requested at all. "returning" a value means passing the value back to the calling code and not "outputting" that value. Some people wrote code that detected that the input was even rather than odd.

Prob 12: Overloading functions names -- see Notes N21.

Templates deal with an interdeterminate variable datatype when defining a class or a function. The datatype is determined when the class or function is actually used. (Notes N23)

inheritance -- see Notes N14.

const variable parameter modifiers -- see Notes M1.

Prob 14: Some people seemed to reverse the meaning of value and variable parameters. Some people had the same answers for both sections of the problem.

Everyone seems to have forgotten in the first piece of code, that since both i and j are linked (by address) to n in the calling line of the main program, i and j are basically the same variable inside of the function ifunny. Thus when one changes value, so does the other.

Prob 15: The iterative version (first code) should have an explicit loop in it (the for loop is the easiest to use) and no function call to itself.

The recursive version (second code) should have NO loop and an explicit call to the same function. Recursive routines must have some way of stopping, usually corresponding to "base" case of the function (in this case, most correct codes returned a value of n if the input value of m was 1).

Prob 16: Some people did not remember the class discussion on this topic (cf. Notes N22). "Pointer" notation refers to the use of the *. The "->" symbol is a shortcut for the * and . combination when you have a class being pointed to (as in a node), but the "->" symbol cannot be used with arrays since there is no subsections of an array element (in general). A few, for some reason, reversed the order of the assignment (the left side became the right and vice versa). This was almost identical to the Practice Problems 6, num. 3.

Statistics

Scores, raw and normalized
      final   nfinal
	193	  75
	191	  74
	182	  68
	181	  68
	180	  67
	176	  65
	172	  62
	168	  60
	160	  55
	158	  54
	156	  53
	154	  52
	151	  50
	149	  49
	147	  48
	146	  47
	145	  47
	136	  41
	126	  35
	126	  35
	126	  35
	117	  30
	113	  28
	101	  21
	 86	  12
                    
MAXIMUM 200      100

Distribution

                  x
                  x
                  x         x
                  x         x
             x    x    x    x
        x    x    x    x    x
        x    x    x    x    x
   x    x    x    x    x    x
   80- 100- 120- 140- 160- 180-
   99  119  139  159  179  200

  (1)  (3)  (4)  (8)  (4)  (6)

Number of Perfect Scores per Problem

  1. 16/26 "easiest"
  2. 3
  3. 7
  4. 14
  5. 12
  6. 13
  7. 7
  8. 14
  9. 13
  10. 15
  11. 4
  12. 4
  13. 7
  14. 0 "hardest"
  15. 3
  16. 7
  17. (ethics discussion)

This page is maintained by Dennis C. Smolarski, S.J. dsmolarski@math.scu.edu
© Copyright 2001 Dennis C. Smolarski, SJ, All rights reserved.
Last changed: 5 December 2001.