CPSC 231: Assignment 4 (Marking Key)

   
Description Marks
  Actual Max
Coding style    
Appropriate use of white space   2
Self-documenting variable, constant and function names.   4
No global variables (global constants are OK)   2
No magic numbers (using named constants instead)   2
Deep nesting of if statements and loops is avoided (max 3 levels of nesting)   3
Arithmetic expressions are simple and easy to read   3
Boolean expressions are simple and easy to read   3
Total   19
     
Documentation    
Header documentation includes name and tutorial section   1
Header documentation contains description of program.   2
In line documentation used for blocks of code.   3
Total   6
     
Code Design    
Code contains at least 5 functions. (Half marks if code contains at least 3 functions.)   4
Each function has a single well-defined task   3
Each function has at most 20 lines of code.   3
Code duplication is minimized.   2
Total   12
     
Testing (Only qualify for marks if tests are submitted in a separate file in basic text format. No other formats are accepted)
Text file with tests was submitted.   1
Contains at least 6 tests.   3
Each test gives literal values for key and text.   1
Each test describes exact result expected.   1
Each test gives a description on what part of the code is tested   1
Set of tests provides thorough testing of all lines of code.   3
Total   10
     
Functionality (only qualify for these marks if the program runs)
Prompts user for encryption key.   1
Raises a KeyError if user enters invalid encryption key.   2
Error raised gives clear and helpful error message.   1
Prompts user for text to encrypt.   1
Displays encrypted text which is somehow based on input.   1
Encryption: Each non-alphabetic character is left unchanged.   2
Encryption: Each alphabetic character has been changed to another alphabetic character.   2
Encryption: The case (upper or lower) has been maintained for each alphabetic character.   1
Encryption: Each alphabetic character was shifted by amount indicated by a key character.   2
Encryption: If key is same length as text, each key character is used in order.   1
Encryption: If key is shorter than text, key is used repeatedly in the required order   1
Encryption: Each alphabetic character we shifted by the correct amount according to key character.   3
Total   18
     
Assignment Total   65