ulrail.gif

Quiz 2 Grading Guidelines

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

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

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

These are the instructions given to the graders when they graded Quiz 2.

If the program does not compile and/or not run, you need to look at the code, and manually trace it to find out why.  Don't take points off if it doesn't compile, though -- the system does that automatically.

Sample Output

The output should be what's listed below -- there is only one execution run.  The input provided was just the number 5; the text in red is what was input to the program.

Triangle manipulation

Enter max n:
5
(1,1,1) is an equilateral triangle
(1,2,2) is an isosceles triangle
(1,3,3) is an isosceles triangle
(1,4,4) is an isosceles triangle
(1,5,5) is an isosceles triangle
(2,2,2) is an equilateral triangle
(2,2,3) is an isosceles triangle
(2,3,3) is an isosceles triangle
(2,3,4) is a scalene triangle
(2,4,4) is an isosceles triangle
(2,4,5) is a scalene triangle
(2,5,5) is an isosceles triangle
(3,3,3) is an equilateral triangle
(3,3,4) is an isosceles triangle
(3,3,5) is an isosceles triangle
(3,4,4) is an isosceles triangle
(3,4,5) is a right triangle
(3,4,5) is a scalene triangle
(3,5,5) is an isosceles triangle
(4,4,4) is an equilateral triangle
(4,4,5) is an isosceles triangle
(4,5,5) is an isosceles triangle
(5,5,5) is an equilateral triangle

Point Distribution

  • 5 points: Program header (includes name and e-mail ID)
    All or nothing here
    • -5 if EITHER was missing
       
  • 10 points: Good use of whitespace and line length
    • Don't worry about variable names (as they are likely to be a, b, c, and n)
    • -5 for excessively long lines in code
    • -5 for excessive whitespace (more than 2-3 lines)
    • -2 for each misleading comments
    • -5 for bad indentation
       
  • 10 points: Integer input, Scanner creation, and print statements
    • -5 if they declare multiple Scanner objects (program will encounter a run-time exception if this occurs)
    • -10 if they use BufferedReader and InputStream instead of Scanner
    • -10 if they use Scanner.create() rather than new Scanner()
    • -10 if they read in more input than a single integer
    • -5 for botching the print statements
    • 2/3 credit (round up if 0.5 or above) for this part if it's correct but commented out
       
  • 20 points: Nested loop structure
    They should have a triply-nested loop, most likely for (although while loops work just as well).
    • -10 for not resetting the counters properly (i.e. not resetting c when the b loop resets)
    • -10 if the body of the loop is outside the entire nested loop structure, but -5 if it's between the wrong loops
    • -15 for not nesting the loops properly
    • -2 for each time they start a counter at 2
    • 2/3 credit (round up if 0.5 or above) for this part if it's correct but commented out
       
  • 15 points: Proper if structure in nested loop
    For this part, we are looking for the proper if statements, not the boolean test conditions (that's the next part). 
    • -7 if they don't sort the values properly
    • -7 if they don't test for invalid triangles
    • -5 for each triangle property that they don't test for (but if it's a bad test condition, take off from the next part)
    • -5 if they don't allow printing of multiple properties for triangles (i.e. they should print out that (3,4,5) is both right and scalene)
    • 2/3 credit (round up if 0.5 or above) for this part if it's correct but commented out
       
  • 20 points: Proper tests for triangle properties
    These tests may be in the if statements (if they didn't do the methods), or in the methods themselves.  There are 4: scalene, equilateral, isosceles, and right.  Note that for isosceles, the proper condition is ((a == b) && (b != c)) || ((a != b) && (b == c)).
    • -5 for each one that is missing or completely wrong
    • -3 if one is somewhat wrong
    • -2 for each instance of = instead of ==
    • -2 if their isosceles test returns true for equilateral triangles
    • 2/3 credit (round up if 0.5 or above) for this part if it's correct but commented out
       
  • 20 points: Method creation
    Each of these point deductions are per method.  There are 4 that are required: isRightTriangle(), isScaleneTriangle(), isIsoscelesTriangle(), and isEquilateralTriange().
    • Max of -6 points if they attempted the method, but it is totally wrong
    • -10 points if they didn't even attempt the method
    • -3 for not making them static
    • We don't care about public-ness
    • -3 for wrong return type
    • -3 for wrong parameter list
    • -3 for wrong name (but -2 if it's a spelling or capitalization typo, especially for isosceles and equilateral)
    • -3 for not working properly (but if it's a problem with the test for the triangle property, take that off above, not here)
    • 2/3 credit (round up if 0.5 or above) for this part if it's correct but commented out

 

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