ulrail.gif

Quiz 3 Grading Guidelines

  ur-2c.gif urrail.gif
blrail-nonavbar.gif

Home | Resources | Homeworks | Exams
Slides | Labs | Contacts | Submit | TAs

br-2a.gif   br-2c.gif brrail.gif
spacer.gif spacer.gif spacer.gif

 

In an effort to reduce the TA grading load, and thus ensure timely return of the various graded assignments, this lab quiz was graded automatically.  Another program was run, and conducted a series of 21 tests of the quiz 3 code.  Each test was worth 2.5 points.  The tests are described below.

 

Tests Performed

Tests of indexOf()

Ten elements were inserted into the vector: 10, 20, 30, 40, 50, 10, 20, 30, 40, and 50

  1. Found the correct first position of element 10 in the MiniVector
  2. Found the correct first position of element 30 in the MiniVector
  3. Found the correct first position of element 50 in the MiniVector
  4. Returned -1 for element not found in MiniVector

Tests of lastIndexOf()

The vector contained the same 10 elements from the previous tests

  1. Found the correct last position of element 10 in the MiniVector
  2. Found the correct last position of element 30 in the MiniVector
  3. Found the correct last position of element 50 in the MiniVector
  4. Returned -1 for element not found in MiniVector

Tests of clear()

Five elements were inserted into the vector: 10, 20, 30, 40, and 50.  Whether the vector was empty or not was determined by calling the size() method, which was provided in the skeleton code.

  1. MiniVector is not empty prior to clear
  2. MiniVector is empty after clear
  3. Added 5 elements after clear(); is the same as after adding the 3 elements before clear

Tests of addAt()

For the first three tests, the vector is initially empty.  For the last 7 tests the vector contained the numbers 10, 20, 30, 40, and 50.  The vector was re-created before each test.  The contents of the vector after each test is shown at the end of the line in square brackets.  Note that the word 'where' in the test means the parameter 'where' that was passed into the addAt() method.

  1. Correctly adds element to empty mv when where == 0 [5]
  2. Correctly adds element to empty mv when where > 0 [5]
  3. Correctly adds element to empty mv when where > array size [5]
  4. Correctly adds element to non-empty vector at the beginning (where == 0) [5, 10, 20, 30, 40, 50]
  5. Correctly adds element to non-empty vector towards the beginning (where == 1) [10, 5, 20, 30, 40, 50]
  6. Correctly adds element to non-empty vector in the middle (where > 0 && where < length-1) [10, 20, 5, 30, 40, 50]
  7. Correctly adds element to non-empty vector at the end (where == length-1) [10, 20, 30, 40, 5, 50]
  8. Correctly adds element to non-empty vector at the end (where == length) [10, 20, 30, 40, 50, 5]
  9. Correctly adds element to non-empty vector beyond the end (where > length) [10, 20, 30, 40, 50, 5]
  10. Correctly adds element to non-empty vector beyond the end (where > array size) [10, 20, 30, 40, 50, 5]

Sample Output

This is a sample output from a program that does everything correctly.  A failed test will print the word FAILED in all capital letters, along with the point penalty (-2.5 points per test failed).

Testing the MiniVector class from the third lab quiz

Testing indexOf()...
Found the correct first position of element 10 in the MiniVector: passed
Found the correct first position of element 30 in the MiniVector: passed
Found the correct first position of element 50 in the MiniVector: passed
Returned -1 for element not found in MiniVector: passed

Testing lastIndexOf()...
Found the correct last position of element 10 in the MiniVector: passed
Found the correct last position of element 30 in the MiniVector: passed
Found the correct last position of element 50 in the MiniVector: passed
Returned -1 for element not found in MiniVector: passed

Testing clear()...
MiniVector is not empty prior to clear: passed
MiniVector is empty after clear: passed
Added 5 elements after clear(); is the same as after adding the 3 elements before clear: passed

Testing addAt()...
0: correctly adds element to empty mv when where == 0: passed
1: correctly adds element to empty mv when where > 0: passed
2: correctly adds element to empty mv when where > array size: passed
3: correctly adds element to non-empty vector at the beginning (where == 0): passed
4: correctly adds element to non-empty vector towards the beginning (where == 1): passed
5: correctly adds element to non-empty vector in the middle (where > 0 && where < length-1): passed
6: correctly adds element to non-empty vector at the end (where == length-1): passed
7: correctly adds element to non-empty vector at the end (where == length): passed
8: correctly adds element to non-empty vector beyond the end (where > length): passed
9: correctly adds element to non-empty vector beyond the end (where > array size): passed

Student's final grade is: 100

 

spacer.gif
spacer.gif footer-middle.gif spacer.gif