The 4 categories of grading criteria provided here apply to all labs and projects. For each lab or project we may use different grade point distributions in each category, but we will apply the same weights among these categories. This page will be updated as new labs and projects are introduced. Please check regularly for updates.
When the description provides a guideline on a certain subset of functionality earn up to X percentage of grade, code that satifies this subset will get a grade between (X-30)% and X %, inclusive on both ends. For example, if a submission for Project 2 provides correct implementation of Board and Square classes and nothing else, the grade will be between 40% and 70% of the total, inclusive on both ends. On the other hand, if your submission successfully implemented Board and Square classes, resetButton, user feedback at the end of the game, and the "Go back" button till the original board, your grade will be bewteen 100% and 130%.
Functionality (sets the upper bound)Your code should perform the functionality specified in the description. The functionality must be implemented in a general way that your code can handle other inputs than the provided sample input case. Proper handling of invalid input is highly encouraged, if not required in the description.
- Examples of bad practices in funcionality
Scanner scan=new Scanner("mytest.txt");
Get the file name from the user via keyboard or use program arguments. Being able to work with different files is better functionality.
Your code should perform the described funcionality in an efficient way. For example, the following code is inefficient compared to the one below, as unnecessary if-else statements impose unnecesary condition checks. Even though two code blocks do the same functionality, the second code block will receive a better grade.
if (index == 0) {
count[0] = count[0] + 1;
} else if (index == 1) {
count[1] = count[1] + 1;
} else if (index == 2) {
count[2] = count[2] + 1;
} else if (index == 3) {
count[3] = count[3] + 1;
} else if (index == 4) {
count[4] = count[4] + 1;
} else if (index == 5) {
count[5] = count[5] + 1;
} else if (index == 6) {
count[6] = count[6] + 1;
} else if (index == 7) {
count[7] = count[7] + 1;
} else if (index == 8) {
count[8] = count[8] + 1;
} else if (index == 9) {
count[9] = count[9] + 1;
}
... compared to ...
count[index]+=1;- Examples of bad practices in quality.
a=a+b; a=a++; a=d;... compared to ...
a=d;
public int add(int a, int b){
return a+b;
}
... compared to ...
a+b;
Style of your code is very important in any professional environment. Proper style enhances readability, comprehensibility, and often quality of the code. Proper style includes following Java convention, formatting, comments, and sometimes method design.
-Examples of bad practices in style are:
if (index==0) {
index++;
max = count[index];
}
and
if (index==0)
index++;
max = count[index];
are implementing different logic, and yet look very alike. Your code should not encourage confusing as the first code block does.
Lab or project descriptions serve as requirements for your software development. Failing to meet the requirement will result in point deduction.
- Examples of bad practices in following descriptions