List of Common Mistakes for the 'Binary Search Tree' (Console-based) Assignment:

Category

Mistake

Suggested Percentage Of Assignment
(explanation here)
  General Implementation Issues

10+

Coding Style

CBinarySearchTree.ErrorCode Response = new CBinarySearchTree.ErrorCode();
you can write:
CBinarySearchTree.ErrorCode Response;
You don't really need the 'new', and I believe that this is a more common way of doing this.

-2%
Correctness

You code will crash if method ___________ is called on an empty tree.

-2%
  'Add' Method:

10+

(Failure to complete part of the assignment) This is missing entirely. -15%
  'Find' method:

10+

(Failure to complete part of the assignment) This is missing entirely. -15%
  'GetAllInOrder' method:

10+

(Failure to complete part of the assignment) This is missing entirely. -15%
(Failure to complete part of the assignment)
Correctness
This is (effectively) missing.  Do this using the tree structure, not by serializing all the nodes into an array & printing that. -15%
  'Clone' method:

10+

(Failure to complete part of the assignment) This is missing entirely. -15%
Correctness If there are no nodes in the tree, you should still return a BinarySearchTree object, just one that has a null root. -2%
(Failure to abide by the restrictions set forth in the assignment) Your approach is to call Add a bunch of times, which does work.  It's also really inefficient – you can (recursively) walk down both the old tree, and the new tree you're creating, just once.           -5%
 

'FindDepth' method:

10+

(Failure to complete part of the assignment) This is missing entirely. -15%
  'Balance' method:

10+

(Failure to complete part of the assignment) This is missing entirely. -15%
  Your SortedArray method will take O(N) to traverse the tree, and then O(N2) to sort the array. If you're smarter about how you traverse the tree, the array will be sorted, and you'll save yourself the bubblesort. -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%
  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 (“BIT 142”), 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  
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.