C++ Grade Calculation
There are 11 categories. Nine of them are 10 points each and the remaining two are 5 points each.
- (10) File Comments:
- If 1 file submitted:
- 10/10 – present and formatted correctly
- 7/10 – formatted incorrectly
- 0/10 – not present
- If more than 1 file submitted:
10/10 – zero missing and zero formatted incorrectly
- 7/10 – one or less missing and two or less formatted incorrectly
- 4/10 – two or less missing and three or less formatted incorrectly
- 0/10 – more than 2 missing or 3 formatted incorrectly
(10) Function/Method Comments:
- If 1 function/method submitted:
- 10/10 – present and formatted correctly
- 7/10 – formatted incorrectly
- 0/10 – not present
- If more than 1 functions/methods submitted:
- 10/10 – zero missing and zero formatted incorrectly
- 7/10 – one or less missing and two or less formatted incorrectly
- 4/10 – two or less missing and three or less formatted incorrectly
- 0/10 – more than 2 missing or 3 formatted incorrectly
(5) includes:
- If 1 file submitted:
- 5/5 – all correct include order
- 0/5 – incorrect order
- If more than 1 file submitted:
- 5/5 – all correct include order
- 3/5 – one incorrect include order
- 0/5 – more than two incorrect include order
(10) Globals/continue/goto/break:
- 10/10 – no issues
- 5/10 – 1 issue
- 0/10 – more than 1 issue
(10) Proper case for functions, classes, constants, variables, enums:
- 10/10 – no issues
- 7/10 – 1 issue
- 4/10 – 2 issues
- 0/10 – 3 or more issues
(10) Proper indentation:
- 10/10 – no issues
- 7/10 – 1 issue
- 4/10 – 2 issues
- 0/10 – 3 or more issues
(10) Proper spacing (around operators, too many blank lines, space between function name and (, space after if, while, for, …):
- 10/10 – no issues
- 7/10 – 1 issue
- 4/10 – 2 issues
- 0/10 – 3 or more issues
(10) Brace formatting (missing {}'s, do-while formatting, characters after {}, {} in wrong location):
- 10/10 – no issues
- 7/10 – 1 issue
- 4/10 – 2 issues
- 0/10 – 3 or more issues
(10) Declarations (constants after other declarations, multiple variables per line):
- 10/10 – no issues
- 7/10 – 1 issue
- 4/10 – 2 issues
- 0/10 – 3 or more issues
(5) Function/method order (main is not first function/method in file):
- 5/5 – main is first
- 0/5 – main was not first
(10) Other issues (literal in declaring array size, using ==/!= true/false, using NULL instead of nullptr, code after case :, more than one statement per line):
- 10/10 – no issues
- 7/10 – 1 issue
- 4/10 – 2 issues
- 0/10 – 3 or more issues
C++ Sample Program
/*
* Program to print Hello World
*
* Name: Karen Peterson
* Date: January 1, 2018
*/
#include
using namespace std;
/*
* main - prints Hello World
*
* Return: status
*/
int main()
{
cout << "Hello World" << endl;
return 0;
}
Java Grade Calculation
There are 11 categories. Nine of them are 10 points each and the remaining two are 5 points each.
- (10) File Comments:
- If 1 file submitted:
- 10/10 – present and formatted correctly
- 7/10 – formatted incorrectly
- 0/10 – not present
- If more than 1 file submitted:
10/10 – zero missing and zero formatted incorrectly
- 7/10 – one or less missing and two or less formatted incorrectly
- 4/10 – two or less missing and three or less formatted incorrectly
- 0/10 – more than 2 missing or 3 formatted incorrectly
(10) Function/Method Comments:
- If 1 function/method submitted:
- 10/10 – present and formatted correctly
- 7/10 – formatted incorrectly
- 0/10 – not present
- If more than 1 functions/methods submitted:
- 10/10 – zero missing and zero formatted incorrectly
- 7/10 – one or less missing and two or less formatted incorrectly
- 4/10 – two or less missing and three or less formatted incorrectly
- 0/10 – more than 2 missing or 3 formatted incorrectly
(5) Package/includes:
- If 1 file submitted:
- 5/5 – all correct (package present)
- 0/5 – not present
- If more than 1 file submitted:
- 5/5 – all correct (package present)
- 3/5 – one package missing
- 0/5 – more than two missing packages
(10) continue/goto/break:
- 10/10 – no issues
- 5/10 – 1 issue
- 0/10 – more than 1 issue
(10) Proper case for methods, classes, constants, variables, enums:
- 10/10 – no issues
- 7/10 – 1 issue
- 4/10 – 2 issues
- 0/10 – 3 or more issues
(10) Proper indentation:
- 10/10 – no issues
- 7/10 – 1 issue
- 4/10 – 2 issues
- 0/10 – 3 or more issues
(10) Proper spacing (around operators, too many blank lines, space between function name and (, space after if, while, for, …):
- 10/10 – no issues
- 7/10 – 1 issue
- 4/10 – 2 issues
- 0/10 – 3 or more issues
(10) Brace formatting (missing {}'s, do-while formatting, characters after {}, {} in wrong location):
- 10/10 – no issues
- 7/10 – 1 issue
- 4/10 – 2 issues
- 0/10 – 3 or more issues
(10) Declarations (constants after other declarations, multiple variables per line):
- 10/10 – no issues
- 7/10 – 1 issue
- 4/10 – 2 issues
- 0/10 – 3 or more issues
(5) Function/method order (main is not first function/method in file):
- 5/5 – main is first
- 0/5 – main was not first
(10) Other issues (literal in declaring array size, using ==/!= true/false, code after case :, more than one statement per line):
- 10/10 – no issues
- 7/10 – 1 issue
- 4/10 – 2 issues
- 0/10 – 3 or more issues
Java Sample Program
/**
* Program to print Hello World
*
* @author Karen Peterson
* @version January 1, 2018
*/
package proj01;
public class HelloWorld {
/*
* main - prints Hello World
*
* @param args command line arguments
* @return N/A
*/
public int main(String[] args) {
System.out.println("Hello World!");
}
}