List of Common Mistakes for the 'SwitchAndMod' (XNA-based) Assignment:

Category

Mistake

Suggested Percentage Of Assignment
(explanation here)
  Algorithm Implementation: TranslateLocationToColor

30

Correctness Don't use integer division -5%
Correctness Don't use modulus -2%
(Failure to abide by the restrictions set forth in the assignment) Instead of making clever use of some of the operators you've learned about, you instead used a loop & a counter to get the correct color.  This works, but is specifically prohibited by the assignment (i.e., you're using the loop & counter to avoid learning about operators) -10%
(Failure to abide by the restrictions set forth in the assignment) You don't make use of the provided variables (width, howManyColors), but instead have hard-coded values (like 7) into your solution.  While it does simplify your code, and the code does work in this particular case, you need to solve this problem for the general case (i.e., no matter what the width is).
(As a side-comment, your code looks like it should work in the general case, once you've changed the hard-coded values to be the variables)
-4%
Correctness

(Failure to abide by the restrictions set forth in the assignment)

You don't make use of the provided variables (width, howManyColors), but instead have hard-coded values (like 7) into your solution.  While it does simplify your code, and the code does work in this particular case, you need to solve this problem for the general case (i.e., no matter what the width is).
(As a side-comment, it appears that even if the hard-coded values are replaced with variables, your solution will not work in the general case.  In other words, the hard-coding was done (in part) to AVOID learning how to use the modulus / integer division operator.
-10%
Correctness: related to integer division If the width is less than 1 (e.g., it's .45), then your solution will convert the width to zero (when it converts the float to an integer) -4%
  Algorithm Implementation: GetColor

30

(Failure to complete part of the assignment) You have some colors (3`+), but you don't have all 7 colors -3%
(Failure to complete part of the assignment) Don't have a default color at all -4%
Correctness - corner case Default color not returned for negative numbers -4%
Correctness - corner case Default color not returned for excessively larger positive numbers -4%
(Failure to abide by the restrictions set forth in the assignment) Default color isn't visually distinct from 'normal' colors -2%
(Failure to complete part of the assignment) You don't have a solution that makes substantial use of if statements -5%
(Failure to complete part of the assignment) You don't have a solution that makes substantial use of if...else statements -5%
(Failure to complete part of the assignment) You don't have a solution that makes substantial use of switch statements -5%
  Computer Efficiency            (Efficient use of resources, such as memory)

10

Don't create unused variables The variables r1, x, and y are unused – remove them. -1%
 Don't create unneeded local variables

For something like:
double distance = Math.Sqrt(((_centerX - x)*(_centerX - x)) + ((_centerY - y)*(_centerY - y)));
return distance;

you can instead write:
return Math.Sqrt(((_centerX - x)*(_centerX - x)) + ((_centerY - y)*(_centerY - y)));  

-1%
  Critical Thinking (about the modulus operator)

20

 

This is missing entirely. (Students will often miss this document, and hand in the program portion, but fail to hand in this document)

-20%
 

Given A % B = C, you don't explain what C will be, when A is less than B.

-10%
 

You need an "intuitive, easy-to-understand explanation explaining why you always get the answer that you do" for A % B = C, when A is less than B. 

There are three common errors here:

  1. Instead, you have given one more concrete examples (without explaining why the pattern occurs, overall), or your explanation appears to be one the right track, you haven't clearly communicated a clear and concise understanding as to why this pattern exists.

  2. Your explanation appears to be one the right track, you haven't clearly communicated a clear and concise understanding as to why this pattern exists.

  3. Your answer is correct, but you don't explain why the pattern occurs, overall (Example: if A = B, the student will say "C is zero", but not explain why)

-5%
 

Given A % B = C, you don't explain what C will be, when A is less the same as B.

-10%
  You need an "intuitive, easy-to-understand explanation explaining why you always get the answer that you do" for A % B = C, when A is equal to B
  1. Instead, you have given one more concrete examples (without explaining why the pattern occurs, overall), or your explanation appears to be one the right track, you haven't clearly communicated a clear and concise understanding as to why this pattern exists.

  2. Your explanation appears to be one the right track, you haven't clearly communicated a clear and concise understanding as to why this pattern exists.

  3. Your answer is correct, but you don't explain why the pattern occurs, overall (Example: if A = B, the student will say "C is zero", but not explain why)

-5%
  Style / Presentation

10

Please give your variables that indicate what the variable is used for -2%
Commenting

You didn't comment any of your code. 

-1%
Identify the author of each file

You didn't put your name, etc, at the top of EVERY  source code file, including any files given to you. (The "etc" part includes the name of this class (“Computer Science 1xx”), and the year and quarter, and the assignment number, including the revision number) 

-1%
Quality of presentation

(Make sure that what you've handed in looks good)

Code that you've commented out, because you're no longer using it, should be removed before handing in the assignment.

-1%
Horizontal Indentation Your code isn't formatted entirely consistently – in your C# file, try doing a "Select All", then under the "Edit" menu, under "Advanced", do "Format Selection" -1%
Vertical White Space Your code contains excessive numbers of blank lines in at least one place.   
  General Assignment Mistakes  
(Failure to abide by the restrictions set forth in the assignment) You modified part of the program, other than those parts of the program that supposed to be modified for this assignment.
NOTE: If you check with the instructor first, this penalty may be reduced or eliminated, on a case-by-case basis.  In general, modifying other parts of the program to make the program more fun, more cool, etc, have a good chance of being approved by the instructor.  Modifying other parts of the program in an attempt to avoid working/thinking hard for the assignment will always be penalized
(up to)
-10%
Submission Mistake You included the "Debug", "bin", or "obj" directories, and you shouldn't have. The assignment specifically said not to do this.

These result in point penalties, since the student has failed to complete one or more parts of the assignment, even though no particular percentage has been assigned to this category.

Submission Mistake

You didn't include the project files, please do so in the future. The assignment specifically said to do this.

 

 

Explanation of Percentages assigned:

Please note that for any given category, the total of the penalties may add up to more (or less) than the total for the category ; many of the mistakes are mutually exclusive (and since they therefore can't all apply, it's ok to add up to more than the category total), and if the student doesn't include any work in a particular category, it is suggested that you remove all points from that category (even if the individual items don't add up to the category total)


This document and the related materials are developed with support from Microsoft Research Computer Gaming Initiative under the Computer Gaming Curriculum in Computer Science RFP, Award Number 15871.